GCC Middle and Back End API Reference
gimple.h
Go to the documentation of this file.
1/* Gimple IR definitions.
2
3 Copyright (C) 2007-2026 Free Software Foundation, Inc.
4 Contributed by Aldy Hernandez <aldyh@redhat.com>
5
6This file is part of GCC.
7
8GCC is free software; you can redistribute it and/or modify it under
9the terms of the GNU General Public License as published by the Free
10Software Foundation; either version 3, or (at your option) any later
11version.
12
13GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14WARRANTY; without even the implied warranty of MERCHANTABILITY or
15FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16for more details.
17
18You should have received a copy of the GNU General Public License
19along with GCC; see the file COPYING3. If not see
20<http://www.gnu.org/licenses/>. */
21
22#ifndef GCC_GIMPLE_H
23#define GCC_GIMPLE_H
24
25#include "tree-ssa-alias.h"
26#include "gimple-expr.h"
27#include "bitmap.h"
28#include "value-range.h"
29#include "value-range-storage.h"
30#include "value-query.h"
31
33
35#define DEFGSCODE(SYM, STRING, STRUCT) SYM,
36#include "gimple.def"
37#undef DEFGSCODE
38 LAST_AND_UNUSED_GIMPLE_CODE
39};
40
41extern const char *const gimple_code_name[];
42extern const unsigned char gimple_rhs_class_table[];
43
44/* Error out if a gimple tuple is addressed incorrectly. */
45#if defined ENABLE_GIMPLE_CHECKING
46#define gcc_gimple_checking_assert(EXPR) gcc_assert (EXPR)
47extern void gimple_check_failed (const gimple *, const char *, int, \
48 const char *, enum gimple_code, \
49 enum tree_code) ATTRIBUTE_NORETURN \
50 ATTRIBUTE_COLD;
51
52#define GIMPLE_CHECK(GS, CODE) \
53 do { \
54 const gimple *__gs = (GS); \
55 if (gimple_code (__gs) != (CODE)) \
56 gimple_check_failed (__gs, __FILE__, __LINE__, __FUNCTION__, \
57 (CODE), ERROR_MARK); \
58 } while (0)
59template <typename T>
60inline T
61GIMPLE_CHECK2(const gimple *gs,
62#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
63 const char *file = __builtin_FILE (),
64 int line = __builtin_LINE (),
65 const char *fun = __builtin_FUNCTION ())
66#else
67 const char *file = __FILE__,
68 int line = __LINE__,
69 const char *fun = NULL)
70#endif
71{
72 T ret = dyn_cast <T> (gs);
73 if (!ret)
74 gimple_check_failed (gs, file, line, fun,
75 std::remove_pointer<T>::type::code_, ERROR_MARK);
76 return ret;
77}
78template <typename T>
79inline T
81#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
82 const char *file = __builtin_FILE (),
83 int line = __builtin_LINE (),
84 const char *fun = __builtin_FUNCTION ())
85#else
86 const char *file = __FILE__,
87 int line = __LINE__,
88 const char *fun = NULL)
89#endif
90{
91 T ret = dyn_cast <T> (gs);
92 if (!ret)
93 gimple_check_failed (gs, file, line, fun,
94 std::remove_pointer<T>::type::code_, ERROR_MARK);
95 return ret;
96}
97#else /* not ENABLE_GIMPLE_CHECKING */
98#define gcc_gimple_checking_assert(EXPR) ((void)(0 && (EXPR)))
99#define GIMPLE_CHECK(GS, CODE) (void)0
100template <typename T>
101inline T
103{
104 return as_a <T> (gs);
105}
106template <typename T>
107inline T
109{
110 return as_a <T> (gs);
111}
112#endif
113
114/* Class of GIMPLE expressions suitable for the RHS of assignments. See
115 get_gimple_rhs_class. */
117{
118 GIMPLE_INVALID_RHS, /* The expression cannot be used on the RHS. */
119 GIMPLE_TERNARY_RHS, /* The expression is a ternary operation. */
120 GIMPLE_BINARY_RHS, /* The expression is a binary operation. */
121 GIMPLE_UNARY_RHS, /* The expression is a unary operation. */
122 GIMPLE_SINGLE_RHS /* The expression is a single object (an SSA
123 name, a _DECL, a _REF, etc. */
124};
125
126/* Specific flags for individual GIMPLE statements. These flags are
127 always stored in gimple.subcode and they may only be
128 defined for statement codes that do not use subcodes.
129
130 Values for the masks can overlap as long as the overlapping values
131 are never used in the same statement class.
132
133 The maximum mask value that can be defined is 1 << 15 (i.e., each
134 statement code can hold up to 16 bitflags).
135
136 Keep this list sorted. */
138 GF_ASM_BASIC = 1 << 0,
153 GF_CALL_XTHROW = 1 << 13,
157 GF_OMP_FOR_KIND_MASK = (1 << 3) - 1,
180 /* A 'GF_OMP_TARGET_KIND_OACC_PARALLEL' representing an OpenACC 'kernels'
181 decomposed part, parallelized. */
183 /* A 'GF_OMP_TARGET_KIND_OACC_PARALLEL' representing an OpenACC 'kernels'
184 decomposed part, "gang-single". */
186 /* A 'GF_OMP_TARGET_KIND_OACC_DATA' representing an OpenACC 'kernels'
187 decomposed parts' 'data' construct. */
190
191 /* True on an GIMPLE_OMP_RETURN statement if the return does not require
192 a thread synchronization via some sort of barrier. The exact barrier
193 that would otherwise be emitted is dependent on the OMP statement with
194 which this return is associated. */
196
203};
204
205/* This subcode tells apart different kinds of stmts that are not used
206 for codegen, but rather to retain debug information. */
213
214/* Masks for selecting a pass local flag (PLF) to work on. These
215 masks are used by gimple_set_plf and gimple_plf. */
217 GF_PLF_1 = 1 << 0,
218 GF_PLF_2 = 1 << 1
219};
220
221/* Data structure definitions for GIMPLE tuples. NOTE: word markers
222 are for 64 bit hosts. */
223
224struct GTY((desc ("gimple_statement_structure (&%h)"), tag ("GSS_BASE"),
225 chain_next ("%h.next"), variable_size))
226 gimple
227{
228 /* [ WORD 1 ]
229 Main identifying code for a tuple. */
230 enum gimple_code code : 8;
232 /* Nonzero if a warning should not be emitted on this tuple. */
233 unsigned int no_warning : 1;
234
235 /* Nonzero if this tuple has been visited. Passes are responsible
236 for clearing this bit before using it. */
237 unsigned int visited : 1;
238
239 /* Nonzero if this tuple represents a non-temporal move; currently
240 only stores are supported. */
241 unsigned int nontemporal_move : 1;
242
243 /* Pass local flags. These flags are free for any pass to use as
244 they see fit. Passes should not assume that these flags contain
245 any useful value when the pass starts. Any initial state that
246 the pass requires should be set on entry to the pass. See
247 gimple_set_plf and gimple_plf for usage. */
248 unsigned int plf : 2;
249
250 /* Nonzero if this statement has been modified and needs to have its
251 operands rescanned. */
252 unsigned modified : 1;
254 /* Nonzero if this statement contains volatile operands. */
255 unsigned has_volatile_ops : 1;
257 /* Infrastructure local flag. Always clear. */
258 unsigned ilf : 1;
259
260 /* The SUBCODE field can be used for tuple-specific flags for tuples
261 that do not require subcodes. Note that SUBCODE should be at
262 least as wide as tree codes, as several tuples store tree codes
263 in there. */
264 unsigned int subcode : 16;
265
266 /* UID of this statement. This is used by passes that want to assign IDs
267 to statements. It must be assigned and used by each pass. By default
268 it should be assumed to contain garbage. */
269 unsigned uid;
270
271 /* [ WORD 2 ]
272 Number of operands in this tuple. */
273 unsigned num_ops;
274
275 /* Unused 32 bits padding on 64-bit hosts. */
276
277 /* [ WORD 3 ]
278 Locus information for debug info. */
279 location_t location;
280
281 /* [ WORD 4 ]
282 Basic block holding this statement. */
284
285 /* [ WORD 5-6 ]
286 Linked lists of gimple statements. The next pointers form
287 a NULL terminated list, the prev pointers are a cyclic list.
288 A gimple statement is hence also a double-ended list of
289 statements, with the pointer itself being the first element,
290 and the prev pointer being the last. */
291 gimple *next;
292 gimple *GTY((skip)) prev;
293};
294
295
296/* Base structure for tuples with operands. */
298/* This gimple subclass has no tag value. */
299struct GTY(())
301{
302 /* [ WORD 1-6 ] : base class */
303
304 /* [ WORD 7 ]
305 SSA operand vectors. NOTE: It should be possible to
306 amalgamate these vectors with the operand vector OP. However,
307 the SSA operand vectors are organized differently and contain
308 more information (like immediate use chaining). */
309 struct use_optype_d GTY((skip (""))) *use_ops;
310};
311
313/* Statements that take register operands. */
314
315struct GTY((tag("GSS_WITH_OPS")))
317{
318 /* [ WORD 1-7 ] : base class */
319
320 /* [ WORD 8 ]
321 Operand vector. NOTE! This must always be the last field
322 of this structure. In particular, this means that this
323 structure cannot be embedded inside another one. */
324 tree GTY((length ("%h.num_ops"))) op[1];
325};
327
328/* Base for statements that take both memory and register operands. */
329
330struct GTY((tag("GSS_WITH_MEM_OPS_BASE")))
332{
333 /* [ WORD 1-7 ] : base class */
335 /* [ WORD 8-9 ]
336 Virtual operands for this statement. The GC will pick them
337 up via the ssa_names array. */
338 tree GTY((skip (""))) vdef;
339 tree GTY((skip (""))) vuse;
341
342
343/* Statements that take both memory and register operands. */
344
345struct GTY((tag("GSS_WITH_MEM_OPS")))
348{
349 /* [ WORD 1-9 ] : base class */
350
351 /* [ WORD 10 ]
352 Operand vector. NOTE! This must always be the last field
353 of this structure. In particular, this means that this
354 structure cannot be embedded inside another one. */
355 tree GTY((length ("%h.num_ops"))) op[1];
356};
357
358
359/* Call statements that take both memory and register operands. */
361struct GTY((tag("GSS_CALL")))
363{
364 /* [ WORD 1-9 ] : base class */
365
366 /* [ WORD 10-13 ] */
369
370 /* [ WORD 14 ] */
371 union GTY ((desc ("%1.subcode & GF_CALL_INTERNAL"))) {
372 tree GTY ((tag ("0"))) fntype;
373 enum internal_fn GTY ((tag ("GF_CALL_INTERNAL"))) internal_fn;
374 } u;
376 /* [ WORD 15 ]
377 Operand vector. NOTE! This must always be the last field
378 of this structure. In particular, this means that this
379 structure cannot be embedded inside another one. */
380 tree GTY((length ("%h.num_ops"))) op[1];
382 static const enum gimple_code code_ = GIMPLE_CALL;
383};
384
385
386/* OMP statements. */
387
388struct GTY((tag("GSS_OMP")))
390{
391 /* [ WORD 1-6 ] : base class */
393 /* [ WORD 7 ] */
395};
396
397
398/* GIMPLE_BIND */
399
400struct GTY((tag("GSS_BIND")))
401 gbind : public gimple
402{
403 /* [ WORD 1-6 ] : base class */
404
405 /* [ WORD 7 ]
406 Variables declared in this scope. */
407 tree vars;
408
409 /* [ WORD 8 ]
410 This is different than the BLOCK field in gimple,
411 which is analogous to TREE_BLOCK (i.e., the lexical block holding
412 this statement). This field is the equivalent of BIND_EXPR_BLOCK
413 in tree land (i.e., the lexical scope defined by this bind). See
414 gimple-low.cc. */
415 tree block;
416
417 /* [ WORD 9 ] */
418 gimple_seq body;
419};
421
422/* GIMPLE_CATCH */
424struct GTY((tag("GSS_CATCH")))
425 gcatch : public gimple
426{
427 /* [ WORD 1-6 ] : base class */
428
429 /* [ WORD 7 ] */
430 tree types;
431
432 /* [ WORD 8 ] */
433 gimple_seq handler;
434};
436
437/* GIMPLE_EH_FILTER */
438
439struct GTY((tag("GSS_EH_FILTER")))
440 geh_filter : public gimple
441{
442 /* [ WORD 1-6 ] : base class */
443
444 /* [ WORD 7 ]
445 Filter types. */
446 tree types;
447
448 /* [ WORD 8 ]
449 Failure actions. */
450 gimple_seq failure;
451};
452
453/* GIMPLE_EH_ELSE */
455struct GTY((tag("GSS_EH_ELSE")))
456 geh_else : public gimple
457{
458 /* [ WORD 1-6 ] : base class */
460 /* [ WORD 7,8 ] */
461 gimple_seq n_body, e_body;
462};
463
464/* GIMPLE_EH_MUST_NOT_THROW */
465
466struct GTY((tag("GSS_EH_MNT")))
467 geh_mnt : public gimple
468{
469 /* [ WORD 1-6 ] : base class */
471 /* [ WORD 7 ] Abort function decl. */
472 tree fndecl;
474
475/* GIMPLE_PHI */
477struct GTY((tag("GSS_PHI")))
478 gphi : public gimple
479{
480 /* [ WORD 1-6 ] : base class */
481
482 /* [ WORD 7 ] */
483 unsigned capacity;
484 unsigned nargs;
485
486 /* [ WORD 8 ] */
487 tree result;
489 /* [ WORD 9-14 ] */
490 struct phi_arg_d GTY ((length ("%h.nargs"))) args[1];
492
493
494/* GIMPLE_RESX, GIMPLE_EH_DISPATCH */
495
496struct GTY((tag("GSS_EH_CTRL")))
498{
499 /* [ WORD 1-6 ] : base class */
500
501 /* [ WORD 7 ]
502 Exception region number. */
503 int region;
504};
505
506struct GTY((tag("GSS_EH_CTRL")))
508{
509 /* No extra fields; adds invariant:
510 stmt->code == GIMPLE_RESX. */
511};
513struct GTY((tag("GSS_EH_CTRL")))
515{
516 /* No extra fields; adds invariant:
517 stmt->code == GIMPLE_EH_DISPATH. */
518};
519
521/* GIMPLE_TRY */
522
523struct GTY((tag("GSS_TRY")))
524 gtry : public gimple
525{
526 /* [ WORD 1-6 ] : base class */
528 /* [ WORD 7 ]
529 Expression to evaluate. */
531
532 /* [ WORD 8 ]
533 Cleanup expression. */
534 gimple_seq cleanup;
536
537/* Kind of GIMPLE_TRY statements. */
539{
540 /* A try/catch. */
541 GIMPLE_TRY_CATCH = 1 << 0,
542
543 /* A try/finally. */
544 GIMPLE_TRY_FINALLY = 1 << 1,
547 /* Analogous to TRY_CATCH_IS_CLEANUP. */
549};
550
551/* GIMPLE_WITH_CLEANUP_EXPR */
553struct GTY((tag("GSS_WCE")))
555{
556 /* [ WORD 1-6 ] : base class */
557
558 /* Subcode: CLEANUP_EH_ONLY. True if the cleanup should only be
559 executed if an exception is thrown, not on normal exit of its
560 scope. This flag is analogous to the CLEANUP_EH_ONLY flag
561 in TARGET_EXPRs. */
563 /* [ WORD 7 ]
564 Cleanup expression. */
565 gimple_seq cleanup;
566};
567
568
569/* GIMPLE_ASM */
570
571struct GTY((tag("GSS_ASM")))
573{
574 /* [ WORD 1-9 ] : base class */
575
576 /* [ WORD 10 ]
577 __asm__ statement. */
578 const char *string;
579
580 /* [ WORD 11 ]
581 Number of inputs, outputs, clobbers, labels. */
582 unsigned char ni;
583 unsigned char no;
584 unsigned char nc;
585 unsigned char nl;
586
587 /* [ WORD 12 ]
588 Operand vector. NOTE! This must always be the last field
589 of this structure. In particular, this means that this
590 structure cannot be embedded inside another one. */
591 tree GTY((length ("%h.num_ops"))) op[1];
592};
593
594/* GIMPLE_OMP_CRITICAL */
595
596struct GTY((tag("GSS_OMP_CRITICAL")))
598{
599 /* [ WORD 1-7 ] : base class */
601 /* [ WORD 8 ] */
602 tree clauses;
604 /* [ WORD 9 ]
605 Critical section name. */
606 tree name;
607};
609
610struct GTY(()) gimple_omp_for_iter {
611 /* Condition code. */
612 enum tree_code cond;
614 /* Index variable. */
615 tree index;
616
617 /* Initial value. */
618 tree initial;
619
620 /* Final value. */
621 tree final;
622
623 /* Increment. */
624 tree incr;
625};
626
627/* GIMPLE_OMP_FOR */
628
629struct GTY((tag("GSS_OMP_FOR")))
631{
632 /* [ WORD 1-7 ] : base class */
633
634 /* [ WORD 8 ] */
637 /* [ WORD 9 ]
638 Number of elements in iter array. */
639 size_t collapse;
641 /* [ WORD 10 ] */
642 struct gimple_omp_for_iter * GTY((length ("%h.collapse"))) iter;
643
644 /* [ WORD 11 ]
645 Pre-body evaluated before the loop body begins. */
646 gimple_seq pre_body;
647};
649
650/* GIMPLE_OMP_PARALLEL, GIMPLE_OMP_TARGET, GIMPLE_OMP_TASK, GIMPLE_OMP_TEAMS */
651
652struct GTY((tag("GSS_OMP_PARALLEL_LAYOUT")))
654{
655 /* [ WORD 1-7 ] : base class */
656
657 /* [ WORD 8 ]
658 Clauses. */
660
661 /* [ WORD 9 ]
662 Child function holding the body of the parallel region. */
665 /* [ WORD 10 ]
666 Shared data argument. */
668};
669
670/* GIMPLE_OMP_PARALLEL or GIMPLE_TASK */
671struct GTY((tag("GSS_OMP_PARALLEL_LAYOUT")))
673{
674 /* No extra fields; adds invariant:
675 stmt->code == GIMPLE_OMP_PARALLEL
676 || stmt->code == GIMPLE_OMP_TASK
677 || stmt->code == GIMPLE_OMP_TEAMS. */
678};
679
680/* GIMPLE_OMP_PARALLEL */
681struct GTY((tag("GSS_OMP_PARALLEL_LAYOUT")))
683{
684 /* No extra fields; adds invariant:
685 stmt->code == GIMPLE_OMP_PARALLEL. */
687
688/* GIMPLE_OMP_TARGET */
689struct GTY((tag("GSS_OMP_TARGET")))
691{
692 /* [ WORD 1-10 ] : base class */
693
694 /* [ WORD 11 ]
695 Iterator loops. */
696 gimple_seq iterator_loops;
697};
698
699/* GIMPLE_OMP_TASK */
700
701struct GTY((tag("GSS_OMP_TASK")))
703{
704 /* [ WORD 1-10 ] : base class */
705
706 /* [ WORD 11 ]
707 Child function holding firstprivate initialization if needed. */
709
710 /* [ WORD 12-13 ]
711 Size and alignment in bytes of the argument data block. */
712 tree arg_size;
713 tree arg_align;
715
716
717/* GIMPLE_OMP_SECTION */
718/* Uses struct gimple_statement_omp. */
720
721/* GIMPLE_OMP_SECTIONS */
723struct GTY((tag("GSS_OMP_SECTIONS")))
725{
726 /* [ WORD 1-7 ] : base class */
727
728 /* [ WORD 8 ] */
730
731 /* [ WORD 9 ]
732 The control variable used for deciding which of the sections to
733 execute. */
734 tree control;
735};
736
737/* GIMPLE_OMP_CONTINUE.
738
739 Note: This does not inherit from gimple_statement_omp, because we
740 do not need the body field. */
741
742struct GTY((tag("GSS_OMP_CONTINUE")))
744{
745 /* [ WORD 1-6 ] : base class */
746
747 /* [ WORD 7 ] */
748 tree control_def;
750 /* [ WORD 8 ] */
751 tree control_use;
752};
753
754/* GIMPLE_OMP_SINGLE, GIMPLE_OMP_ORDERED, GIMPLE_OMP_TASKGROUP,
755 GIMPLE_OMP_SCAN, GIMPLE_OMP_MASKED, GIMPLE_OMP_SCOPE, GIMPLE_OMP_DISPATCH,
756 GIMPLE_OMP_INTEROP. */
757
758struct GTY((tag("GSS_OMP_SINGLE_LAYOUT")))
760{
761 /* [ WORD 1-7 ] : base class */
762
763 /* [ WORD 8 ] */
765};
767struct GTY((tag("GSS_OMP_SINGLE_LAYOUT")))
769{
770 /* No extra fields; adds invariant:
771 stmt->code == GIMPLE_OMP_SINGLE. */
772};
773
774struct GTY((tag("GSS_OMP_PARALLEL_LAYOUT")))
776{
777 /* No extra fields; adds invariant:
778 stmt->code == GIMPLE_OMP_TEAMS. */
779};
780
781struct GTY((tag("GSS_OMP_SINGLE_LAYOUT")))
783{
784 /* No extra fields; adds invariant:
785 stmt->code == GIMPLE_OMP_ORDERED. */
786};
787
788struct GTY((tag("GSS_OMP_SINGLE_LAYOUT")))
790{
791 /* No extra fields; adds invariant:
792 stmt->code == GIMPLE_OMP_SCAN. */
793};
794
795
796/* GIMPLE_OMP_ATOMIC_LOAD.
797 Note: This is based on gimple, not g_s_omp, because g_s_omp
798 contains a sequence, which we don't need here. */
799
800struct GTY((tag("GSS_OMP_ATOMIC_LOAD")))
802{
803 /* [ WORD 1-6 ] : base class */
804
805 /* [ WORD 7-8 ] */
806 tree rhs, lhs;
807};
808
809/* GIMPLE_OMP_ATOMIC_STORE.
810 See note on GIMPLE_OMP_ATOMIC_LOAD. */
811
812struct GTY((tag("GSS_OMP_ATOMIC_STORE_LAYOUT")))
814{
815 /* [ WORD 1-6 ] : base class */
816
817 /* [ WORD 7 ] */
818 tree val;
821struct GTY((tag("GSS_OMP_ATOMIC_STORE_LAYOUT")))
824{
825 /* No extra fields; adds invariant:
826 stmt->code == GIMPLE_OMP_ATOMIC_STORE. */
827};
829struct GTY((tag("GSS_OMP_ATOMIC_STORE_LAYOUT")))
832{
833 /* No extra fields; adds invariant:
834 stmt->code == GIMPLE_OMP_RETURN. */
836
837/* Assumptions. */
839struct GTY((tag("GSS_ASSUME")))
841{
842 /* [ WORD 1-6 ] : base class */
843
844 /* [ WORD 7 ] */
845 tree guard;
846
847 /* [ WORD 8 ] */
851/* GIMPLE_TRANSACTION. */
852
853/* Bits to be stored in the GIMPLE_TRANSACTION subcode. */
855/* The __transaction_atomic was declared [[outer]] or it is
856 __transaction_relaxed. */
857#define GTMA_IS_OUTER (1u << 0)
858#define GTMA_IS_RELAXED (1u << 1)
859#define GTMA_DECLARATION_MASK (GTMA_IS_OUTER | GTMA_IS_RELAXED)
860
861/* The transaction is seen to not have an abort. */
862#define GTMA_HAVE_ABORT (1u << 2)
863/* The transaction is seen to have loads or stores. */
864#define GTMA_HAVE_LOAD (1u << 3)
865#define GTMA_HAVE_STORE (1u << 4)
866/* The transaction MAY enter serial irrevocable mode in its dynamic scope. */
867#define GTMA_MAY_ENTER_IRREVOCABLE (1u << 5)
868/* The transaction WILL enter serial irrevocable mode.
869 An irrevocable block post-dominates the entire transaction, such
870 that all invocations of the transaction will go serial-irrevocable.
871 In such case, we don't bother instrumenting the transaction, and
872 tell the runtime that it should begin the transaction in
873 serial-irrevocable mode. */
874#define GTMA_DOES_GO_IRREVOCABLE (1u << 6)
875/* The transaction contains no instrumentation code whatsoever, most
876 likely because it is guaranteed to go irrevocable upon entry. */
877#define GTMA_HAS_NO_INSTRUMENTATION (1u << 7)
878
879struct GTY((tag("GSS_TRANSACTION")))
881{
882 /* [ WORD 1-9 ] : base class */
884 /* [ WORD 10 ] */
885 gimple_seq body;
886
887 /* [ WORD 11-13 ] */
888 tree label_norm;
889 tree label_uninst;
890 tree label_over;
891};
893#define DEFGSSTRUCT(SYM, STRUCT, HAS_TREE_OP) SYM,
895#include "gsstruct.def"
897};
898#undef DEFGSSTRUCT
899
900/* A statement with the invariant that
901 stmt->code == GIMPLE_COND
902 i.e. a conditional jump statement. */
903
904struct GTY((tag("GSS_WITH_OPS")))
906{
907 /* no additional fields; this uses the layout for GSS_WITH_OPS. */
908 static const enum gimple_code code_ = GIMPLE_COND;
909};
911/* A statement with the invariant that
912 stmt->code == GIMPLE_DEBUG
913 i.e. a debug statement. */
914
915struct GTY((tag("GSS_WITH_OPS")))
917{
918 /* no additional fields; this uses the layout for GSS_WITH_OPS. */
919};
921/* A statement with the invariant that
922 stmt->code == GIMPLE_GOTO
923 i.e. a goto statement. */
924
925struct GTY((tag("GSS_WITH_OPS")))
927{
928 /* no additional fields; this uses the layout for GSS_WITH_OPS. */
929};
930
931/* A statement with the invariant that
932 stmt->code == GIMPLE_LABEL
933 i.e. a label statement. */
934
935struct GTY((tag("GSS_WITH_OPS")))
937{
938 /* no additional fields; this uses the layout for GSS_WITH_OPS. */
939};
940
941/* A statement with the invariant that
942 stmt->code == GIMPLE_SWITCH
943 i.e. a switch statement. */
945struct GTY((tag("GSS_WITH_OPS")))
947{
948 /* no additional fields; this uses the layout for GSS_WITH_OPS. */
949};
950
951/* A statement with the invariant that
952 stmt->code == GIMPLE_ASSIGN
953 i.e. an assignment statement. */
954
955struct GTY((tag("GSS_WITH_MEM_OPS")))
957{
958 static const enum gimple_code code_ = GIMPLE_ASSIGN;
959 /* no additional fields; this uses the layout for GSS_WITH_MEM_OPS. */
961
962/* A statement with the invariant that
963 stmt->code == GIMPLE_RETURN
964 i.e. a return statement. */
965
966struct GTY((tag("GSS_WITH_MEM_OPS")))
969 /* no additional fields; this uses the layout for GSS_WITH_MEM_OPS. */
970};
971
972template <>
973template <>
974inline bool
977 return gs->code == GIMPLE_ASM;
978}
979
980template <>
981template <>
982inline bool
985 return gs->code == GIMPLE_ASSIGN;
986}
987
988template <>
989template <>
990inline bool
993 return gs->code == GIMPLE_ASSIGN;
994}
995
996template <>
997template <>
998inline bool
1001 return gs->code == GIMPLE_BIND;
1002}
1003
1004template <>
1005template <>
1006inline bool
1009 return gs->code == GIMPLE_CALL;
1010}
1011
1012template <>
1013template <>
1014inline bool
1017 return gs->code == GIMPLE_CATCH;
1018}
1019
1020template <>
1021template <>
1022inline bool
1025 return gs->code == GIMPLE_COND;
1026}
1027
1028template <>
1029template <>
1030inline bool
1033 return gs->code == GIMPLE_COND;
1034}
1035
1036template <>
1037template <>
1038inline bool
1041 return gs->code == GIMPLE_DEBUG;
1042}
1043
1044template <>
1045template <>
1046inline bool
1049 return gs->code == GIMPLE_DEBUG;
1050}
1051
1052template <>
1053template <>
1054inline bool
1057 return gs->code == GIMPLE_GOTO;
1058}
1059
1060template <>
1061template <>
1062inline bool
1065 return gs->code == GIMPLE_GOTO;
1066}
1067
1068template <>
1069template <>
1070inline bool
1073 return gs->code == GIMPLE_LABEL;
1074}
1075
1076template <>
1077template <>
1078inline bool
1081 return gs->code == GIMPLE_LABEL;
1082}
1083
1084template <>
1085template <>
1086inline bool
1089 return gs->code == GIMPLE_RESX;
1090}
1091
1092template <>
1093template <>
1094inline bool
1097 return gs->code == GIMPLE_EH_DISPATCH;
1098}
1099
1100template <>
1101template <>
1102inline bool
1105 return gs->code == GIMPLE_EH_ELSE;
1106}
1107
1108template <>
1109template <>
1110inline bool
1113 return gs->code == GIMPLE_EH_ELSE;
1114}
1115
1116template <>
1117template <>
1118inline bool
1121 return gs->code == GIMPLE_EH_FILTER;
1122}
1123
1124template <>
1125template <>
1126inline bool
1129 return gs->code == GIMPLE_EH_MUST_NOT_THROW;
1130}
1131
1132template <>
1133template <>
1134inline bool
1137 return gs->code == GIMPLE_EH_MUST_NOT_THROW;
1138}
1139
1140template <>
1141template <>
1142inline bool
1145 return gs->code == GIMPLE_OMP_ATOMIC_LOAD;
1146}
1147
1148template <>
1149template <>
1150inline bool
1153 return gs->code == GIMPLE_OMP_ATOMIC_STORE;
1154}
1155
1156template <>
1157template <>
1158inline bool
1161 return gs->code == GIMPLE_OMP_RETURN;
1162}
1163
1164template <>
1165template <>
1166inline bool
1168{
1169 return gs->code == GIMPLE_OMP_CONTINUE;
1171
1172template <>
1173template <>
1174inline bool
1176{
1177 return gs->code == GIMPLE_OMP_CRITICAL;
1179
1180template <>
1181template <>
1182inline bool
1184{
1185 return gs->code == GIMPLE_OMP_ORDERED;
1187
1188template <>
1189template <>
1190inline bool
1192{
1193 return gs->code == GIMPLE_OMP_SCAN;
1195
1196template <>
1197template <>
1198inline bool
1200{
1201 return gs->code == GIMPLE_OMP_FOR;
1203
1204template <>
1205template <>
1206inline bool
1208{
1209 return (gs->code == GIMPLE_OMP_PARALLEL
1210 || gs->code == GIMPLE_OMP_TASK
1211 || gs->code == GIMPLE_OMP_TEAMS);
1212}
1213
1214template <>
1215template <>
1216inline bool
1219 return gs->code == GIMPLE_OMP_PARALLEL;
1220}
1221
1222template <>
1223template <>
1224inline bool
1227 return gs->code == GIMPLE_OMP_TARGET;
1228}
1229
1230template <>
1231template <>
1232inline bool
1235 return gs->code == GIMPLE_OMP_SECTIONS;
1236}
1237
1238template <>
1239template <>
1240inline bool
1243 return gs->code == GIMPLE_OMP_SINGLE;
1244}
1245
1246template <>
1247template <>
1248inline bool
1251 return gs->code == GIMPLE_OMP_TEAMS;
1252}
1253
1254template <>
1255template <>
1256inline bool
1259 return gs->code == GIMPLE_OMP_TASK;
1260}
1261
1262template <>
1263template <>
1264inline bool
1267 return gs->code == GIMPLE_PHI;
1268}
1269
1270template <>
1271template <>
1272inline bool
1275 return gs->code == GIMPLE_RETURN;
1276}
1277
1278template <>
1279template <>
1280inline bool
1283 return gs->code == GIMPLE_SWITCH;
1284}
1285
1286template <>
1287template <>
1288inline bool
1291 return gs->code == GIMPLE_SWITCH;
1292}
1293
1294template <>
1295template <>
1296inline bool
1299 return gs->code == GIMPLE_ASSUME;
1300}
1301
1302template <>
1303template <>
1304inline bool
1307 return gs->code == GIMPLE_TRANSACTION;
1308}
1309
1310template <>
1311template <>
1312inline bool
1315 return gs->code == GIMPLE_TRY;
1316}
1317
1318template <>
1319template <>
1320inline bool
1323 return gs->code == GIMPLE_TRY;
1324}
1325
1326template <>
1327template <>
1328inline bool
1331 return gs->code == GIMPLE_WITH_CLEANUP_EXPR;
1332}
1333
1334template <>
1335template <>
1336inline bool
1339 return gs->code == GIMPLE_WITH_CLEANUP_EXPR;
1340}
1341
1342template <>
1343template <>
1344inline bool
1347 return gs->code == GIMPLE_ASM;
1348}
1349
1350template <>
1351template <>
1352inline bool
1355 return gs->code == GIMPLE_BIND;
1356}
1357
1358template <>
1359template <>
1360inline bool
1363 return gs->code == GIMPLE_CALL;
1364}
1365
1366template <>
1367template <>
1368inline bool
1371 return gs->code == GIMPLE_CATCH;
1372}
1373
1374template <>
1375template <>
1376inline bool
1379 return gs->code == GIMPLE_RESX;
1380}
1381
1382template <>
1383template <>
1384inline bool
1387 return gs->code == GIMPLE_EH_DISPATCH;
1388}
1389
1390template <>
1391template <>
1392inline bool
1395 return gs->code == GIMPLE_EH_FILTER;
1396}
1397
1398template <>
1399template <>
1400inline bool
1403 return gs->code == GIMPLE_OMP_ATOMIC_LOAD;
1404}
1405
1406template <>
1407template <>
1408inline bool
1411 return gs->code == GIMPLE_OMP_ATOMIC_STORE;
1412}
1413
1414template <>
1415template <>
1416inline bool
1419 return gs->code == GIMPLE_OMP_RETURN;
1420}
1421
1422template <>
1423template <>
1424inline bool
1426{
1427 return gs->code == GIMPLE_OMP_CONTINUE;
1429
1430template <>
1431template <>
1432inline bool
1434{
1435 return gs->code == GIMPLE_OMP_CRITICAL;
1437
1438template <>
1439template <>
1440inline bool
1442{
1443 return gs->code == GIMPLE_OMP_ORDERED;
1445
1446template <>
1447template <>
1448inline bool
1450{
1451 return gs->code == GIMPLE_OMP_SCAN;
1453
1454template <>
1455template <>
1456inline bool
1458{
1459 return gs->code == GIMPLE_OMP_FOR;
1461
1462template <>
1463template <>
1464inline bool
1466{
1467 return (gs->code == GIMPLE_OMP_PARALLEL
1468 || gs->code == GIMPLE_OMP_TASK
1469 || gs->code == GIMPLE_OMP_TEAMS);
1470}
1471
1472template <>
1473template <>
1474inline bool
1477 return gs->code == GIMPLE_OMP_PARALLEL;
1478}
1479
1480template <>
1481template <>
1482inline bool
1485 return gs->code == GIMPLE_OMP_TARGET;
1486}
1487
1488template <>
1489template <>
1490inline bool
1493 return gs->code == GIMPLE_OMP_SECTIONS;
1494}
1495
1496template <>
1497template <>
1498inline bool
1501 return gs->code == GIMPLE_OMP_SINGLE;
1502}
1503
1504template <>
1505template <>
1506inline bool
1508{
1509 return gs->code == GIMPLE_OMP_TEAMS;
1510}
1511
1512template <>
1513template <>
1514inline bool
1516{
1517 return gs->code == GIMPLE_OMP_TASK;
1519
1520template <>
1521template <>
1522inline bool
1523is_a_helper <const gphi *>::test (const gimple *gs)
1524{
1525 return gs->code == GIMPLE_PHI;
1526}
1527
1528template <>
1529template <>
1530inline bool
1532{
1533 return gs->code == GIMPLE_RETURN;
1534}
1535
1536template <>
1537template <>
1538inline bool
1540{
1541 return gs->code == GIMPLE_ASSUME;
1542}
1543
1544template <>
1545template <>
1546inline bool
1548{
1549 return gs->code == GIMPLE_TRANSACTION;
1550}
1551
1552/* Offset in bytes to the location of the operand vector.
1553 Zero if there is no operand vector for this tuple structure. */
1554extern size_t const gimple_ops_offset_[];
1556/* Map GIMPLE codes to GSS codes. */
1559/* This variable holds the currently expanded gimple statement for purposes
1560 of communicating the profile info to the builtin expanders. */
1562
1563size_t gimple_size (enum gimple_code code, unsigned num_ops = 0);
1564void gimple_init (gimple *g, enum gimple_code code, unsigned num_ops);
1569gcall *gimple_build_call (tree, unsigned, ...);
1570gcall *gimple_build_call_valist (tree, unsigned, va_list);
1571gcall *gimple_build_call_internal (enum internal_fn, unsigned, ...);
1572gcall *gimple_build_call_internal_1 (enum internal_fn fn, unsigned nargs);
1586gimple *gimple_build_nop (void);
1596 enum gimple_try_flags);
1610 tree, tree);
1629 enum omp_memory_order);
1633extern void gimple_seq_add_stmt (gimple_seq *, gimple *);
1638 location_t);
1639extern void annotate_all_with_location (gimple_seq, location_t);
1642bool gimple_call_same_target_p (const gimple *, const gimple *);
1643int gimple_call_flags (const gimple *);
1644int gimple_call_arg_flags (const gcall *, unsigned);
1645int gimple_call_retslot_flags (const gcall *);
1647int gimple_call_return_flags (const gcall *);
1648bool gimple_call_nonnull_result_p (const gcall *);
1650bool gimple_assign_copy_p (const gimple *);
1652bool gimple_assign_unary_nop_p (const gimple *);
1653bool gimple_assign_load_p (const gimple *);
1657 tree, tree, tree);
1658tree gimple_get_lhs (const gimple *);
1659void gimple_set_lhs (gimple *, tree);
1660gimple *gimple_copy (const gimple *);
1661void gimple_move_vops (gimple *, const gimple *);
1662bool gimple_has_side_effects (const gimple *);
1663bool gimple_could_trap_p_1 (const gimple *, bool, bool);
1664bool gimple_could_trap_p (const gimple *);
1666extern void dump_gimple_statistics (void);
1667unsigned get_gimple_rhs_num_ops (enum tree_code);
1677extern bool gimple_call_builtin_p (const gimple *, enum built_in_class);
1678extern bool gimple_call_builtin_p (const gimple *, enum built_in_function);
1679extern bool gimple_asm_clobbers_memory_p (const gasm *);
1680extern void dump_decl_set (FILE *, const_bitmap);
1681extern bool nonfreeing_call_p (const gimple *);
1682extern bool nonbarrier_call_p (const gimple *);
1683extern bool infer_nonnull_range (gimple *, tree);
1685extern bool infer_nonnull_range_by_attribute (const gimple *, tree,
1686 tree * = NULL, tree * = NULL);
1689extern void gimple_seq_set_location (gimple_seq, location_t);
1690extern void gimple_seq_discard (gimple_seq);
1691extern void maybe_remove_unused_call_args (struct function *, gimple *);
1692extern bool gimple_inexpensive_call_p (const gcall *);
1693extern bool stmt_can_terminate_bb_p (gimple *);
1696
1697/* Return the disposition for a warning (or all warnings by default)
1698 for a statement. */
1699extern bool warning_suppressed_p (const gimple *, opt_code = all_warnings)
1700 ATTRIBUTE_NONNULL (1);
1701/* Set the disposition for a warning (or all warnings by default)
1702 at a location to enabled by default. */
1703extern void suppress_warning (gimple *, opt_code = all_warnings,
1704 bool = true) ATTRIBUTE_NONNULL (1);
1705
1706/* Copy the warning disposition mapping from one statement to another. */
1707extern void copy_warning (gimple *, const gimple *)
1708 ATTRIBUTE_NONNULL (1) ATTRIBUTE_NONNULL (2);
1709/* Copy the warning disposition mapping from an expression to a statement. */
1710extern void copy_warning (gimple *, const_tree)
1711 ATTRIBUTE_NONNULL (1) ATTRIBUTE_NONNULL (2);
1712/* Copy the warning disposition mapping from a statement to an expression. */
1713extern void copy_warning (tree, const gimple *)
1714 ATTRIBUTE_NONNULL (1) ATTRIBUTE_NONNULL (2);
1715
1716/* Formal (expression) temporary table handling: multiple occurrences of
1717 the same scalar expression are evaluated into the same temporary. */
1718
1719typedef struct gimple_temp_hash_elt
1720{
1721 tree val; /* Key */
1722 tree temp; /* Value */
1723} elt_t;
1724
1725/* Get the number of the next statement uid to be allocated. */
1726inline unsigned int
1727gimple_stmt_max_uid (struct function *fn)
1728{
1729 return fn->last_stmt_uid;
1730}
1732/* Set the number of the next statement uid to be allocated. */
1733inline void
1734set_gimple_stmt_max_uid (struct function *fn, unsigned int maxid)
1735{
1736 fn->last_stmt_uid = maxid;
1737}
1738
1739/* Set the number of the next statement uid to be allocated. */
1740inline unsigned int
1742{
1743 return fn->last_stmt_uid++;
1744}
1745
1746/* Return the first node in GIMPLE sequence S. */
1747
1748inline gimple_seq_node
1751 return s;
1752}
1753
1754
1755/* Return the first statement in GIMPLE sequence S. */
1756
1757inline gimple *
1761 return n;
1762}
1763
1764/* Return the first statement in GIMPLE sequence S as a gbind *,
1765 verifying that it has code GIMPLE_BIND in a checked build. */
1766
1767inline gbind *
1772}
1773
1774
1775/* Return the last node in GIMPLE sequence S. */
1777inline gimple_seq_node
1779{
1780 return s ? s->prev : NULL;
1781}
1782
1783
1784/* Return the last statement in GIMPLE sequence S. */
1785
1786inline gimple *
1791}
1792
1794/* Set the last node in GIMPLE sequence *PS to LAST. */
1795
1796inline void
1798{
1799 (*ps)->prev = last;
1800}
1802
1803/* Set the first node in GIMPLE sequence *PS to FIRST. */
1804
1805inline void
1807{
1808 *ps = first;
1809}
1810
1812/* Return true if GIMPLE sequence S is empty. */
1813
1814inline bool
1816{
1817 return s == NULL;
1818}
1819
1820/* Allocate a new sequence and initialize its first element with STMT. */
1821
1822inline gimple_seq
1824{
1825 gimple_seq seq = NULL;
1826 gimple_seq_add_stmt (&seq, stmt);
1827 return seq;
1828}
1829
1831/* Returns the sequence of statements in BB. */
1832
1833inline gimple_seq
1835{
1836 return (!(bb->flags & BB_RTL)) ? bb->il.gimple.seq : NULL;
1837}
1838
1839inline gimple_seq *
1841{
1842 return (!(bb->flags & BB_RTL)) ? &bb->il.gimple.seq : NULL;
1843}
1844
1845/* Sets the sequence of statements in BB to SEQ. */
1846
1847inline void
1849{
1850 gcc_checking_assert (!(bb->flags & BB_RTL));
1851 bb->il.gimple.seq = seq;
1852}
1853
1854
1855/* Return the code for GIMPLE statement G. */
1856
1857inline enum gimple_code
1858gimple_code (const gimple *g)
1859{
1860 return g->code;
1861}
1862
1863
1864/* Return the GSS code used by a GIMPLE code. */
1865
1867gss_for_code (enum gimple_code code)
1868{
1869 gcc_gimple_checking_assert ((unsigned int)code < LAST_AND_UNUSED_GIMPLE_CODE);
1870 return gss_for_code_[code];
1871}
1872
1873
1874/* Return which GSS code is used by GS. */
1875
1877gimple_statement_structure (const gimple *gs)
1878{
1880}
1881
1882
1883/* Return true if statement G has sub-statements. This is only true for
1884 High GIMPLE statements. */
1885
1886inline bool
1887gimple_has_substatements (const gimple *g)
1889 switch (gimple_code (g))
1890 {
1891 case GIMPLE_ASSUME:
1892 case GIMPLE_BIND:
1893 case GIMPLE_CATCH:
1894 case GIMPLE_EH_FILTER:
1895 case GIMPLE_EH_ELSE:
1896 case GIMPLE_TRY:
1897 case GIMPLE_OMP_FOR:
1898 case GIMPLE_OMP_MASTER:
1899 case GIMPLE_OMP_MASKED:
1900 case GIMPLE_OMP_TASKGROUP:
1901 case GIMPLE_OMP_ORDERED:
1902 case GIMPLE_OMP_SECTION:
1903 case GIMPLE_OMP_STRUCTURED_BLOCK:
1904 case GIMPLE_OMP_PARALLEL:
1905 case GIMPLE_OMP_TASK:
1906 case GIMPLE_OMP_SCOPE:
1907 case GIMPLE_OMP_DISPATCH:
1908 case GIMPLE_OMP_SECTIONS:
1909 case GIMPLE_OMP_SINGLE:
1910 case GIMPLE_OMP_TARGET:
1911 case GIMPLE_OMP_TEAMS:
1912 case GIMPLE_OMP_CRITICAL:
1913 case GIMPLE_WITH_CLEANUP_EXPR:
1914 case GIMPLE_TRANSACTION:
1915 return true;
1917 default:
1918 return false;
1919 }
1920}
1921
1922
1923/* Return the basic block holding statement G. */
1925inline basic_block
1926gimple_bb (const gimple *g)
1927{
1928 return g->bb;
1929}
1930
1931
1932/* Return the lexical scope block holding statement G. */
1933
1934inline tree
1936{
1937 return LOCATION_BLOCK (g->location);
1938}
1939
1940/* Forward declare. */
1941inline void gimple_set_location (gimple *, location_t);
1942
1943/* Set BLOCK to be the lexical scope block holding statement G. */
1945inline void
1946gimple_set_block (gimple *g, tree block)
1947{
1948 gimple_set_location (g, set_block (g->location, block));
1949}
1950
1951/* Return location information for statement G. */
1952
1953inline location_t
1954gimple_location (const gimple *g)
1955{
1956 return g->location;
1957}
1958
1959/* Return location information for statement G if g is not NULL.
1960 Otherwise, UNKNOWN_LOCATION is returned. */
1961
1962inline location_t
1963gimple_location_safe (const gimple *g)
1964{
1965 return g ? gimple_location (g) : UNKNOWN_LOCATION;
1966}
1968/* Set location information for statement G. */
1969
1970inline void
1971gimple_set_location (gimple *g, location_t location)
1972{
1973 /* Copy the no-warning data to the statement location. */
1974 if (g->location != UNKNOWN_LOCATION)
1975 copy_warning (location, g->location);
1976 g->location = location;
1977}
1978
1979/* Return address of the location information for statement G. */
1980
1981inline location_t *
1982gimple_location_ptr (gimple *g)
1983{
1984 return &g->location;
1986
1987
1988/* Return true if G contains location information. */
1989
1990inline bool
1991gimple_has_location (const gimple *g)
1992{
1995
1996
1997/* Return non-artificial location information for statement G. */
1998
1999inline location_t
2000gimple_nonartificial_location (const gimple *g)
2001{
2002 location_t *ploc = NULL;
2003
2004 if (tree block = gimple_block (g))
2005 ploc = block_nonartificial_location (block);
2006
2007 return ploc ? *ploc : gimple_location (g);
2008}
2009
2010
2011/* Return the file name of the location of STMT. */
2012
2013inline const char *
2014gimple_filename (const gimple *stmt)
2015{
2016 return LOCATION_FILE (gimple_location (stmt));
2017}
2018
2019
2020/* Return the line number of the location of STMT. */
2021
2022inline int
2023gimple_lineno (const gimple *stmt)
2024{
2025 return LOCATION_LINE (gimple_location (stmt));
2026}
2027
2028
2029/* Determine whether SEQ is a singleton. */
2030
2031inline bool
2033{
2034 return ((gimple_seq_first (seq) != NULL)
2035 && (gimple_seq_first (seq) == gimple_seq_last (seq)));
2036}
2037
2038/* Return true if no warnings should be emitted for statement STMT. */
2039
2040inline bool
2041gimple_no_warning_p (const gimple *stmt)
2042{
2043 return stmt->no_warning;
2044}
2045
2046/* Set the no_warning flag of STMT to NO_WARNING. */
2047
2048inline void
2049gimple_set_no_warning (gimple *stmt, bool no_warning)
2050{
2051 stmt->no_warning = (unsigned) no_warning;
2052}
2053
2054/* Set the visited status on statement STMT to VISITED_P.
2056 Please note that this 'visited' property of the gimple statement is
2057 supposed to be undefined at pass boundaries. This means that a
2058 given pass should not assume it contains any useful value when the
2059 pass starts and thus can set it to any value it sees fit.
2060
2061 You can learn more about the visited property of the gimple
2062 statement by reading the comments of the 'visited' data member of
2063 struct gimple.
2064 */
2065
2066inline void
2067gimple_set_visited (gimple *stmt, bool visited_p)
2068{
2069 stmt->visited = (unsigned) visited_p;
2070}
2071
2072
2073/* Return the visited status for statement STMT.
2074
2075 Please note that this 'visited' property of the gimple statement is
2076 supposed to be undefined at pass boundaries. This means that a
2077 given pass should not assume it contains any useful value when the
2078 pass starts and thus can set it to any value it sees fit.
2079
2080 You can learn more about the visited property of the gimple
2081 statement by reading the comments of the 'visited' data member of
2082 struct gimple. */
2083
2084inline bool
2085gimple_visited_p (const gimple *stmt)
2086{
2087 return stmt->visited;
2088}
2090
2091/* Set pass local flag PLF on statement STMT to VAL_P.
2092
2093 Please note that this PLF property of the gimple statement is
2094 supposed to be undefined at pass boundaries. This means that a
2095 given pass should not assume it contains any useful value when the
2096 pass starts and thus can set it to any value it sees fit.
2097
2098 You can learn more about the PLF property by reading the comment of
2099 the 'plf' data member of struct gimple_statement_structure. */
2100
2101inline void
2102gimple_set_plf (gimple *stmt, enum plf_mask plf, bool val_p)
2104 if (val_p)
2105 stmt->plf |= (unsigned int) plf;
2106 else
2107 stmt->plf &= ~((unsigned int) plf);
2108}
2109
2110
2111/* Return the value of pass local flag PLF on statement STMT.
2113 Please note that this 'plf' property of the gimple statement is
2114 supposed to be undefined at pass boundaries. This means that a
2115 given pass should not assume it contains any useful value when the
2116 pass starts and thus can set it to any value it sees fit.
2117
2118 You can learn more about the plf property by reading the comment of
2119 the 'plf' data member of struct gimple_statement_structure. */
2120
2121inline unsigned int
2122gimple_plf (const gimple *stmt, enum plf_mask plf)
2123{
2124 return stmt->plf & ((unsigned int) plf);
2125}
2126
2127
2128/* Set the UID of statement.
2129
2130 Please note that this UID property is supposed to be undefined at
2131 pass boundaries. This means that a given pass should not assume it
2132 contains any useful value when the pass starts and thus can set it
2133 to any value it sees fit. */
2134
2135inline void
2136gimple_set_uid (gimple *g, unsigned uid)
2137{
2138 g->uid = uid;
2139}
2140
2141
2142/* Return the UID of statement.
2143
2144 Please note that this UID property is supposed to be undefined at
2145 pass boundaries. This means that a given pass should not assume it
2146 contains any useful value when the pass starts and thus can set it
2147 to any value it sees fit. */
2148
2149inline unsigned
2150gimple_uid (const gimple *g)
2151{
2152 return g->uid;
2153}
2155
2156/* Make statement G a singleton sequence. */
2157
2158inline void
2160{
2161 g->next = NULL;
2162 g->prev = g;
2163}
2164
2165
2166/* Return true if GIMPLE statement G has register or memory operands. */
2167
2168inline bool
2169gimple_has_ops (const gimple *g)
2171 return gimple_code (g) >= GIMPLE_COND && gimple_code (g) <= GIMPLE_RETURN;
2172}
2173
2174template <>
2175template <>
2176inline bool
2179 return gimple_has_ops (gs);
2180}
2181
2182template <>
2183template <>
2184inline bool
2187 return gimple_has_ops (gs);
2188}
2189
2190template <>
2191template <>
2192inline bool
2194{
2195 return gimple_has_ops (gs);
2196}
2197
2198template <>
2199template <>
2200inline bool
2202{
2203 return gimple_has_ops (gs);
2204}
2205
2206/* Return true if GIMPLE statement G has memory operands. */
2207
2208inline bool
2209gimple_has_mem_ops (const gimple *g)
2211 return gimple_code (g) >= GIMPLE_ASSIGN && gimple_code (g) <= GIMPLE_RETURN;
2212}
2213
2214template <>
2215template <>
2216inline bool
2218{
2219 return gimple_has_mem_ops (gs);
2220}
2221
2222template <>
2223template <>
2224inline bool
2226{
2227 return gimple_has_mem_ops (gs);
2228}
2229
2230/* Return the set of USE operands for statement G. */
2231
2232inline struct use_optype_d *
2233gimple_use_ops (const gimple *g)
2235 const gimple_statement_with_ops_base *ops_stmt =
2237 if (!ops_stmt)
2238 return NULL;
2239 return ops_stmt->use_ops;
2240}
2241
2242
2243/* Set USE to be the set of USE operands for statement G. */
2244
2245inline void
2247{
2250 ops_stmt->use_ops = use;
2251}
2252
2253
2254/* Return the single VUSE operand of the statement G. */
2255
2256inline tree
2257gimple_vuse (const gimple *g)
2259 const gimple_statement_with_memory_ops *mem_ops_stmt =
2261 if (!mem_ops_stmt)
2262 return NULL_TREE;
2263 return mem_ops_stmt->vuse;
2264}
2265
2266/* Return the single VDEF operand of the statement G. */
2267
2268inline tree
2269gimple_vdef (const gimple *g)
2270{
2271 const gimple_statement_with_memory_ops *mem_ops_stmt =
2273 if (!mem_ops_stmt)
2274 return NULL_TREE;
2275 return mem_ops_stmt->vdef;
2276}
2277
2278/* Return the single VUSE operand of the statement G. */
2279
2280inline tree *
2282{
2283 gimple_statement_with_memory_ops *mem_ops_stmt =
2285 if (!mem_ops_stmt)
2286 return NULL;
2287 return &mem_ops_stmt->vuse;
2288}
2289
2290/* Return the single VDEF operand of the statement G. */
2291
2292inline tree *
2294{
2295 gimple_statement_with_memory_ops *mem_ops_stmt =
2297 if (!mem_ops_stmt)
2298 return NULL;
2299 return &mem_ops_stmt->vdef;
2300}
2301
2302/* Set the single VUSE operand of the statement G. */
2303
2304inline void
2305gimple_set_vuse (gimple *g, tree vuse)
2306{
2307 gimple_statement_with_memory_ops *mem_ops_stmt =
2309 mem_ops_stmt->vuse = vuse;
2310}
2311
2312/* Set the single VDEF operand of the statement G. */
2313
2314inline void
2315gimple_set_vdef (gimple *g, tree vdef)
2316{
2317 gimple_statement_with_memory_ops *mem_ops_stmt =
2319 mem_ops_stmt->vdef = vdef;
2320}
2322
2323/* Return true if statement G has operands and the modified field has
2324 been set. */
2325
2326inline bool
2327gimple_modified_p (const gimple *g)
2328{
2329 return (gimple_has_ops (g)) ? (bool) g->modified : false;
2331
2332
2333/* Set the MODIFIED flag to MODIFIEDP, iff the gimple statement G has
2334 a MODIFIED field. */
2335
2336inline void
2337gimple_set_modified (gimple *s, bool modifiedp)
2339 if (gimple_has_ops (s))
2340 {
2341 s->modified = (unsigned) modifiedp;
2342 // Mark the LHS as out of date with the current range query.
2343 if (modifiedp)
2344 {
2345 tree def = gimple_get_lhs (s);
2346 if (def && TREE_CODE (def) == SSA_NAME)
2348 }
2349 }
2350}
2351
2352
2353/* Return true if statement STMT contains volatile operands. */
2354
2355inline bool
2356gimple_has_volatile_ops (const gimple *stmt)
2358 if (gimple_has_mem_ops (stmt))
2359 return stmt->has_volatile_ops;
2360 else
2361 return false;
2362}
2363
2364
2365/* Set the HAS_VOLATILE_OPS flag to VOLATILEP. */
2366
2367inline void
2369{
2370 if (gimple_has_mem_ops (stmt))
2371 stmt->has_volatile_ops = (unsigned) volatilep;
2372}
2373
2374/* Return true if STMT is in a transaction. */
2375
2376inline bool
2377gimple_in_transaction (const gimple *stmt)
2378{
2380}
2381
2382/* Return true if statement STMT may access memory. */
2383
2384inline bool
2385gimple_references_memory_p (const gimple *stmt)
2386{
2387 return gimple_has_mem_ops (stmt) && gimple_vuse (stmt);
2388}
2390
2391/* Return the subcode for OMP statement S. */
2392
2393inline unsigned
2394gimple_omp_subcode (const gimple *s)
2395{
2396 gcc_gimple_checking_assert (gimple_code (s) >= GIMPLE_OMP_ATOMIC_LOAD
2397 && gimple_code (s) <= GIMPLE_OMP_ORDERED);
2398 return s->subcode;
2399}
2401/* Set the subcode for OMP statement S to SUBCODE. */
2402
2403inline void
2404gimple_omp_set_subcode (gimple *s, unsigned int subcode)
2405{
2406 /* We only have 16 bits for the subcode. Assert that we are not
2407 overflowing it. */
2408 gcc_gimple_checking_assert (subcode < (1 << 16));
2409 s->subcode = subcode;
2410}
2412/* Set the nowait flag on OMP_RETURN statement S. */
2413
2414inline void
2416{
2417 GIMPLE_CHECK (s, GIMPLE_OMP_RETURN);
2418 s->subcode |= GF_OMP_RETURN_NOWAIT;
2419}
2420
2421
2422/* Return true if OMP return statement G has the GF_OMP_RETURN_NOWAIT
2423 flag set. */
2424
2425inline bool
2427{
2428 GIMPLE_CHECK (g, GIMPLE_OMP_RETURN);
2429 return (gimple_omp_subcode (g) & GF_OMP_RETURN_NOWAIT) != 0;
2430}
2431
2432
2433/* Set the LHS of OMP return. */
2434
2435inline void
2437{
2438 gimple_statement_omp_return *omp_return_stmt =
2440 omp_return_stmt->val = lhs;
2441}
2442
2443
2444/* Get the LHS of OMP return. */
2445
2446inline tree
2448{
2449 const gimple_statement_omp_return *omp_return_stmt =
2451 return omp_return_stmt->val;
2452}
2453
2455/* Return a pointer to the LHS of OMP return. */
2456
2457inline tree *
2459{
2460 gimple_statement_omp_return *omp_return_stmt =
2462 return &omp_return_stmt->val;
2463}
2464
2466/* Return true if OMP section statement G has the GF_OMP_SECTION_LAST
2467 flag set. */
2468
2469inline bool
2471{
2472 GIMPLE_CHECK (g, GIMPLE_OMP_SECTION);
2473 return (gimple_omp_subcode (g) & GF_OMP_SECTION_LAST) != 0;
2474}
2475
2477/* Set the GF_OMP_SECTION_LAST flag on G. */
2478
2479inline void
2481{
2482 GIMPLE_CHECK (g, GIMPLE_OMP_SECTION);
2483 g->subcode |= GF_OMP_SECTION_LAST;
2484}
2485
2486
2487/* Return true if OMP ordered construct is stand-alone
2488 (G has the GF_OMP_ORDERED_STANDALONE flag set). */
2489
2490inline bool
2492{
2493 GIMPLE_CHECK (g, GIMPLE_OMP_ORDERED);
2495}
2496
2497
2498/* Set the GF_OMP_ORDERED_STANDALONE flag on G. */
2499
2500inline void
2502{
2503 GIMPLE_CHECK (g, GIMPLE_OMP_ORDERED);
2504 g->subcode |= GF_OMP_ORDERED_STANDALONE;
2505}
2506
2507
2508/* Return true if OMP parallel statement G has the
2509 GF_OMP_PARALLEL_COMBINED flag set. */
2510
2511inline bool
2512gimple_omp_parallel_combined_p (const gimple *g)
2514 GIMPLE_CHECK (g, GIMPLE_OMP_PARALLEL);
2516}
2517
2518
2519/* Set the GF_OMP_PARALLEL_COMBINED field in G depending on the boolean
2520 value of COMBINED_P. */
2521
2522inline void
2523gimple_omp_parallel_set_combined_p (gimple *g, bool combined_p)
2525 GIMPLE_CHECK (g, GIMPLE_OMP_PARALLEL);
2526 if (combined_p)
2527 g->subcode |= GF_OMP_PARALLEL_COMBINED;
2528 else
2529 g->subcode &= ~GF_OMP_PARALLEL_COMBINED;
2530}
2531
2532
2533/* Return true if OMP atomic load/store statement G has the
2534 GF_OMP_ATOMIC_NEED_VALUE flag set. */
2536inline bool
2538{
2539 if (gimple_code (g) != GIMPLE_OMP_ATOMIC_LOAD)
2540 GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
2542}
2543
2544
2545/* Set the GF_OMP_ATOMIC_NEED_VALUE flag on G. */
2546
2547inline void
2549{
2550 if (gimple_code (g) != GIMPLE_OMP_ATOMIC_LOAD)
2551 GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
2552 g->subcode |= GF_OMP_ATOMIC_NEED_VALUE;
2553}
2554
2555
2556/* Return true if OMP atomic load/store statement G has the
2557 GF_OMP_ATOMIC_WEAK flag set. */
2558
2559inline bool
2561{
2562 if (gimple_code (g) != GIMPLE_OMP_ATOMIC_LOAD)
2563 GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
2564 return (gimple_omp_subcode (g) & GF_OMP_ATOMIC_WEAK) != 0;
2565}
2566
2567
2568/* Set the GF_OMP_ATOMIC_WEAK flag on G. */
2569
2570inline void
2572{
2573 if (gimple_code (g) != GIMPLE_OMP_ATOMIC_LOAD)
2574 GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
2575 g->subcode |= GF_OMP_ATOMIC_WEAK;
2576}
2578
2579/* Return the memory order of the OMP atomic load/store statement G. */
2580
2581inline enum omp_memory_order
2583{
2584 if (gimple_code (g) != GIMPLE_OMP_ATOMIC_LOAD)
2585 GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
2586 return (enum omp_memory_order)
2588}
2589
2590
2591/* Set the memory order on G. */
2592
2593inline void
2595{
2596 if (gimple_code (g) != GIMPLE_OMP_ATOMIC_LOAD)
2597 GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
2598 g->subcode = ((g->subcode & ~GF_OMP_ATOMIC_MEMORY_ORDER)
2599 | (int (mo) & GF_OMP_ATOMIC_MEMORY_ORDER));
2600}
2602
2603/* Return the number of operands for statement GS. */
2604
2605inline unsigned
2606gimple_num_ops (const gimple *gs)
2607{
2608 return gs->num_ops;
2609}
2610
2611
2612/* Set the number of operands for statement GS. */
2613
2614inline void
2615gimple_set_num_ops (gimple *gs, unsigned num_ops)
2616{
2617 gs->num_ops = num_ops;
2618}
2619
2620
2621/* Return the array of operands for statement GS. */
2622
2623inline const tree *
2624gimple_ops (const gimple *gs)
2625{
2626 size_t off;
2627
2628 /* All the tuples have their operand vector at the very bottom
2629 of the structure. Note that those structures that do not
2630 have an operand vector have a zero offset. */
2632 gcc_gimple_checking_assert (off != 0);
2633
2634 return (const tree *) ((const char *) gs + off);
2635}
2636
2637inline tree *
2638gimple_ops (gimple *gs)
2639{
2640 /* Avoid repeating the code above. */
2641 return const_cast <tree *> (gimple_ops (const_cast <const gimple *> (gs)));
2642}
2644
2645/* Return operand I for statement GS. */
2646
2647inline tree
2648gimple_op (const gimple *gs, unsigned i)
2649{
2650 if (gimple_has_ops (gs))
2651 {
2653 return gimple_ops (gs)[i];
2654 }
2655 else
2656 return NULL_TREE;
2657}
2658
2659/* Return a pointer to operand I for statement GS. */
2661inline tree *
2662gimple_op_ptr (gimple *gs, unsigned i)
2663{
2664 if (gimple_has_ops (gs))
2665 {
2667 return gimple_ops (gs) + i;
2668 }
2669 else
2670 return NULL;
2671}
2672
2673/* Set operand I of statement GS to OP. */
2674
2675inline void
2676gimple_set_op (gimple *gs, unsigned i, tree op)
2677{
2679
2680 /* Note. It may be tempting to assert that OP matches
2681 is_gimple_operand, but that would be wrong. Different tuples
2682 accept slightly different sets of tree operands. Each caller
2683 should perform its own validation. */
2684 gimple_ops (gs)[i] = op;
2685}
2686
2687/* Return true if GS is a GIMPLE_ASSIGN. */
2688
2689inline bool
2690is_gimple_assign (const gimple *gs)
2691{
2692 return gimple_code (gs) == GIMPLE_ASSIGN;
2693}
2694
2695/* Determine if expression CODE is one of the valid expressions that can
2696 be used on the RHS of GIMPLE assignments. */
2697
2698inline enum gimple_rhs_class
2700{
2701 return (enum gimple_rhs_class) gimple_rhs_class_table[(int) code];
2702}
2703
2704/* Return the LHS of assignment statement GS. */
2705
2706inline tree
2707gimple_assign_lhs (const gassign *gs)
2708{
2709 return gs->op[0];
2710}
2712inline tree
2713gimple_assign_lhs (const gimple *gs)
2714{
2715 const gassign *ass = GIMPLE_CHECK2<const gassign *> (gs);
2716 return gimple_assign_lhs (ass);
2718
2719
2720/* Return a pointer to the LHS of assignment statement GS. */
2721
2722inline tree *
2723gimple_assign_lhs_ptr (gassign *gs)
2724{
2725 return &gs->op[0];
2726}
2727
2728inline tree *
2730{
2732 return gimple_assign_lhs_ptr (ass);
2733}
2735
2736/* Set LHS to be the LHS operand of assignment statement GS. */
2737
2738inline void
2740{
2741 gs->op[0] = lhs;
2742
2743 if (lhs && TREE_CODE (lhs) == SSA_NAME)
2744 SSA_NAME_DEF_STMT (lhs) = gs;
2745}
2746
2747inline void
2748gimple_assign_set_lhs (gimple *gs, tree lhs)
2751 gimple_assign_set_lhs (ass, lhs);
2752}
2753
2754
2755/* Return the first operand on the RHS of assignment statement GS. */
2756
2757inline tree
2758gimple_assign_rhs1 (const gassign *gs)
2759{
2760 return gs->op[1];
2761}
2762
2763inline tree
2764gimple_assign_rhs1 (const gimple *gs)
2765{
2766 const gassign *ass = GIMPLE_CHECK2<const gassign *> (gs);
2767 return gimple_assign_rhs1 (ass);
2768}
2770
2771/* Return a pointer to the first operand on the RHS of assignment
2772 statement GS. */
2773
2774inline tree *
2776{
2777 return &gs->op[1];
2778}
2779
2780inline tree *
2782{
2784 return gimple_assign_rhs1_ptr (ass);
2785}
2786
2787/* Set RHS to be the first operand on the RHS of assignment statement GS. */
2788
2789inline void
2791{
2792 gs->op[1] = rhs;
2793}
2794
2795inline void
2796gimple_assign_set_rhs1 (gimple *gs, tree rhs)
2799 gimple_assign_set_rhs1 (ass, rhs);
2800}
2801
2802
2803/* Return the second operand on the RHS of assignment statement GS.
2804 If GS does not have two operands, NULL is returned instead. */
2805
2806inline tree
2807gimple_assign_rhs2 (const gassign *gs)
2808{
2809 if (gimple_num_ops (gs) >= 3)
2810 return gs->op[2];
2811 else
2812 return NULL_TREE;
2813}
2815inline tree
2816gimple_assign_rhs2 (const gimple *gs)
2817{
2818 const gassign *ass = GIMPLE_CHECK2<const gassign *> (gs);
2819 return gimple_assign_rhs2 (ass);
2820}
2821
2822
2823/* Return a pointer to the second operand on the RHS of assignment
2824 statement GS. */
2825
2826inline tree *
2828{
2830 return &gs->op[2];
2831}
2832
2833inline tree *
2835{
2837 return gimple_assign_rhs2_ptr (ass);
2838}
2839
2841/* Set RHS to be the second operand on the RHS of assignment statement GS. */
2842
2843inline void
2845{
2847 gs->op[2] = rhs;
2848}
2849
2850inline void
2852{
2854 return gimple_assign_set_rhs2 (ass, rhs);
2855}
2856
2857/* Return the third operand on the RHS of assignment statement GS.
2858 If GS does not have two operands, NULL is returned instead. */
2859
2860inline tree
2861gimple_assign_rhs3 (const gassign *gs)
2862{
2863 if (gimple_num_ops (gs) >= 4)
2864 return gs->op[3];
2865 else
2866 return NULL_TREE;
2867}
2869inline tree
2870gimple_assign_rhs3 (const gimple *gs)
2871{
2872 const gassign *ass = GIMPLE_CHECK2<const gassign *> (gs);
2873 return gimple_assign_rhs3 (ass);
2874}
2875
2876/* Return a pointer to the third operand on the RHS of assignment
2877 statement GS. */
2879inline tree *
2881{
2883 return &gs->op[3];
2884}
2885
2886inline tree *
2891}
2892
2893
2894/* Set RHS to be the third operand on the RHS of assignment statement GS. */
2896inline void
2898{
2900 gs->op[3] = rhs;
2901}
2902
2903inline void
2904gimple_assign_set_rhs3 (gimple *gs, tree rhs)
2905{
2906 gassign *ass = GIMPLE_CHECK2<gassign *> (gs);
2908}
2909
2910
2911/* A wrapper around 3 operand gimple_assign_set_rhs_with_ops, for callers
2912 which expect to see only two operands. */
2913
2914inline void
2915gimple_assign_set_rhs_with_ops (gimple_stmt_iterator *gsi, enum tree_code code,
2916 tree op1, tree op2)
2917{
2918 gimple_assign_set_rhs_with_ops (gsi, code, op1, op2, NULL);
2919}
2921/* A wrapper around 3 operand gimple_assign_set_rhs_with_ops, for callers
2922 which expect to see only one operands. */
2923
2924inline void
2926 tree op1)
2927{
2928 gimple_assign_set_rhs_with_ops (gsi, code, op1, NULL, NULL);
2929}
2930
2931/* Returns true if GS is a nontemporal move. */
2932
2933inline bool
2935{
2936 return gs->nontemporal_move;
2937}
2938
2939/* Sets nontemporal move flag of GS to NONTEMPORAL. */
2940
2941inline void
2942gimple_assign_set_nontemporal_move (gimple *gs, bool nontemporal)
2944 GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
2945 gs->nontemporal_move = nontemporal;
2946}
2947
2948
2949/* Return the code of the expression computed on the rhs of assignment
2950 statement GS. In case that the RHS is a single object, returns the
2951 tree code of the object. */
2952
2953inline enum tree_code
2954gimple_assign_rhs_code (const gassign *gs)
2956 enum tree_code code = (enum tree_code) gs->subcode;
2957 /* While we initially set subcode to the TREE_CODE of the rhs for
2958 GIMPLE_SINGLE_RHS assigns we do not update that subcode to stay
2959 in sync when we rewrite stmts into SSA form or do SSA propagations. */
2961 code = TREE_CODE (gs->op[1]);
2962
2963 return code;
2965
2966inline enum tree_code
2967gimple_assign_rhs_code (const gimple *gs)
2968{
2969 const gassign *ass = GIMPLE_CHECK2<const gassign *> (gs);
2970 return gimple_assign_rhs_code (ass);
2971}
2972
2974/* Set CODE to be the code for the expression computed on the RHS of
2975 assignment S. */
2976
2977inline void
2979{
2980 GIMPLE_CHECK (s, GIMPLE_ASSIGN);
2981 s->subcode = code;
2982}
2983
2984
2985/* Return the gimple rhs class of the code of the expression computed on
2986 the rhs of assignment statement GS.
2987 This will never return GIMPLE_INVALID_RHS. */
2988
2991{
2993}
2994
2995/* Return true if GS is an assignment with a singleton RHS, i.e.,
2996 there is no operator associated with the assignment itself.
2997 Unlike gimple_assign_copy_p, this predicate returns true for
2998 any RHS operand, including those that perform an operation
2999 and do not have the semantics of a copy, such as COND_EXPR. */
3000
3001inline bool
3003{
3004 return (is_gimple_assign (gs)
3006}
3008/* Return true if GS performs a store to its lhs. */
3009
3010inline bool
3011gimple_store_p (const gimple *gs)
3012{
3013 tree lhs = gimple_get_lhs (gs);
3014 return lhs && !is_gimple_reg (lhs);
3016
3017/* Return true if S is a type-cast assignment. */
3018
3019inline bool
3020gimple_assign_cast_p (const gimple *s)
3022 if (is_gimple_assign (s))
3023 {
3025 return CONVERT_EXPR_CODE_P (sc)
3026 || sc == VIEW_CONVERT_EXPR
3027 || sc == FIX_TRUNC_EXPR;
3028 }
3029
3030 return false;
3032
3033/* Return true if S is a clobber statement. */
3034
3035inline bool
3036gimple_clobber_p (const gimple *s)
3038 return gimple_assign_single_p (s)
3040}
3041
3042/* Return true if S is a clobber statement. */
3043
3044inline bool
3045gimple_clobber_p (const gimple *s, enum clobber_kind kind)
3046{
3048 && CLOBBER_KIND (gimple_assign_rhs1 (s)) == kind;
3049}
3050
3051/* Return true if GS is a GIMPLE_CALL. */
3052
3053inline bool
3054is_gimple_call (const gimple *gs)
3056 return gimple_code (gs) == GIMPLE_CALL;
3057}
3058
3059/* Return the LHS of call statement GS. */
3060
3061inline tree
3062gimple_call_lhs (const gcall *gs)
3063{
3064 return gs->op[0];
3065}
3067inline tree
3068gimple_call_lhs (const gimple *gs)
3069{
3070 const gcall *gc = GIMPLE_CHECK2<const gcall *> (gs);
3071 return gimple_call_lhs (gc);
3073
3074
3075/* Return a pointer to the LHS of call statement GS. */
3076
3077inline tree *
3078gimple_call_lhs_ptr (gcall *gs)
3079{
3080 return &gs->op[0];
3082
3083inline tree *
3084gimple_call_lhs_ptr (gimple *gs)
3085{
3086 gcall *gc = GIMPLE_CHECK2<gcall *> (gs);
3087 return gimple_call_lhs_ptr (gc);
3088}
3090
3091/* Set LHS to be the LHS operand of call statement GS. */
3092
3093inline void
3095{
3096 gs->op[0] = lhs;
3097 if (lhs && TREE_CODE (lhs) == SSA_NAME)
3098 SSA_NAME_DEF_STMT (lhs) = gs;
3099}
3101inline void
3103{
3104 gcall *gc = GIMPLE_CHECK2<gcall *> (gs);
3105 gimple_call_set_lhs (gc, lhs);
3106}
3108
3109/* Return true if call GS calls an internal-only function, as enumerated
3110 by internal_fn. */
3111
3112inline bool
3113gimple_call_internal_p (const gcall *gs)
3114{
3115 return (gs->subcode & GF_CALL_INTERNAL) != 0;
3117
3118inline bool
3119gimple_call_internal_p (const gimple *gs)
3120{
3121 const gcall *gc = GIMPLE_CHECK2<const gcall *> (gs);
3123}
3124
3125/* Return true if call GS is marked as nocf_check. */
3126
3127inline bool
3128gimple_call_nocf_check_p (const gcall *gs)
3129{
3130 return (gs->subcode & GF_CALL_NOCF_CHECK) != 0;
3132
3133/* Mark statement GS as nocf_check call. */
3134
3135inline void
3136gimple_call_set_nocf_check (gcall *gs, bool nocf_check)
3137{
3138 if (nocf_check)
3140 else
3141 gs->subcode &= ~GF_CALL_NOCF_CHECK;
3143
3144/* Return the target of internal call GS. */
3145
3146inline enum internal_fn
3147gimple_call_internal_fn (const gcall *gs)
3148{
3150 return gs->u.internal_fn;
3152
3153inline enum internal_fn
3154gimple_call_internal_fn (const gimple *gs)
3155{
3156 const gcall *gc = GIMPLE_CHECK2<const gcall *> (gs);
3157 return gimple_call_internal_fn (gc);
3158}
3159
3160/* Return true, if this internal gimple call is unique. */
3162inline bool
3164{
3165 return gimple_call_internal_fn (gs) == IFN_UNIQUE;
3166}
3168inline bool
3170{
3171 const gcall *gc = GIMPLE_CHECK2<const gcall *> (gs);
3173}
3174
3175/* Return true if GS is an internal function FN. */
3176
3177inline bool
3179{
3180 return (is_gimple_call (gs)
3182 && gimple_call_internal_fn (gs) == fn);
3183}
3184
3185/* If CTRL_ALTERING_P is true, mark GIMPLE_CALL S to be a stmt
3186 that could alter control flow. */
3187
3188inline void
3189gimple_call_set_ctrl_altering (gcall *s, bool ctrl_altering_p)
3190{
3191 if (ctrl_altering_p)
3192 s->subcode |= GF_CALL_CTRL_ALTERING;
3193 else
3195}
3196
3197inline void
3198gimple_call_set_ctrl_altering (gimple *s, bool ctrl_altering_p)
3199{
3200 gcall *gc = GIMPLE_CHECK2<gcall *> (s);
3201 gimple_call_set_ctrl_altering (gc, ctrl_altering_p);
3202}
3203
3204/* Return true if call GS calls an func whose GF_CALL_CTRL_ALTERING
3205 flag is set. Such call could not be a stmt in the middle of a bb. */
3206
3207inline bool
3209{
3210 return (gs->subcode & GF_CALL_CTRL_ALTERING) != 0;
3212
3213inline bool
3214gimple_call_ctrl_altering_p (const gimple *gs)
3215{
3216 const gcall *gc = GIMPLE_CHECK2<const gcall *> (gs);
3217 return gimple_call_ctrl_altering_p (gc);
3218}
3219
3220
3221/* Return the function type of the function called by GS. */
3222
3223inline tree
3224gimple_call_fntype (const gcall *gs)
3225{
3226 if (gimple_call_internal_p (gs))
3228 return gs->u.fntype;
3229}
3230
3231inline tree
3232gimple_call_fntype (const gimple *gs)
3233{
3234 const gcall *call_stmt = GIMPLE_CHECK2<const gcall *> (gs);
3235 return gimple_call_fntype (call_stmt);
3236}
3238/* Set the type of the function called by CALL_STMT to FNTYPE. */
3239
3240inline void
3241gimple_call_set_fntype (gcall *call_stmt, tree fntype)
3242{
3244 call_stmt->u.fntype = fntype;
3245}
3246
3248/* Return the tree node representing the function called by call
3249 statement GS. */
3250
3251inline tree
3252gimple_call_fn (const gcall *gs)
3253{
3254 return gs->op[1];
3256
3257inline tree
3258gimple_call_fn (const gimple *gs)
3259{
3260 const gcall *gc = GIMPLE_CHECK2<const gcall *> (gs);
3261 return gimple_call_fn (gc);
3262}
3263
3264/* Return a pointer to the tree node representing the function called by call
3265 statement GS. */
3266
3267inline tree *
3269{
3270 return &gs->op[1];
3271}
3272
3273inline tree *
3274gimple_call_fn_ptr (gimple *gs)
3275{
3276 gcall *gc = GIMPLE_CHECK2<gcall *> (gs);
3278}
3279
3280
3281/* Set FN to be the function called by call statement GS. */
3282
3283inline void
3285{
3287 gs->op[1] = fn;
3288}
3289
3290
3291/* Set FNDECL to be the function called by call statement GS. */
3292
3293inline void
3295{
3297 gs->op[1] = build1_loc (gimple_location (gs), ADDR_EXPR,
3299}
3300
3301inline void
3302gimple_call_set_fndecl (gimple *gs, tree decl)
3303{
3304 gcall *gc = GIMPLE_CHECK2<gcall *> (gs);
3305 gimple_call_set_fndecl (gc, decl);
3306}
3307
3308
3309/* Set internal function FN to be the function called by call statement CALL_STMT. */
3310
3311inline void
3312gimple_call_set_internal_fn (gcall *call_stmt, enum internal_fn fn)
3313{
3315 call_stmt->u.internal_fn = fn;
3316}
3317
3318
3319/* If a given GIMPLE_CALL's callee is a FUNCTION_DECL, return it.
3320 Otherwise return NULL. This function is analogous to
3321 get_callee_fndecl in tree land. */
3322
3323inline tree
3324gimple_call_fndecl (const gcall *gs)
3327}
3328
3329inline tree
3330gimple_call_fndecl (const gimple *gs)
3331{
3332 const gcall *gc = GIMPLE_CHECK2<const gcall *> (gs);
3334}
3335
3336
3337/* Return the type returned by call statement GS. */
3338
3339inline tree
3340gimple_call_return_type (const gcall *gs)
3341{
3343
3344 if (type == NULL_TREE)
3345 return TREE_TYPE (gimple_call_lhs (gs));
3346
3347 /* The type returned by a function is the type of its
3348 function type. */
3349 return TREE_TYPE (type);
3350}
3351
3352
3353/* Return the static chain for call statement GS. */
3354
3355inline tree
3356gimple_call_chain (const gcall *gs)
3357{
3358 return gs->op[2];
3359}
3360
3361inline tree
3362gimple_call_chain (const gimple *gs)
3363{
3364 const gcall *gc = GIMPLE_CHECK2<const gcall *> (gs);
3366}
3367
3368
3369/* Return a pointer to the static chain for call statement CALL_STMT. */
3370
3371inline tree *
3372gimple_call_chain_ptr (gcall *call_stmt)
3373{
3374 return &call_stmt->op[2];
3375}
3377/* Set CHAIN to be the static chain for call statement CALL_STMT. */
3378
3379inline void
3381{
3382 call_stmt->op[2] = chain;
3384
3385
3386/* Return the number of arguments used by call statement GS. */
3387
3388inline unsigned
3389gimple_call_num_args (const gcall *gs)
3390{
3391 return gimple_num_ops (gs) - 3;
3392}
3394inline unsigned
3395gimple_call_num_args (const gimple *gs)
3396{
3397 const gcall *gc = GIMPLE_CHECK2<const gcall *> (gs);
3398 return gimple_call_num_args (gc);
3399}
3401
3402/* Return the argument at position INDEX for call statement GS. */
3403
3404inline tree
3405gimple_call_arg (const gcall *gs, unsigned index)
3406{
3407 gcc_gimple_checking_assert (gimple_num_ops (gs) > index + 3);
3408 return gs->op[index + 3];
3409}
3410
3411inline tree
3412gimple_call_arg (const gimple *gs, unsigned index)
3413{
3414 const gcall *gc = GIMPLE_CHECK2<const gcall *> (gs);
3415 return gimple_call_arg (gc, index);
3416}
3417
3418
3419/* Return a pointer to the argument at position INDEX for call
3420 statement GS. */
3421
3422inline tree *
3423gimple_call_arg_ptr (gcall *gs, unsigned index)
3425 gcc_gimple_checking_assert (gimple_num_ops (gs) > index + 3);
3426 return &gs->op[index + 3];
3427}
3428
3429inline tree *
3430gimple_call_arg_ptr (gimple *gs, unsigned index)
3431{
3433 return gimple_call_arg_ptr (gc, index);
3434}
3435
3436
3437/* Set ARG to be the argument at position INDEX for call statement GS. */
3438
3439inline void
3440gimple_call_set_arg (gcall *gs, unsigned index, tree arg)
3441{
3442 gcc_gimple_checking_assert (gimple_num_ops (gs) > index + 3);
3443 gs->op[index + 3] = arg;
3445
3446inline void
3447gimple_call_set_arg (gimple *gs, unsigned index, tree arg)
3448{
3449 gcall *gc = GIMPLE_CHECK2<gcall *> (gs);
3450 gimple_call_set_arg (gc, index, arg);
3451}
3452
3453
3454/* If TAIL_P is true, mark call statement S as being a tail call
3455 (i.e., a call just before the exit of a function). These calls are
3456 candidate for tail call optimization. */
3457
3458inline void
3459gimple_call_set_tail (gcall *s, bool tail_p)
3460{
3461 if (tail_p)
3462 s->subcode |= GF_CALL_TAILCALL;
3463 else
3464 s->subcode &= ~GF_CALL_TAILCALL;
3465}
3467
3468/* Return true if GIMPLE_CALL S is marked as a tail call. */
3469
3470inline bool
3471gimple_call_tail_p (const gcall *s)
3472{
3473 return (s->subcode & GF_CALL_TAILCALL) != 0;
3474}
3475
3476/* Mark (or clear) call statement S as requiring tail call optimization. */
3477
3478inline void
3479gimple_call_set_must_tail (gcall *s, bool must_tail_p)
3480{
3481 if (must_tail_p)
3482 s->subcode |= GF_CALL_MUST_TAIL_CALL;
3483 else
3484 s->subcode &= ~GF_CALL_MUST_TAIL_CALL;
3485}
3486
3487/* Return true if call statement has been marked as requiring
3488 tail call optimization. */
3489
3490inline bool
3492{
3493 return (s->subcode & GF_CALL_MUST_TAIL_CALL) != 0;
3494}
3495
3496/* If RETURN_SLOT_OPT_P is true mark GIMPLE_CALL S as valid for return
3497 slot optimization. This transformation uses the target of the call
3498 expansion as the return slot for calls that return in memory. */
3499
3500inline void
3501gimple_call_set_return_slot_opt (gcall *s, bool return_slot_opt_p)
3502{
3503 if (return_slot_opt_p)
3504 s->subcode |= GF_CALL_RETURN_SLOT_OPT;
3505 else
3506 s->subcode &= ~GF_CALL_RETURN_SLOT_OPT;
3507}
3508
3509
3510/* Return true if S is marked for return slot optimization. */
3512inline bool
3514{
3515 return (s->subcode & GF_CALL_RETURN_SLOT_OPT) != 0;
3516}
3517
3518
3519/* If FROM_THUNK_P is true, mark GIMPLE_CALL S as being the jump from a
3520 thunk to the thunked-to function. */
3522inline void
3523gimple_call_set_from_thunk (gcall *s, bool from_thunk_p)
3524{
3525 if (from_thunk_p)
3526 s->subcode |= GF_CALL_FROM_THUNK;
3527 else
3528 s->subcode &= ~GF_CALL_FROM_THUNK;
3529}
3530
3531
3532/* Return true if GIMPLE_CALL S is a jump from a thunk. */
3533
3534inline bool
3536{
3537 return (s->subcode & GF_CALL_FROM_THUNK) != 0;
3538}
3539
3540
3541/* If FROM_NEW_OR_DELETE_P is true, mark GIMPLE_CALL S as being a call
3542 to operator new or delete created from a new or delete expression. */
3544inline void
3545gimple_call_set_from_new_or_delete (gcall *s, bool from_new_or_delete_p)
3546{
3547 if (from_new_or_delete_p)
3548 s->subcode |= GF_CALL_FROM_NEW_OR_DELETE;
3549 else
3550 s->subcode &= ~GF_CALL_FROM_NEW_OR_DELETE;
3551}
3552
3553
3554/* Return true if GIMPLE_CALL S is a call to operator new or delete from
3555 from a new or delete expression. */
3556
3557inline bool
3558gimple_call_from_new_or_delete (const gcall *s)
3559{
3560 return (s->subcode & GF_CALL_FROM_NEW_OR_DELETE) != 0;
3561}
3562
3563
3564/* If PASS_ARG_PACK_P is true, GIMPLE_CALL S is a stdarg call that needs the
3565 argument pack in its argument list. */
3566
3567inline void
3568gimple_call_set_va_arg_pack (gcall *s, bool pass_arg_pack_p)
3569{
3570 if (pass_arg_pack_p)
3571 s->subcode |= GF_CALL_VA_ARG_PACK;
3572 else
3573 s->subcode &= ~GF_CALL_VA_ARG_PACK;
3574}
3575
3576
3577/* Return true if GIMPLE_CALL S is a stdarg call that needs the
3578 argument pack in its argument list. */
3579
3580inline bool
3582{
3583 return (s->subcode & GF_CALL_VA_ARG_PACK) != 0;
3584}
3585
3586
3587/* Return true if S is a noreturn call. */
3588
3589inline bool
3590gimple_call_noreturn_p (const gcall *s)
3591{
3592 return (gimple_call_flags (s) & ECF_NORETURN) != 0;
3594
3595inline bool
3596gimple_call_noreturn_p (const gimple *s)
3597{
3598 const gcall *gc = GIMPLE_CHECK2<const gcall *> (s);
3599 return gimple_call_noreturn_p (gc);
3600}
3601
3602
3603/* If NOTHROW_P is true, GIMPLE_CALL S is a call that is known to not throw
3604 even if the called function can throw in other cases. */
3605
3606inline void
3607gimple_call_set_nothrow (gcall *s, bool nothrow_p)
3608{
3609 if (nothrow_p)
3610 s->subcode |= GF_CALL_NOTHROW;
3611 else
3612 s->subcode &= ~GF_CALL_NOTHROW;
3613}
3614
3615/* Return true if S is a nothrow call. */
3616
3617inline bool
3619{
3620 return (gimple_call_flags (s) & ECF_NOTHROW) != 0;
3622
3623/* If EXPECTED_THROW_P is true, GIMPLE_CALL S is a call that is known
3624 to be more likely to throw than to run forever, terminate the
3625 program or return by other means. */
3626
3627static inline void
3628gimple_call_set_expected_throw (gcall *s, bool expected_throw_p)
3629{
3630 if (expected_throw_p)
3631 s->subcode |= GF_CALL_XTHROW;
3632 else
3633 s->subcode &= ~GF_CALL_XTHROW;
3634}
3635
3636/* Return true if S is a call that is more likely to end by
3637 propagating an exception than by other means. */
3638
3639static inline bool
3640gimple_call_expected_throw_p (const gcall *s)
3641{
3642 return (gimple_call_flags (s) & ECF_XTHROW) != 0;
3643}
3644
3645/* If FOR_VAR is true, GIMPLE_CALL S is a call to builtin_alloca that
3646 is known to be emitted for VLA objects. Those are wrapped by
3647 stack_save/stack_restore calls and hence can't lead to unbounded
3648 stack growth even when they occur in loops. */
3649
3650inline void
3651gimple_call_set_alloca_for_var (gcall *s, bool for_var)
3652{
3653 if (for_var)
3654 s->subcode |= GF_CALL_ALLOCA_FOR_VAR;
3655 else
3656 s->subcode &= ~GF_CALL_ALLOCA_FOR_VAR;
3657}
3658
3659/* Return true of S is a call to builtin_alloca emitted for VLA objects. */
3661inline bool
3663{
3664 return (s->subcode & GF_CALL_ALLOCA_FOR_VAR) != 0;
3665}
3666
3667inline bool
3669{
3670 const gcall *gc = GIMPLE_CHECK2<const gcall *> (s);
3671 return (gc->subcode & GF_CALL_ALLOCA_FOR_VAR) != 0;
3672}
3673
3674/* If BY_DESCRIPTOR_P is true, GIMPLE_CALL S is an indirect call for which
3675 pointers to nested function are descriptors instead of trampolines. */
3676
3677inline void
3678gimple_call_set_by_descriptor (gcall *s, bool by_descriptor_p)
3679{
3680 if (by_descriptor_p)
3681 s->subcode |= GF_CALL_BY_DESCRIPTOR;
3682 else
3683 s->subcode &= ~GF_CALL_BY_DESCRIPTOR;
3684}
3686/* Return true if S is a by-descriptor call. */
3687
3688inline bool
3690{
3691 return (s->subcode & GF_CALL_BY_DESCRIPTOR) != 0;
3692}
3693
3694/* Copy all the GF_CALL_* flags from ORIG_CALL to DEST_CALL. */
3696inline void
3697gimple_call_copy_flags (gcall *dest_call, const gcall *orig_call)
3698{
3699 dest_call->subcode = orig_call->subcode;
3700}
3701
3702
3703/* Return a pointer to the points-to solution for the set of call-used
3704 variables of the call CALL_STMT. */
3705
3706inline struct pt_solution *
3707gimple_call_use_set (gcall *call_stmt)
3709 return &call_stmt->call_used;
3710}
3711
3712/* As above, but const. */
3713
3714inline const pt_solution *
3715gimple_call_use_set (const gcall *call_stmt)
3716{
3717 return &call_stmt->call_used;
3718}
3719
3720/* Return a pointer to the points-to solution for the set of call-used
3721 variables of the call CALL_STMT. */
3722
3723inline struct pt_solution *
3725{
3726 return &call_stmt->call_clobbered;
3727}
3728
3729/* As above, but const. */
3730
3731inline const pt_solution *
3732gimple_call_clobber_set (const gcall *call_stmt)
3733{
3734 return &call_stmt->call_clobbered;
3735}
3736
3737
3738/* Returns true if this is a GIMPLE_ASSIGN or a GIMPLE_CALL with a
3739 non-NULL lhs. */
3741inline bool
3742gimple_has_lhs (const gimple *stmt)
3743{
3744 if (is_gimple_assign (stmt))
3745 return true;
3746 if (const gcall *call = dyn_cast <const gcall *> (stmt))
3747 return gimple_call_lhs (call) != NULL_TREE;
3748 return false;
3749}
3751
3752/* Return the code of the predicate computed by conditional statement GS. */
3753
3754inline enum tree_code
3755gimple_cond_code (const gcond *gs)
3756{
3757 return (enum tree_code) gs->subcode;
3758}
3760inline enum tree_code
3761gimple_cond_code (const gimple *gs)
3762{
3763 const gcond *gc = GIMPLE_CHECK2<const gcond *> (gs);
3764 return gimple_cond_code (gc);
3765}
3766
3767
3768/* Set CODE to be the predicate code for the conditional statement GS. */
3769
3770inline void
3771gimple_cond_set_code (gcond *gs, enum tree_code code)
3772{
3774 gs->subcode = code;
3775}
3776
3777
3778/* Return the LHS of the predicate computed by conditional statement GS. */
3779
3780inline tree
3781gimple_cond_lhs (const gcond *gs)
3782{
3783 return gs->op[0];
3785
3786inline tree
3787gimple_cond_lhs (const gimple *gs)
3788{
3789 const gcond *gc = GIMPLE_CHECK2<const gcond *> (gs);
3790 return gimple_cond_lhs (gc);
3791}
3792
3793/* Return the pointer to the LHS of the predicate computed by conditional
3794 statement GS. */
3795
3796inline tree *
3798{
3799 return &gs->op[0];
3800}
3801
3802/* Set LHS to be the LHS operand of the predicate computed by
3803 conditional statement GS. */
3805inline void
3807{
3808 gs->op[0] = lhs;
3809}
3810
3811
3812/* Return the RHS operand of the predicate computed by conditional GS. */
3813
3814inline tree
3815gimple_cond_rhs (const gcond *gs)
3816{
3817 return gs->op[1];
3818}
3819
3820inline tree
3821gimple_cond_rhs (const gimple *gs)
3822{
3823 const gcond *gc = GIMPLE_CHECK2<const gcond *> (gs);
3824 return gimple_cond_rhs (gc);
3825}
3826
3827/* Return the pointer to the RHS operand of the predicate computed by
3828 conditional GS. */
3829
3830inline tree *
3831gimple_cond_rhs_ptr (gcond *gs)
3832{
3833 return &gs->op[1];
3835
3836
3837/* Set RHS to be the RHS operand of the predicate computed by
3838 conditional statement GS. */
3839
3840inline void
3841gimple_cond_set_rhs (gcond *gs, tree rhs)
3842{
3843 gs->op[1] = rhs;
3844}
3845
3846
3847/* Return the label used by conditional statement GS when its
3848 predicate evaluates to true. */
3849
3850inline tree
3851gimple_cond_true_label (const gcond *gs)
3852{
3853 return gs->op[2];
3855
3856
3857/* Set LABEL to be the label used by conditional statement GS when its
3858 predicate evaluates to true. */
3859
3860inline void
3861gimple_cond_set_true_label (gcond *gs, tree label)
3862{
3863 gs->op[2] = label;
3864}
3866
3867/* Set LABEL to be the label used by conditional statement GS when its
3868 predicate evaluates to false. */
3869
3870inline void
3872{
3873 gs->op[3] = label;
3874}
3875
3876
3877/* Return the label used by conditional statement GS when its
3878 predicate evaluates to false. */
3879
3880inline tree
3881gimple_cond_false_label (const gcond *gs)
3882{
3883 return gs->op[3];
3884}
3885
3886
3887/* Set the conditional COND_STMT to be of the form 'if (0 != 0)'. */
3888
3889inline void
3891{
3894 gs->subcode = NE_EXPR;
3895}
3896
3897
3898/* Set the conditional COND_STMT to be of the form 'if (1 != 0)'. */
3899
3900inline void
3901gimple_cond_make_true (gcond *gs)
3902{
3905 gs->subcode = NE_EXPR;
3906}
3907
3908/* Check if conditional statement GS is of the form 'if (1 == 1)',
3909 'if (0 == 0)', 'if (1 != 0)' or 'if (0 != 1)' */
3910
3911inline bool
3912gimple_cond_true_p (const gcond *gs)
3913{
3914 tree lhs = gimple_cond_lhs (gs);
3915 tree rhs = gimple_cond_rhs (gs);
3916 enum tree_code code = gimple_cond_code (gs);
3917
3919 return false;
3920
3922 return false;
3923
3924 if (code == NE_EXPR && lhs != rhs)
3925 return true;
3926
3927 if (code == EQ_EXPR && lhs == rhs)
3928 return true;
3930 return false;
3931}
3932
3933/* Check if conditional statement GS is in the caonical form of 'if (1 != 0)'. */
3934
3935inline bool
3936gimple_cond_true_canonical_p (const gcond *gs)
3937{
3938 tree lhs = gimple_cond_lhs (gs);
3939 tree rhs = gimple_cond_rhs (gs);
3941 if (code == NE_EXPR
3943 && rhs == boolean_false_node)
3944 return true;
3945 return false;
3946}
3947
3948/* Check if conditional statement GS is of the form 'if (1 != 1)',
3949 'if (0 != 0)', 'if (1 == 0)' or 'if (0 == 1)' */
3950
3951inline bool
3952gimple_cond_false_p (const gcond *gs)
3953{
3954 tree lhs = gimple_cond_lhs (gs);
3955 tree rhs = gimple_cond_rhs (gs);
3956 enum tree_code code = gimple_cond_code (gs);
3957
3959 return false;
3961 if (rhs != boolean_true_node && rhs != boolean_false_node)
3962 return false;
3963
3964 if (code == NE_EXPR && lhs == rhs)
3965 return true;
3966
3967 if (code == EQ_EXPR && lhs != rhs)
3968 return true;
3969
3970 return false;
3971}
3972
3973/* Check if conditional statement GS is in the caonical form of 'if (0 != 0)'. */
3974
3975inline bool
3976gimple_cond_false_canonical_p (const gcond *gs)
3978 tree lhs = gimple_cond_lhs (gs);
3979 tree rhs = gimple_cond_rhs (gs);
3980 tree_code code = gimple_cond_code (gs);
3981 if (code == NE_EXPR
3982 && lhs == boolean_false_node
3983 && rhs == boolean_false_node)
3984 return true;
3985 return false;
3986}
3988/* Set the code, LHS and RHS of GIMPLE_COND STMT from CODE, LHS and RHS. */
3989
3990inline void
3991gimple_cond_set_condition (gcond *stmt, enum tree_code code, tree lhs,
3992 tree rhs)
3993{
3994 gimple_cond_set_code (stmt, code);
3995 gimple_cond_set_lhs (stmt, lhs);
3997}
3998
3999
4000/* Return the tree code for the expression computed by STMT. This is
4001 only valid for GIMPLE_COND, GIMPLE_CALL and GIMPLE_ASSIGN. For
4002 GIMPLE_CALL, return CALL_EXPR as the expression code for
4003 consistency. This is useful when the caller needs to deal with the
4004 three kinds of computation that GIMPLE supports. */
4005
4006inline enum tree_code
4007gimple_expr_code (const gimple *stmt)
4008{
4009 if (const gassign *ass = dyn_cast<const gassign *> (stmt))
4010 return gimple_assign_rhs_code (ass);
4011 if (const gcond *cond = dyn_cast<const gcond *> (stmt))
4012 return gimple_cond_code (cond);
4013 else
4014 {
4016 return CALL_EXPR;
4017 }
4018}
4019
4020
4021/* Return the LABEL_DECL node used by GIMPLE_LABEL statement GS. */
4022
4023inline tree
4024gimple_label_label (const glabel *gs)
4026 return gs->op[0];
4027}
4028
4029
4030/* Set LABEL to be the LABEL_DECL node used by GIMPLE_LABEL statement
4031 GS. */
4032
4033inline void
4034gimple_label_set_label (glabel *gs, tree label)
4036 gs->op[0] = label;
4037}
4038
4039
4040/* Return the destination of the unconditional jump GS. */
4041
4042inline tree
4043gimple_goto_dest (const gimple *gs)
4044{
4045 GIMPLE_CHECK (gs, GIMPLE_GOTO);
4046 return gimple_op (gs, 0);
4047}
4048
4049
4050/* Set DEST to be the destination of the unconditional jump GS. */
4051
4052inline void
4054{
4055 gs->op[0] = dest;
4056}
4057
4058
4059/* Return the variables declared in the GIMPLE_BIND statement GS. */
4061inline tree
4062gimple_bind_vars (const gbind *bind_stmt)
4063{
4064 return bind_stmt->vars;
4065}
4066
4067
4068/* Set VARS to be the set of variables declared in the GIMPLE_BIND
4069 statement GS. */
4070
4071inline void
4072gimple_bind_set_vars (gbind *bind_stmt, tree vars)
4073{
4074 bind_stmt->vars = vars;
4075}
4076
4077
4078/* Append VARS to the set of variables declared in the GIMPLE_BIND
4079 statement GS. */
4080
4081inline void
4082gimple_bind_append_vars (gbind *bind_stmt, tree vars)
4083{
4084 bind_stmt->vars = chainon (bind_stmt->vars, vars);
4085}
4086
4087
4089gimple_bind_body_ptr (gbind *bind_stmt)
4090{
4091 return &bind_stmt->body;
4092}
4093
4094/* Return the GIMPLE sequence contained in the GIMPLE_BIND statement GS. */
4095
4096inline gimple_seq
4097gimple_bind_body (const gbind *gs)
4099 return *gimple_bind_body_ptr (const_cast <gbind *> (gs));
4100}
4101
4102
4103/* Set SEQ to be the GIMPLE sequence contained in the GIMPLE_BIND
4104 statement GS. */
4105
4106inline void
4107gimple_bind_set_body (gbind *bind_stmt, gimple_seq seq)
4108{
4109 bind_stmt->body = seq;
4110}
4111
4112
4113/* Append a statement to the end of a GIMPLE_BIND's body. */
4114
4115inline void
4116gimple_bind_add_stmt (gbind *bind_stmt, gimple *stmt)
4117{
4118 gimple_seq_add_stmt (&bind_stmt->body, stmt);
4119}
4120
4121
4122/* Append a sequence of statements to the end of a GIMPLE_BIND's body. */
4123
4124inline void
4125gimple_bind_add_seq (gbind *bind_stmt, gimple_seq seq)
4126{
4127 gimple_seq_add_seq (&bind_stmt->body, seq);
4128}
4129
4130
4131/* Return the TREE_BLOCK node associated with GIMPLE_BIND statement
4132 GS. This is analogous to the BIND_EXPR_BLOCK field in trees. */
4133
4134inline tree
4135gimple_bind_block (const gbind *bind_stmt)
4136{
4137 return bind_stmt->block;
4138}
4139
4140
4141/* Set BLOCK to be the TREE_BLOCK node associated with GIMPLE_BIND
4142 statement GS. */
4144inline void
4145gimple_bind_set_block (gbind *bind_stmt, tree block)
4146{
4148 || TREE_CODE (block) == BLOCK);
4149 bind_stmt->block = block;
4150}
4151
4153/* Return the number of input operands for GIMPLE_ASM ASM_STMT. */
4154
4155inline unsigned
4156gimple_asm_ninputs (const gasm *asm_stmt)
4157{
4158 return asm_stmt->ni;
4159}
4160
4161
4162/* Return the number of output operands for GIMPLE_ASM ASM_STMT. */
4164inline unsigned
4165gimple_asm_noutputs (const gasm *asm_stmt)
4166{
4167 return asm_stmt->no;
4168}
4169
4170
4171/* Return the number of clobber operands for GIMPLE_ASM ASM_STMT. */
4173inline unsigned
4174gimple_asm_nclobbers (const gasm *asm_stmt)
4175{
4176 return asm_stmt->nc;
4177}
4178
4179/* Return the number of label operands for GIMPLE_ASM ASM_STMT. */
4180
4181inline unsigned
4182gimple_asm_nlabels (const gasm *asm_stmt)
4184 return asm_stmt->nl;
4185}
4186
4187/* Return input operand INDEX of GIMPLE_ASM ASM_STMT. */
4188
4189inline tree
4190gimple_asm_input_op (const gasm *asm_stmt, unsigned index)
4191{
4192 gcc_gimple_checking_assert (index < asm_stmt->ni);
4193 return asm_stmt->op[index + asm_stmt->no];
4194}
4195
4196/* Set IN_OP to be input operand INDEX in GIMPLE_ASM ASM_STMT. */
4197
4198inline void
4199gimple_asm_set_input_op (gasm *asm_stmt, unsigned index, tree in_op)
4200{
4201 gcc_gimple_checking_assert (index < asm_stmt->ni
4202 && TREE_CODE (in_op) == TREE_LIST);
4203 asm_stmt->op[index + asm_stmt->no] = in_op;
4204}
4205
4206
4207/* Return output operand INDEX of GIMPLE_ASM ASM_STMT. */
4208
4209inline tree
4210gimple_asm_output_op (const gasm *asm_stmt, unsigned index)
4211{
4212 gcc_gimple_checking_assert (index < asm_stmt->no);
4213 return asm_stmt->op[index];
4214}
4215
4216/* Set OUT_OP to be output operand INDEX in GIMPLE_ASM ASM_STMT. */
4217
4218inline void
4219gimple_asm_set_output_op (gasm *asm_stmt, unsigned index, tree out_op)
4220{
4221 gcc_gimple_checking_assert (index < asm_stmt->no
4222 && TREE_CODE (out_op) == TREE_LIST);
4223 asm_stmt->op[index] = out_op;
4224}
4225
4226
4227/* Return clobber operand INDEX of GIMPLE_ASM ASM_STMT. */
4228
4229inline tree
4230gimple_asm_clobber_op (const gasm *asm_stmt, unsigned index)
4231{
4232 gcc_gimple_checking_assert (index < asm_stmt->nc);
4233 return asm_stmt->op[index + asm_stmt->ni + asm_stmt->no];
4234}
4235
4236
4237/* Set CLOBBER_OP to be clobber operand INDEX in GIMPLE_ASM ASM_STMT. */
4238
4239inline void
4240gimple_asm_set_clobber_op (gasm *asm_stmt, unsigned index, tree clobber_op)
4242 gcc_gimple_checking_assert (index < asm_stmt->nc
4243 && TREE_CODE (clobber_op) == TREE_LIST);
4244 asm_stmt->op[index + asm_stmt->ni + asm_stmt->no] = clobber_op;
4245}
4246
4247/* Return label operand INDEX of GIMPLE_ASM ASM_STMT. */
4248
4249inline tree
4250gimple_asm_label_op (const gasm *asm_stmt, unsigned index)
4251{
4252 gcc_gimple_checking_assert (index < asm_stmt->nl);
4253 return asm_stmt->op[index + asm_stmt->no + asm_stmt->ni + asm_stmt->nc];
4254}
4255
4256/* Set LABEL_OP to be label operand INDEX in GIMPLE_ASM ASM_STMT. */
4257
4258inline void
4259gimple_asm_set_label_op (gasm *asm_stmt, unsigned index, tree label_op)
4260{
4261 gcc_gimple_checking_assert (index < asm_stmt->nl
4262 && TREE_CODE (label_op) == TREE_LIST);
4263 asm_stmt->op[index + asm_stmt->no + asm_stmt->ni + asm_stmt->nc] = label_op;
4264}
4265
4266/* Return the string representing the assembly instruction in
4267 GIMPLE_ASM ASM_STMT. */
4268
4269inline const char *
4270gimple_asm_string (const gasm *asm_stmt)
4271{
4272 return asm_stmt->string;
4273}
4274
4276/* Return true if ASM_STMT is marked volatile. */
4277
4278inline bool
4279gimple_asm_volatile_p (const gasm *asm_stmt)
4280{
4281 return (asm_stmt->subcode & GF_ASM_VOLATILE) != 0;
4282}
4283
4284
4285/* If VOLATILE_P is true, mark asm statement ASM_STMT as volatile. */
4286
4287inline void
4288gimple_asm_set_volatile (gasm *asm_stmt, bool volatile_p)
4289{
4290 if (volatile_p)
4291 asm_stmt->subcode |= GF_ASM_VOLATILE;
4292 else
4293 asm_stmt->subcode &= ~GF_ASM_VOLATILE;
4294}
4295
4297/* Return true if ASM_STMT is marked inline. */
4298
4299inline bool
4300gimple_asm_inline_p (const gasm *asm_stmt)
4301{
4302 return (asm_stmt->subcode & GF_ASM_INLINE) != 0;
4303}
4304
4306/* If INLINE_P is true, mark asm statement ASM_STMT as inline. */
4307
4308inline void
4309gimple_asm_set_inline (gasm *asm_stmt, bool inline_p)
4310{
4311 if (inline_p)
4312 asm_stmt->subcode |= GF_ASM_INLINE;
4313 else
4314 asm_stmt->subcode &= ~GF_ASM_INLINE;
4316
4317
4318/* Mark whether asm ASM_STMT is a basic asm or an extended asm, based on
4319 BASIC_P. */
4320
4321inline void
4322gimple_asm_set_basic (gasm *asm_stmt, bool basic_p)
4323{
4324 if (basic_p)
4325 asm_stmt->subcode |= GF_ASM_BASIC;
4326 else
4327 asm_stmt->subcode &= ~GF_ASM_BASIC;
4328}
4329
4330
4331/* Return true if asm ASM_STMT is a basic asm rather than an extended asm. */
4332
4333inline bool
4334gimple_asm_basic_p (const gasm *asm_stmt)
4335{
4336 return (asm_stmt->subcode & GF_ASM_BASIC) != 0;
4337}
4338
4339
4340/* Return the types handled by GIMPLE_CATCH statement CATCH_STMT. */
4341
4342inline tree
4343gimple_catch_types (const gcatch *catch_stmt)
4344{
4345 return catch_stmt->types;
4346}
4347
4348
4349/* Return a pointer to the types handled by GIMPLE_CATCH statement CATCH_STMT. */
4350
4351inline tree *
4353{
4354 return &catch_stmt->types;
4355}
4356
4357
4358/* Return a pointer to the GIMPLE sequence representing the body of
4359 the handler of GIMPLE_CATCH statement CATCH_STMT. */
4360
4361inline gimple_seq *
4362gimple_catch_handler_ptr (gcatch *catch_stmt)
4364 return &catch_stmt->handler;
4365}
4366
4367
4368/* Return the GIMPLE sequence representing the body of the handler of
4369 GIMPLE_CATCH statement CATCH_STMT. */
4370
4371inline gimple_seq
4372gimple_catch_handler (const gcatch *catch_stmt)
4373{
4374 return *gimple_catch_handler_ptr (const_cast <gcatch *> (catch_stmt));
4375}
4376
4377
4378/* Set T to be the set of types handled by GIMPLE_CATCH CATCH_STMT. */
4379
4380inline void
4381gimple_catch_set_types (gcatch *catch_stmt, tree t)
4382{
4383 catch_stmt->types = t;
4384}
4386
4387/* Set HANDLER to be the body of GIMPLE_CATCH CATCH_STMT. */
4388
4389inline void
4390gimple_catch_set_handler (gcatch *catch_stmt, gimple_seq handler)
4391{
4392 catch_stmt->handler = handler;
4393}
4394
4396/* Return the types handled by GIMPLE_EH_FILTER statement GS. */
4397
4398inline tree
4400{
4401 const geh_filter *eh_filter_stmt = as_a <const geh_filter *> (gs);
4402 return eh_filter_stmt->types;
4403}
4404
4406/* Return a pointer to the types handled by GIMPLE_EH_FILTER statement
4407 GS. */
4408
4409inline tree *
4411{
4412 geh_filter *eh_filter_stmt = as_a <geh_filter *> (gs);
4413 return &eh_filter_stmt->types;
4415
4416
4417/* Return a pointer to the sequence of statement to execute when
4418 GIMPLE_EH_FILTER statement fails. */
4419
4420inline gimple_seq *
4423 geh_filter *eh_filter_stmt = as_a <geh_filter *> (gs);
4424 return &eh_filter_stmt->failure;
4425}
4426
4427
4428/* Return the sequence of statement to execute when GIMPLE_EH_FILTER
4429 statement fails. */
4430
4433{
4434 return *gimple_eh_filter_failure_ptr (const_cast <gimple *> (gs));
4435}
4436
4438/* Set TYPES to be the set of types handled by GIMPLE_EH_FILTER
4439 EH_FILTER_STMT. */
4440
4441inline void
4442gimple_eh_filter_set_types (geh_filter *eh_filter_stmt, tree types)
4444 eh_filter_stmt->types = types;
4445}
4446
4447
4448/* Set FAILURE to be the sequence of statements to execute on failure
4449 for GIMPLE_EH_FILTER EH_FILTER_STMT. */
4450
4451inline void
4453 gimple_seq failure)
4454{
4455 eh_filter_stmt->failure = failure;
4456}
4457
4458/* Get the function decl to be called by the MUST_NOT_THROW region. */
4459
4460inline tree
4462{
4463 return eh_mnt_stmt->fndecl;
4464}
4465
4466/* Set the function decl to be called by GS to DECL. */
4467
4468inline void
4469gimple_eh_must_not_throw_set_fndecl (geh_mnt *eh_mnt_stmt,
4470 tree decl)
4471{
4472 eh_mnt_stmt->fndecl = decl;
4473}
4474
4475/* GIMPLE_EH_ELSE accessors. */
4476
4477inline gimple_seq *
4478gimple_eh_else_n_body_ptr (geh_else *eh_else_stmt)
4479{
4480 return &eh_else_stmt->n_body;
4481}
4483inline gimple_seq
4484gimple_eh_else_n_body (const geh_else *eh_else_stmt)
4485{
4486 return *gimple_eh_else_n_body_ptr (const_cast <geh_else *> (eh_else_stmt));
4487}
4488
4489inline gimple_seq *
4490gimple_eh_else_e_body_ptr (geh_else *eh_else_stmt)
4491{
4492 return &eh_else_stmt->e_body;
4493}
4495inline gimple_seq
4496gimple_eh_else_e_body (const geh_else *eh_else_stmt)
4497{
4498 return *gimple_eh_else_e_body_ptr (const_cast <geh_else *> (eh_else_stmt));
4499}
4500
4501inline void
4502gimple_eh_else_set_n_body (geh_else *eh_else_stmt, gimple_seq seq)
4503{
4504 eh_else_stmt->n_body = seq;
4506
4507inline void
4508gimple_eh_else_set_e_body (geh_else *eh_else_stmt, gimple_seq seq)
4509{
4510 eh_else_stmt->e_body = seq;
4511}
4512
4513/* GIMPLE_TRY accessors. */
4514
4515/* Return the kind of try block represented by GIMPLE_TRY GS. This is
4516 either GIMPLE_TRY_CATCH or GIMPLE_TRY_FINALLY. */
4517
4518inline enum gimple_try_flags
4519gimple_try_kind (const gimple *gs)
4520{
4521 GIMPLE_CHECK (gs, GIMPLE_TRY);
4522 return (enum gimple_try_flags) (gs->subcode & GIMPLE_TRY_KIND);
4523}
4524
4526/* Set the kind of try block represented by GIMPLE_TRY GS. */
4527
4528inline void
4530{
4532 || kind == GIMPLE_TRY_FINALLY);
4533 if (gimple_try_kind (gs) != kind)
4534 gs->subcode = (unsigned int) kind;
4535}
4537
4538/* Return the GIMPLE_TRY_CATCH_IS_CLEANUP flag. */
4539
4540inline bool
4542{
4544 return (gs->subcode & GIMPLE_TRY_CATCH_IS_CLEANUP) != 0;
4546
4547
4548/* Return a pointer to the sequence of statements used as the
4549 body for GIMPLE_TRY GS. */
4550
4551inline gimple_seq *
4552gimple_try_eval_ptr (gimple *gs)
4553{
4554 gtry *try_stmt = as_a <gtry *> (gs);
4555 return &try_stmt->eval;
4556}
4557
4558
4559/* Return the sequence of statements used as the body for GIMPLE_TRY GS. */
4560
4561inline gimple_seq
4562gimple_try_eval (const gimple *gs)
4563{
4564 return *gimple_try_eval_ptr (const_cast <gimple *> (gs));
4565}
4566
4567
4568/* Return a pointer to the sequence of statements used as the cleanup body for
4569 GIMPLE_TRY GS. */
4570
4571inline gimple_seq *
4573{
4574 gtry *try_stmt = as_a <gtry *> (gs);
4575 return &try_stmt->cleanup;
4576}
4577
4579/* Return the sequence of statements used as the cleanup body for
4580 GIMPLE_TRY GS. */
4581
4582inline gimple_seq
4583gimple_try_cleanup (const gimple *gs)
4584{
4585 return *gimple_try_cleanup_ptr (const_cast <gimple *> (gs));
4586}
4587
4589/* Set the GIMPLE_TRY_CATCH_IS_CLEANUP flag. */
4590
4591inline void
4592gimple_try_set_catch_is_cleanup (gtry *g, bool catch_is_cleanup)
4593{
4595 if (catch_is_cleanup)
4596 g->subcode |= GIMPLE_TRY_CATCH_IS_CLEANUP;
4597 else
4598 g->subcode &= ~GIMPLE_TRY_CATCH_IS_CLEANUP;
4600
4601
4602/* Set EVAL to be the sequence of statements to use as the body for
4603 GIMPLE_TRY TRY_STMT. */
4604
4605inline void
4606gimple_try_set_eval (gtry *try_stmt, gimple_seq eval)
4607{
4608 try_stmt->eval = eval;
4610
4611
4612/* Set CLEANUP to be the sequence of statements to use as the cleanup
4613 body for GIMPLE_TRY TRY_STMT. */
4614
4615inline void
4616gimple_try_set_cleanup (gtry *try_stmt, gimple_seq cleanup)
4617{
4618 try_stmt->cleanup = cleanup;
4620
4621
4622/* Return a pointer to the cleanup sequence for cleanup statement GS. */
4623
4624inline gimple_seq *
4625gimple_wce_cleanup_ptr (gimple *gs)
4626{
4627 gimple_statement_wce *wce_stmt = as_a <gimple_statement_wce *> (gs);
4628 return &wce_stmt->cleanup;
4630
4631
4632/* Return the cleanup sequence for cleanup statement GS. */
4633
4634inline gimple_seq
4635gimple_wce_cleanup (const gimple *gs)
4636{
4637 const gimple_statement_wce *wce_stmt
4639 return wce_stmt->cleanup;
4640}
4642
4643/* Set CLEANUP to be the cleanup sequence for GS. */
4644
4645inline void
4647{
4649 wce_stmt->cleanup = cleanup;
4650}
4652
4653/* Return the CLEANUP_EH_ONLY flag for a WCE tuple. */
4654
4655inline bool
4658 GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
4659 return gs->subcode != 0;
4660}
4661
4662
4663/* Set the CLEANUP_EH_ONLY flag for a WCE tuple. */
4664
4665inline void
4667{
4668 GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
4669 gs->subcode = (unsigned int) eh_only_p;
4670}
4671
4673/* Return the maximum number of arguments supported by GIMPLE_PHI GS. */
4674
4675inline unsigned
4676gimple_phi_capacity (const gimple *gs)
4677{
4678 const gphi *phi_stmt = as_a <const gphi *> (gs);
4679 return phi_stmt->capacity;
4680}
4682
4683/* Return the number of arguments in GIMPLE_PHI GS. This must always
4684 be exactly the number of incoming edges for the basic block holding
4685 GS. */
4686
4687inline unsigned
4688gimple_phi_num_args (const gimple *gs)
4689{
4690 const gphi *phi_stmt = as_a <const gphi *> (gs);
4691 return phi_stmt->nargs;
4692}
4694
4695/* Return the SSA name created by GIMPLE_PHI GS. */
4696
4697inline tree
4698gimple_phi_result (const gphi *gs)
4699{
4700 return gs->result;
4701}
4702
4703inline tree
4704gimple_phi_result (const gimple *gs)
4705{
4706 const gphi *phi_stmt = as_a <const gphi *> (gs);
4707 return gimple_phi_result (phi_stmt);
4708}
4709
4710/* Return a pointer to the SSA name created by GIMPLE_PHI GS. */
4711
4712inline tree *
4713gimple_phi_result_ptr (gphi *gs)
4715 return &gs->result;
4716}
4717
4718inline tree *
4719gimple_phi_result_ptr (gimple *gs)
4720{
4721 gphi *phi_stmt = as_a <gphi *> (gs);
4722 return gimple_phi_result_ptr (phi_stmt);
4723}
4725/* Set RESULT to be the SSA name created by GIMPLE_PHI PHI. */
4726
4727inline void
4728gimple_phi_set_result (gphi *phi, tree result)
4729{
4730 phi->result = result;
4731 if (result && TREE_CODE (result) == SSA_NAME)
4732 SSA_NAME_DEF_STMT (result) = phi;
4733}
4735
4736/* Return the PHI argument corresponding to incoming edge INDEX for
4737 GIMPLE_PHI GS. */
4738
4739inline struct phi_arg_d *
4740gimple_phi_arg (gphi *gs, unsigned index)
4741{
4742 gcc_gimple_checking_assert (index < gs->nargs);
4743 return &(gs->args[index]);
4744}
4745
4746inline const phi_arg_d *
4747gimple_phi_arg (const gphi *gs, unsigned index)
4748{
4749 gcc_gimple_checking_assert (index < gs->nargs);
4750 return &(gs->args[index]);
4751}
4753inline const phi_arg_d *
4754gimple_phi_arg (const gimple *gs, unsigned index)
4755{
4756 const gphi *phi_stmt = as_a <const gphi *> (gs);
4757 return gimple_phi_arg (phi_stmt, index);
4759
4760inline struct phi_arg_d *
4761gimple_phi_arg (gimple *gs, unsigned index)
4762{
4763 gphi *phi_stmt = as_a <gphi *> (gs);
4764 return gimple_phi_arg (phi_stmt, index);
4765}
4766
4767/* Set PHIARG to be the argument corresponding to incoming edge INDEX
4768 for GIMPLE_PHI PHI. */
4769
4770inline void
4771gimple_phi_set_arg (gphi *phi, unsigned index, struct phi_arg_d * phiarg)
4772{
4773 gcc_gimple_checking_assert (index < phi->nargs);
4774 phi->args[index] = *phiarg;
4775}
4776
4777/* Return the PHI nodes for basic block BB, or NULL if there are no
4778 PHI nodes. */
4779
4780inline gimple_seq
4782{
4783 gcc_checking_assert (!(bb->flags & BB_RTL));
4784 return bb->il.gimple.phi_nodes;
4785}
4786
4787/* Return a pointer to the PHI nodes for basic block BB. */
4788
4789inline gimple_seq *
4792 gcc_checking_assert (!(bb->flags & BB_RTL));
4793 return &bb->il.gimple.phi_nodes;
4794}
4795
4796/* Return the tree operand for argument I of PHI node GS. */
4797
4798inline tree
4799gimple_phi_arg_def (const gphi *gs, size_t index)
4800{
4801 return gimple_phi_arg (gs, index)->def;
4802}
4803
4804inline tree
4805gimple_phi_arg_def (const gimple *gs, size_t index)
4806{
4807 return gimple_phi_arg (gs, index)->def;
4808}
4809
4810/* Return the tree operand for the argument associated with
4811 edge E of PHI node GS. */
4812
4813inline tree
4814gimple_phi_arg_def_from_edge (const gphi *gs, const_edge e)
4816 gcc_checking_assert (e->dest == gimple_bb (gs));
4817 return gimple_phi_arg (gs, e->dest_idx)->def;
4818}
4819
4820inline tree
4821gimple_phi_arg_def_from_edge (const gimple *gs, const_edge e)
4822{
4824 return gimple_phi_arg (gs, e->dest_idx)->def;
4825}
4826
4827/* Return a pointer to the tree operand for argument I of phi node PHI. */
4828
4829inline tree *
4830gimple_phi_arg_def_ptr (gphi *phi, size_t index)
4832 return &gimple_phi_arg (phi, index)->def;
4833}
4834
4835/* Return the edge associated with argument I of phi node PHI. */
4836
4837inline edge
4838gimple_phi_arg_edge (const gphi *phi, size_t i)
4840 return EDGE_PRED (gimple_bb (phi), i);
4841}
4842
4843/* Return the source location of gimple argument I of phi node PHI. */
4844
4845inline location_t
4846gimple_phi_arg_location (const gphi *phi, size_t i)
4847{
4848 return gimple_phi_arg (phi, i)->locus;
4849}
4850
4851/* Return the source location of the argument on edge E of phi node PHI. */
4852
4853inline location_t
4855{
4856 return gimple_phi_arg (phi, e->dest_idx)->locus;
4857}
4858
4859/* Set the source location of gimple argument I of phi node PHI to LOC. */
4860
4861inline void
4862gimple_phi_arg_set_location (gphi *phi, size_t i, location_t loc)
4863{
4864 gimple_phi_arg (phi, i)->locus = loc;
4865}
4867/* Return address of source location of gimple argument I of phi node PHI. */
4868
4869inline location_t *
4870gimple_phi_arg_location_ptr (gphi *phi, size_t i)
4871{
4872 return &gimple_phi_arg (phi, i)->locus;
4873}
4874
4875/* Return TRUE if argument I of phi node PHI has a location record. */
4876
4877inline bool
4879{
4881}
4882
4883/* Return the number of arguments that can be accessed by gimple_arg. */
4884
4885inline unsigned
4887{
4888 if (auto phi = dyn_cast<const gphi *> (gs))
4889 return gimple_phi_num_args (phi);
4890 if (auto call = dyn_cast<const gcall *> (gs))
4891 return gimple_call_num_args (call);
4892 return gimple_num_ops (as_a <const gassign *> (gs)) - 1;
4893}
4895/* GS must be an assignment, a call, or a PHI.
4896 If it's an assignment, return rhs operand I.
4897 If it's a call, return function argument I.
4898 If it's a PHI, return the value of PHI argument I. */
4899
4900inline tree
4901gimple_arg (const gimple *gs, unsigned int i)
4902{
4903 if (auto phi = dyn_cast<const gphi *> (gs))
4904 return gimple_phi_arg_def (phi, i);
4905 if (auto call = dyn_cast<const gcall *> (gs))
4906 return gimple_call_arg (call, i);
4907 return gimple_op (as_a <const gassign *> (gs), i + 1);
4908}
4909
4910/* Return a pointer to gimple_arg (GS, I). */
4912inline tree *
4913gimple_arg_ptr (gimple *gs, unsigned int i)
4914{
4915 if (auto phi = dyn_cast<gphi *> (gs))
4916 return gimple_phi_arg_def_ptr (phi, i);
4917 if (auto call = dyn_cast<gcall *> (gs))
4918 return gimple_call_arg_ptr (call, i);
4919 return gimple_op_ptr (as_a <gassign *> (gs), i + 1);
4920}
4921
4922/* Return the region number for GIMPLE_RESX RESX_STMT. */
4923
4924inline int
4925gimple_resx_region (const gresx *resx_stmt)
4926{
4927 return resx_stmt->region;
4928}
4929
4930/* Set REGION to be the region number for GIMPLE_RESX RESX_STMT. */
4931
4932inline void
4933gimple_resx_set_region (gresx *resx_stmt, int region)
4935 resx_stmt->region = region;
4936}
4937
4938/* Return the region number for GIMPLE_EH_DISPATCH EH_DISPATCH_STMT. */
4939
4940inline int
4941gimple_eh_dispatch_region (const geh_dispatch *eh_dispatch_stmt)
4942{
4943 return eh_dispatch_stmt->region;
4944}
4945
4946/* Set REGION to be the region number for GIMPLE_EH_DISPATCH
4947 EH_DISPATCH_STMT. */
4948
4949inline void
4950gimple_eh_dispatch_set_region (geh_dispatch *eh_dispatch_stmt, int region)
4951{
4952 eh_dispatch_stmt->region = region;
4953}
4954
4955/* Return the number of labels associated with the switch statement GS. */
4956
4957inline unsigned
4958gimple_switch_num_labels (const gswitch *gs)
4959{
4960 unsigned num_ops;
4961 GIMPLE_CHECK (gs, GIMPLE_SWITCH);
4962 num_ops = gimple_num_ops (gs);
4964 return num_ops - 1;
4965}
4966
4967
4968/* Set NLABELS to be the number of labels for the switch statement GS. */
4969
4970inline void
4971gimple_switch_set_num_labels (gswitch *g, unsigned nlabels)
4973 GIMPLE_CHECK (g, GIMPLE_SWITCH);
4974 gimple_set_num_ops (g, nlabels + 1);
4975}
4976
4977
4978/* Return the index variable used by the switch statement GS. */
4979
4980inline tree
4981gimple_switch_index (const gswitch *gs)
4982{
4983 return gs->op[0];
4984}
4985
4986
4987/* Return a pointer to the index variable for the switch statement GS. */
4988
4989inline tree *
4990gimple_switch_index_ptr (gswitch *gs)
4991{
4992 return &gs->op[0];
4994
4995
4996/* Set INDEX to be the index variable for switch statement GS. */
4997
4998inline void
4999gimple_switch_set_index (gswitch *gs, tree index)
5000{
5002 gs->op[0] = index;
5003}
5004
5005
5006/* Return the label numbered INDEX. The default label is 0, followed by any
5007 labels in a switch statement. */
5008
5009inline tree
5010gimple_switch_label (const gswitch *gs, unsigned index)
5012 gcc_gimple_checking_assert (gimple_num_ops (gs) > index + 1);
5013 return gs->op[index + 1];
5014}
5015
5016/* Set the label number INDEX to LABEL. 0 is always the default label. */
5017
5018inline void
5019gimple_switch_set_label (gswitch *gs, unsigned index, tree label)
5020{
5022 && (label == NULL_TREE
5023 || TREE_CODE (label) == CASE_LABEL_EXPR));
5024 gs->op[index + 1] = label;
5025}
5026
5027/* Return the default label for a switch statement. */
5028
5029inline tree
5030gimple_switch_default_label (const gswitch *gs)
5031{
5032 tree label = gimple_switch_label (gs, 0);
5033 gcc_checking_assert (!CASE_LOW (label) && !CASE_HIGH (label));
5034 return label;
5035}
5036
5037/* Set the default label for a switch statement. */
5039inline void
5041{
5042 gcc_checking_assert (!CASE_LOW (label) && !CASE_HIGH (label));
5043 gimple_switch_set_label (gs, 0, label);
5044}
5045
5046/* Return true if GS is a GIMPLE_DEBUG statement. */
5047
5048inline bool
5050{
5051 return gimple_code (gs) == GIMPLE_DEBUG;
5052}
5053
5054
5055/* Return the first nondebug statement in GIMPLE sequence S. */
5056
5057inline gimple *
5059{
5061 while (n && is_gimple_debug (n))
5062 n = n->next;
5063 return n;
5064}
5065
5066
5067/* Return the last nondebug statement in GIMPLE sequence S. */
5068
5069inline gimple *
5073 for (n = gimple_seq_last (s);
5074 n && is_gimple_debug (n);
5075 n = n->prev)
5076 if (n == s)
5077 return NULL;
5078 return n;
5079}
5080
5082/* Return true if S is a GIMPLE_DEBUG BIND statement. */
5083
5084inline bool
5085gimple_debug_bind_p (const gimple *s)
5086{
5087 if (is_gimple_debug (s))
5088 return s->subcode == GIMPLE_DEBUG_BIND;
5089
5090 return false;
5091}
5093/* Return the variable bound in a GIMPLE_DEBUG bind statement. */
5094
5095inline tree
5097{
5098 GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
5100 return gimple_op (dbg, 0);
5102
5103/* Return the value bound to the variable in a GIMPLE_DEBUG bind
5104 statement. */
5105
5106inline tree
5108{
5109 GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
5111 return gimple_op (dbg, 1);
5112}
5113
5114/* Return a pointer to the value bound to the variable in a
5115 GIMPLE_DEBUG bind statement. */
5116
5117inline tree *
5119{
5120 GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
5122 return gimple_op_ptr (dbg, 1);
5123}
5124
5125/* Set the variable bound in a GIMPLE_DEBUG bind statement. */
5126
5127inline void
5128gimple_debug_bind_set_var (gimple *dbg, tree var)
5129{
5130 GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
5132 gimple_set_op (dbg, 0, var);
5133}
5134
5135/* Set the value bound to the variable in a GIMPLE_DEBUG bind
5136 statement. */
5137
5138inline void
5139gimple_debug_bind_set_value (gimple *dbg, tree value)
5140{
5141 GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
5143 gimple_set_op (dbg, 1, value);
5144}
5145
5146/* The second operand of a GIMPLE_DEBUG_BIND, when the value was
5147 optimized away. */
5148#define GIMPLE_DEBUG_BIND_NOVALUE NULL_TREE /* error_mark_node */
5149
5150/* Remove the value bound to the variable in a GIMPLE_DEBUG bind
5151 statement. */
5153inline void
5155{
5156 GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
5159}
5160
5161/* Return true if the GIMPLE_DEBUG bind statement is bound to a
5162 value. */
5164inline bool
5166{
5167 GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
5169 return gimple_op (dbg, 1) != GIMPLE_DEBUG_BIND_NOVALUE;
5170}
5171
5172#undef GIMPLE_DEBUG_BIND_NOVALUE
5174/* Return true if S is a GIMPLE_DEBUG SOURCE BIND statement. */
5175
5176inline bool
5178{
5179 if (is_gimple_debug (s))
5180 return s->subcode == GIMPLE_DEBUG_SOURCE_BIND;
5181
5182 return false;
5183}
5185/* Return the variable bound in a GIMPLE_DEBUG source bind statement. */
5186
5187inline tree
5189{
5190 GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
5192 return gimple_op (dbg, 0);
5193}
5195/* Return the value bound to the variable in a GIMPLE_DEBUG source bind
5196 statement. */
5197
5198inline tree
5200{
5201 GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
5203 return gimple_op (dbg, 1);
5204}
5206/* Return a pointer to the value bound to the variable in a
5207 GIMPLE_DEBUG source bind statement. */
5208
5209inline tree *
5211{
5212 GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
5214 return gimple_op_ptr (dbg, 1);
5215}
5217/* Set the variable bound in a GIMPLE_DEBUG source bind statement. */
5218
5219inline void
5221{
5222 GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
5224 gimple_set_op (dbg, 0, var);
5225}
5226
5227/* Set the value bound to the variable in a GIMPLE_DEBUG source bind
5228 statement. */
5229
5230inline void
5232{
5233 GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
5235 gimple_set_op (dbg, 1, value);
5236}
5237
5238/* Return true if S is a GIMPLE_DEBUG BEGIN_STMT statement. */
5239
5240inline bool
5241gimple_debug_begin_stmt_p (const gimple *s)
5242{
5243 if (is_gimple_debug (s))
5244 return s->subcode == GIMPLE_DEBUG_BEGIN_STMT;
5246 return false;
5247}
5248
5249/* Return true if S is a GIMPLE_DEBUG INLINE_ENTRY statement. */
5250
5251inline bool
5252gimple_debug_inline_entry_p (const gimple *s)
5254 if (is_gimple_debug (s))
5255 return s->subcode == GIMPLE_DEBUG_INLINE_ENTRY;
5256
5257 return false;
5258}
5259
5260/* Return true if S is a GIMPLE_DEBUG non-binding marker statement. */
5262inline bool
5264{
5265 if (is_gimple_debug (s))
5266 return s->subcode == GIMPLE_DEBUG_BEGIN_STMT
5267 || s->subcode == GIMPLE_DEBUG_INLINE_ENTRY;
5268
5269 return false;
5271
5272/* Return the line number for EXPR, or return -1 if we have no line
5273 number information for it. */
5274inline int
5275get_lineno (const gimple *stmt)
5276{
5277 location_t loc;
5278
5279 if (!stmt)
5280 return -1;
5281
5282 loc = gimple_location (stmt);
5283 if (loc == UNKNOWN_LOCATION)
5284 return -1;
5285
5286 return LOCATION_LINE (loc);
5287}
5288
5289/* Return a pointer to the body for the OMP statement GS. */
5291inline gimple_seq *
5293{
5294 return &static_cast <gimple_statement_omp *> (gs)->body;
5295}
5296
5297/* Return the body for the OMP statement GS. */
5298
5300gimple_omp_body (const gimple *gs)
5301{
5302 return *gimple_omp_body_ptr (const_cast <gimple *> (gs));
5303}
5304
5305/* Set BODY to be the body for the OMP statement GS. */
5306
5307inline void
5308gimple_omp_set_body (gimple *gs, gimple_seq body)
5310 static_cast <gimple_statement_omp *> (gs)->body = body;
5311}
5312
5313
5314/* Return the name associated with OMP_CRITICAL statement CRIT_STMT. */
5315
5316inline tree
5317gimple_omp_critical_name (const gomp_critical *crit_stmt)
5318{
5319 return crit_stmt->name;
5320}
5321
5322
5323/* Return a pointer to the name associated with OMP critical statement
5324 CRIT_STMT. */
5325
5326inline tree *
5327gimple_omp_critical_name_ptr (gomp_critical *crit_stmt)
5329 return &crit_stmt->name;
5330}
5331
5332
5333/* Set NAME to be the name associated with OMP critical statement
5334 CRIT_STMT. */
5335
5336inline void
5337gimple_omp_critical_set_name (gomp_critical *crit_stmt, tree name)
5339 crit_stmt->name = name;
5340}
5341
5342
5343/* Return the clauses associated with OMP_CRITICAL statement CRIT_STMT. */
5344
5345inline tree
5346gimple_omp_critical_clauses (const gomp_critical *crit_stmt)
5347{
5348 return crit_stmt->clauses;
5349}
5350
5351
5352/* Return a pointer to the clauses associated with OMP critical statement
5353 CRIT_STMT. */
5354
5355inline tree *
5356gimple_omp_critical_clauses_ptr (gomp_critical *crit_stmt)
5358 return &crit_stmt->clauses;
5359}
5360
5361
5362/* Set CLAUSES to be the clauses associated with OMP critical statement
5363 CRIT_STMT. */
5364
5365inline void
5366gimple_omp_critical_set_clauses (gomp_critical *crit_stmt, tree clauses)
5368 crit_stmt->clauses = clauses;
5369}
5370
5371
5372/* Return the clauses associated with OMP_ORDERED statement ORD_STMT. */
5373
5374inline tree
5375gimple_omp_ordered_clauses (const gomp_ordered *ord_stmt)
5376{
5377 return ord_stmt->clauses;
5378}
5379
5380
5381/* Return a pointer to the clauses associated with OMP ordered statement
5382 ORD_STMT. */
5383
5384inline tree *
5385gimple_omp_ordered_clauses_ptr (gomp_ordered *ord_stmt)
5387 return &ord_stmt->clauses;
5388}
5389
5390
5391/* Set CLAUSES to be the clauses associated with OMP ordered statement
5392 ORD_STMT. */
5393
5394inline void
5395gimple_omp_ordered_set_clauses (gomp_ordered *ord_stmt, tree clauses)
5396{
5397 ord_stmt->clauses = clauses;
5399
5400
5401/* Return the clauses associated with OMP_SCAN statement SCAN_STMT. */
5402
5403inline tree
5404gimple_omp_scan_clauses (const gomp_scan *scan_stmt)
5405{
5406 return scan_stmt->clauses;
5407}
5408
5410/* Return a pointer to the clauses associated with OMP scan statement
5411 ORD_STMT. */
5412
5413inline tree *
5415{
5416 return &scan_stmt->clauses;
5417}
5418
5419
5420/* Set CLAUSES to be the clauses associated with OMP scan statement
5421 ORD_STMT. */
5422
5423inline void
5424gimple_omp_scan_set_clauses (gomp_scan *scan_stmt, tree clauses)
5425{
5426 scan_stmt->clauses = clauses;
5427}
5428
5429
5430/* Return the clauses associated with OMP_TASKGROUP statement GS. */
5431
5432inline tree
5434{
5435 GIMPLE_CHECK (gs, GIMPLE_OMP_TASKGROUP);
5436 return
5437 static_cast <const gimple_statement_omp_single_layout *> (gs)->clauses;
5438}
5439
5440
5441/* Return a pointer to the clauses associated with OMP taskgroup statement
5442 GS. */
5444inline tree *
5446{
5447 GIMPLE_CHECK (gs, GIMPLE_OMP_TASKGROUP);
5448 return &static_cast <gimple_statement_omp_single_layout *> (gs)->clauses;
5449}
5450
5451
5452/* Set CLAUSES to be the clauses associated with OMP taskgroup statement
5453 GS. */
5455inline void
5457{
5458 GIMPLE_CHECK (gs, GIMPLE_OMP_TASKGROUP);
5459 static_cast <gimple_statement_omp_single_layout *> (gs)->clauses
5460 = clauses;
5461}
5462
5463
5464/* Return the clauses associated with OMP_MASKED statement GS. */
5465
5466inline tree
5468{
5469 GIMPLE_CHECK (gs, GIMPLE_OMP_MASKED);
5470 return
5471 static_cast <const gimple_statement_omp_single_layout *> (gs)->clauses;
5472}
5473
5474
5475/* Return a pointer to the clauses associated with OMP masked statement
5476 GS. */
5478inline tree *
5480{
5481 GIMPLE_CHECK (gs, GIMPLE_OMP_MASKED);
5482 return &static_cast <gimple_statement_omp_single_layout *> (gs)->clauses;
5483}
5484
5485
5486/* Set CLAUSES to be the clauses associated with OMP masked statement
5487 GS. */
5488
5489inline void
5491{
5492 GIMPLE_CHECK (gs, GIMPLE_OMP_MASKED);
5493 static_cast <gimple_statement_omp_single_layout *> (gs)->clauses
5494 = clauses;
5495}
5496
5498/* Return the clauses associated with OMP_SCOPE statement GS. */
5499
5500inline tree
5502{
5503 GIMPLE_CHECK (gs, GIMPLE_OMP_SCOPE);
5504 return
5505 static_cast <const gimple_statement_omp_single_layout *> (gs)->clauses;
5506}
5508
5509/* Return a pointer to the clauses associated with OMP scope statement
5510 GS. */
5511
5512inline tree *
5514{
5515 GIMPLE_CHECK (gs, GIMPLE_OMP_SCOPE);
5516 return &static_cast <gimple_statement_omp_single_layout *> (gs)->clauses;
5517}
5518
5519
5520/* Set CLAUSES to be the clauses associated with OMP scope statement
5521 GS. */
5522
5523inline void
5524gimple_omp_scope_set_clauses (gimple *gs, tree clauses)
5526 GIMPLE_CHECK (gs, GIMPLE_OMP_SCOPE);
5527 static_cast <gimple_statement_omp_single_layout *> (gs)->clauses
5528 = clauses;
5529}
5530
5531/* Return the clauses associated with OMP_DISPATCH statement GS. */
5532
5533inline tree
5534gimple_omp_dispatch_clauses (const gimple *gs)
5536 GIMPLE_CHECK (gs, GIMPLE_OMP_DISPATCH);
5537 return static_cast<const gimple_statement_omp_single_layout *> (gs)->clauses;
5538}
5539
5540/* Return a pointer to the clauses associated with OMP dispatch statement
5541 GS. */
5542
5543inline tree *
5545{
5546 GIMPLE_CHECK (gs, GIMPLE_OMP_DISPATCH);
5547 return &static_cast<gimple_statement_omp_single_layout *> (gs)->clauses;
5548}
5549
5550/* Set CLAUSES to be the clauses associated with OMP dispatch statement
5551 GS. */
5552
5553inline void
5555{
5556 GIMPLE_CHECK (gs, GIMPLE_OMP_DISPATCH);
5557 static_cast<gimple_statement_omp_single_layout *> (gs)->clauses = clauses;
5558}
5559
5560/* Return the clauses associated with OMP_INTEROP statement GS. */
5561
5562inline tree
5563gimple_omp_interop_clauses (const gimple *gs)
5564{
5565 GIMPLE_CHECK (gs, GIMPLE_OMP_INTEROP);
5566 return static_cast<const gimple_statement_omp_single_layout *> (gs)->clauses;
5567}
5568
5569/* Return a pointer to the clauses associated with OMP_INTEROP statement GS. */
5570
5571inline tree *
5573{
5574 GIMPLE_CHECK (gs, GIMPLE_OMP_INTEROP);
5575 return &static_cast<gimple_statement_omp_single_layout *> (gs)->clauses;
5577
5578/* Set CLAUSES to be the clauses associated with OMP interop statement
5579 GS. */
5580
5581inline void
5582gimple_omp_interop_set_clauses (gimple *gs, tree clauses)
5583{
5584 GIMPLE_CHECK (gs, GIMPLE_OMP_INTEROP);
5585 static_cast<gimple_statement_omp_single_layout *> (gs)->clauses = clauses;
5586}
5587
5588/* Return the kind of the OMP_FOR statemement G. */
5590inline int
5592{
5593 GIMPLE_CHECK (g, GIMPLE_OMP_FOR);
5595}
5596
5597
5598/* Set the kind of the OMP_FOR statement G. */
5599
5600inline void
5602{
5603 g->subcode = (g->subcode & ~GF_OMP_FOR_KIND_MASK)
5604 | (kind & GF_OMP_FOR_KIND_MASK);
5605}
5606
5607
5608/* Return true if OMP_FOR statement G has the
5609 GF_OMP_FOR_COMBINED flag set. */
5610
5611inline bool
5613{
5614 GIMPLE_CHECK (g, GIMPLE_OMP_FOR);
5615 return (gimple_omp_subcode (g) & GF_OMP_FOR_COMBINED) != 0;
5616}
5617
5618
5619/* Set the GF_OMP_FOR_COMBINED field in the OMP_FOR statement G depending on
5620 the boolean value of COMBINED_P. */
5621
5622inline void
5624{
5625 if (combined_p)
5626 g->subcode |= GF_OMP_FOR_COMBINED;
5627 else
5628 g->subcode &= ~GF_OMP_FOR_COMBINED;
5629}
5630
5631
5632/* Return true if the OMP_FOR statement G has the
5633 GF_OMP_FOR_COMBINED_INTO flag set. */
5635inline bool
5637{
5638 GIMPLE_CHECK (g, GIMPLE_OMP_FOR);
5640}
5641
5642
5643/* Set the GF_OMP_FOR_COMBINED_INTO field in the OMP_FOR statement G depending
5644 on the boolean value of COMBINED_P. */
5645
5646inline void
5648{
5649 if (combined_p)
5650 g->subcode |= GF_OMP_FOR_COMBINED_INTO;
5651 else
5652 g->subcode &= ~GF_OMP_FOR_COMBINED_INTO;
5653}
5655
5656/* Return the clauses associated with the OMP_FOR statement GS. */
5657
5658inline tree
5660{
5661 const gomp_for *omp_for_stmt = as_a <const gomp_for *> (gs);
5662 return omp_for_stmt->clauses;
5663}
5664
5666/* Return a pointer to the clauses associated with the OMP_FOR statement
5667 GS. */
5668
5669inline tree *
5671{
5672 gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
5673 return &omp_for_stmt->clauses;
5674}
5675
5676
5677/* Set CLAUSES to be the list of clauses associated with the OMP_FOR statement
5678 GS. */
5679
5680inline void
5682{
5683 gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
5684 omp_for_stmt->clauses = clauses;
5685}
5686
5687
5688/* Get the collapse count of the OMP_FOR statement GS. */
5689
5690inline size_t
5692{
5693 const gomp_for *omp_for_stmt = as_a <const gomp_for *> (gs);
5694 return omp_for_stmt->collapse;
5695}
5696
5697
5698/* Return the condition code associated with the OMP_FOR statement GS. */
5700inline enum tree_code
5701gimple_omp_for_cond (const gimple *gs, size_t i)
5702{
5703 const gomp_for *omp_for_stmt = as_a <const gomp_for *> (gs);
5705 return omp_for_stmt->iter[i].cond;
5706}
5707
5708
5709/* Set COND to be the condition code for the OMP_FOR statement GS. */
5711inline void
5712gimple_omp_for_set_cond (gimple *gs, size_t i, enum tree_code cond)
5713{
5714 gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
5716 && i < omp_for_stmt->collapse);
5717 omp_for_stmt->iter[i].cond = cond;
5718}
5719
5720
5721/* Return the index variable for the OMP_FOR statement GS. */
5722
5723inline tree
5724gimple_omp_for_index (const gimple *gs, size_t i)
5725{
5726 const gomp_for *omp_for_stmt = as_a <const gomp_for *> (gs);
5728 return omp_for_stmt->iter[i].index;
5729}
5730
5731
5732/* Return a pointer to the index variable for the OMP_FOR statement GS. */
5733
5734inline tree *
5735gimple_omp_for_index_ptr (gimple *gs, size_t i)
5736{
5737 gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
5739 return &omp_for_stmt->iter[i].index;
5740}
5741
5742
5743/* Set INDEX to be the index variable for the OMP_FOR statement GS. */
5744
5745inline void
5746gimple_omp_for_set_index (gimple *gs, size_t i, tree index)
5747{
5748 gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
5750 omp_for_stmt->iter[i].index = index;
5751}
5752
5753
5754/* Return the initial value for the OMP_FOR statement GS. */
5755
5756inline tree
5757gimple_omp_for_initial (const gimple *gs, size_t i)
5758{
5759 const gomp_for *omp_for_stmt = as_a <const gomp_for *> (gs);
5761 return omp_for_stmt->iter[i].initial;
5762}
5763
5764
5765/* Return a pointer to the initial value for the OMP_FOR statement GS. */
5766
5767inline tree *
5769{
5770 gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
5772 return &omp_for_stmt->iter[i].initial;
5773}
5774
5775
5776/* Set INITIAL to be the initial value for the OMP_FOR statement GS. */
5777
5778inline void
5779gimple_omp_for_set_initial (gimple *gs, size_t i, tree initial)
5780{
5781 gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
5783 omp_for_stmt->iter[i].initial = initial;
5784}
5785
5786
5787/* Return the final value for the OMP_FOR statement GS. */
5788
5789inline tree
5790gimple_omp_for_final (const gimple *gs, size_t i)
5791{
5792 const gomp_for *omp_for_stmt = as_a <const gomp_for *> (gs);
5794 return omp_for_stmt->iter[i].final;
5795}
5796
5797
5798/* Return a pointer to the final value for the OMP_FOR statement GS. */
5799
5800inline tree *
5801gimple_omp_for_final_ptr (gimple *gs, size_t i)
5802{
5803 gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
5805 return &omp_for_stmt->iter[i].final;
5806}
5807
5808
5809/* Set FINAL to be the final value for the OMP_FOR statement GS. */
5811inline void
5812gimple_omp_for_set_final (gimple *gs, size_t i, tree final)
5813{
5814 gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
5816 omp_for_stmt->iter[i].final = final;
5817}
5818
5819
5820/* Return the increment value for the OMP_FOR statement GS. */
5822inline tree
5823gimple_omp_for_incr (const gimple *gs, size_t i)
5824{
5825 const gomp_for *omp_for_stmt = as_a <const gomp_for *> (gs);
5827 return omp_for_stmt->iter[i].incr;
5828}
5829
5830
5831/* Return a pointer to the increment value for the OMP_FOR statement GS. */
5832
5833inline tree *
5834gimple_omp_for_incr_ptr (gimple *gs, size_t i)
5835{
5836 gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
5838 return &omp_for_stmt->iter[i].incr;
5839}
5841
5842/* Set INCR to be the increment value for the OMP_FOR statement GS. */
5843
5844inline void
5845gimple_omp_for_set_incr (gimple *gs, size_t i, tree incr)
5846{
5847 gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
5849 omp_for_stmt->iter[i].incr = incr;
5851
5852
5853/* Return a pointer to the sequence of statements to execute before the OMP_FOR
5854 statement GS starts. */
5855
5856inline gimple_seq *
5857gimple_omp_for_pre_body_ptr (gimple *gs)
5858{
5859 gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
5860 return &omp_for_stmt->pre_body;
5861}
5862
5863
5864/* Return the sequence of statements to execute before the OMP_FOR
5865 statement GS starts. */
5866
5867inline gimple_seq
5868gimple_omp_for_pre_body (const gimple *gs)
5870 return *gimple_omp_for_pre_body_ptr (const_cast <gimple *> (gs));
5871}
5872
5873
5874/* Set PRE_BODY to be the sequence of statements to execute before the
5875 OMP_FOR statement GS starts. */
5876
5877inline void
5879{
5880 gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
5881 omp_for_stmt->pre_body = pre_body;
5882}
5883
5884/* Return the clauses associated with OMP_PARALLEL GS. */
5885
5886inline tree
5888{
5889 const gomp_parallel *omp_parallel_stmt = as_a <const gomp_parallel *> (gs);
5890 return omp_parallel_stmt->clauses;
5891}
5892
5893
5894/* Return a pointer to the clauses associated with OMP_PARALLEL_STMT. */
5895
5896inline tree *
5897gimple_omp_parallel_clauses_ptr (gomp_parallel *omp_parallel_stmt)
5899 return &omp_parallel_stmt->clauses;
5900}
5901
5902
5903/* Set CLAUSES to be the list of clauses associated with OMP_PARALLEL_STMT. */
5904
5905inline void
5906gimple_omp_parallel_set_clauses (gomp_parallel *omp_parallel_stmt,
5907 tree clauses)
5908{
5909 omp_parallel_stmt->clauses = clauses;
5910}
5911
5912
5913/* Return the child function used to hold the body of OMP_PARALLEL_STMT. */
5914
5915inline tree
5917{
5918 return omp_parallel_stmt->child_fn;
5919}
5920
5921/* Return a pointer to the child function used to hold the body of
5922 OMP_PARALLEL_STMT. */
5923
5924inline tree *
5926{
5927 return &omp_parallel_stmt->child_fn;
5928}
5929
5930
5931/* Set CHILD_FN to be the child function for OMP_PARALLEL_STMT. */
5932
5933inline void
5934gimple_omp_parallel_set_child_fn (gomp_parallel *omp_parallel_stmt,
5935 tree child_fn)
5936{
5937 omp_parallel_stmt->child_fn = child_fn;
5938}
5939
5940
5941/* Return the artificial argument used to send variables and values
5942 from the parent to the children threads in OMP_PARALLEL_STMT. */
5943
5944inline tree
5945gimple_omp_parallel_data_arg (const gomp_parallel *omp_parallel_stmt)
5947 return omp_parallel_stmt->data_arg;
5948}
5949
5950
5951/* Return a pointer to the data argument for OMP_PARALLEL_STMT. */
5952
5953inline tree *
5954gimple_omp_parallel_data_arg_ptr (gomp_parallel *omp_parallel_stmt)
5955{
5956 return &omp_parallel_stmt->data_arg;
5958
5959
5960/* Set DATA_ARG to be the data argument for OMP_PARALLEL_STMT. */
5961
5962inline void
5963gimple_omp_parallel_set_data_arg (gomp_parallel *omp_parallel_stmt,
5964 tree data_arg)
5965{
5966 omp_parallel_stmt->data_arg = data_arg;
5967}
5969/* Return the clauses associated with OMP_TASK GS. */
5970
5971inline tree
5973{
5974 const gomp_task *omp_task_stmt = as_a <const gomp_task *> (gs);
5975 return omp_task_stmt->clauses;
5976}
5977
5978
5979/* Return a pointer to the clauses associated with OMP_TASK GS. */
5980
5981inline tree *
5983{
5984 gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
5985 return &omp_task_stmt->clauses;
5986}
5987
5988
5989/* Set CLAUSES to be the list of clauses associated with OMP_TASK
5990 GS. */
5991
5992inline void
5994{
5995 gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
5996 omp_task_stmt->clauses = clauses;
5997}
5998
5999
6000/* Return true if OMP task statement G has the
6001 GF_OMP_TASK_TASKLOOP flag set. */
6002
6003inline bool
6004gimple_omp_task_taskloop_p (const gimple *g)
6005{
6006 GIMPLE_CHECK (g, GIMPLE_OMP_TASK);
6007 return (gimple_omp_subcode (g) & GF_OMP_TASK_TASKLOOP) != 0;
6008}
6009
6010
6011/* Set the GF_OMP_TASK_TASKLOOP field in G depending on the boolean
6012 value of TASKLOOP_P. */
6013
6014inline void
6015gimple_omp_task_set_taskloop_p (gimple *g, bool taskloop_p)
6017 GIMPLE_CHECK (g, GIMPLE_OMP_TASK);
6018 if (taskloop_p)
6019 g->subcode |= GF_OMP_TASK_TASKLOOP;
6020 else
6021 g->subcode &= ~GF_OMP_TASK_TASKLOOP;
6022}
6023
6024
6025/* Return true if OMP task statement G has the
6026 GF_OMP_TASK_TASKWAIT flag set. */
6027
6028inline bool
6030{
6031 GIMPLE_CHECK (g, GIMPLE_OMP_TASK);
6032 return (gimple_omp_subcode (g) & GF_OMP_TASK_TASKWAIT) != 0;
6033}
6034
6035
6036/* Set the GF_OMP_TASK_TASKWAIT field in G depending on the boolean
6037 value of TASKWAIT_P. */
6038
6039inline void
6040gimple_omp_task_set_taskwait_p (gimple *g, bool taskwait_p)
6041{
6042 GIMPLE_CHECK (g, GIMPLE_OMP_TASK);
6043 if (taskwait_p)
6044 g->subcode |= GF_OMP_TASK_TASKWAIT;
6045 else
6046 g->subcode &= ~GF_OMP_TASK_TASKWAIT;
6048
6049
6050/* Return the child function used to hold the body of OMP_TASK GS. */
6051
6052inline tree
6053gimple_omp_task_child_fn (const gimple *gs)
6054{
6055 const gomp_task *omp_task_stmt = as_a <const gomp_task *> (gs);
6056 return omp_task_stmt->child_fn;
6058
6059/* Return a pointer to the child function used to hold the body of
6060 OMP_TASK GS. */
6061
6062inline tree *
6064{
6065 gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
6066 return &omp_task_stmt->child_fn;
6068
6069
6070/* Set CHILD_FN to be the child function for OMP_TASK GS. */
6071
6072inline void
6073gimple_omp_task_set_child_fn (gimple *gs, tree child_fn)
6074{
6075 gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
6076 omp_task_stmt->child_fn = child_fn;
6077}
6079
6080/* Return the artificial argument used to send variables and values
6081 from the parent to the children threads in OMP_TASK GS. */
6082
6083inline tree
6085{
6086 const gomp_task *omp_task_stmt = as_a <const gomp_task *> (gs);
6087 return omp_task_stmt->data_arg;
6088}
6089
6091/* Return a pointer to the data argument for OMP_TASK GS. */
6092
6093inline tree *
6095{
6096 gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
6097 return &omp_task_stmt->data_arg;
6098}
6099
6100
6101/* Set DATA_ARG to be the data argument for OMP_TASK GS. */
6102
6103inline void
6105{
6106 gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
6107 omp_task_stmt->data_arg = data_arg;
6108}
6109
6110
6111/* Return the clauses associated with OMP_TASK GS. */
6113inline tree
6115{
6116 const gimple_statement_omp_taskreg *omp_taskreg_stmt
6118 return omp_taskreg_stmt->clauses;
6119}
6120
6121
6122/* Return a pointer to the clauses associated with OMP_TASK GS. */
6129 return &omp_taskreg_stmt->clauses;
6130}
6131
6132
6133/* Set CLAUSES to be the list of clauses associated with OMP_TASK
6134 GS. */
6136inline void
6138{
6139 gimple_statement_omp_taskreg *omp_taskreg_stmt
6141 omp_taskreg_stmt->clauses = clauses;
6142}
6143
6144
6145/* Return the child function used to hold the body of OMP_TASK GS. */
6147inline tree
6149{
6150 const gimple_statement_omp_taskreg *omp_taskreg_stmt
6152 return omp_taskreg_stmt->child_fn;
6153}
6154
6155/* Return a pointer to the child function used to hold the body of
6156 OMP_TASK GS. */
6163 return &omp_taskreg_stmt->child_fn;
6164}
6165
6166
6167/* Set CHILD_FN to be the child function for OMP_TASK GS. */
6169inline void
6171{
6172 gimple_statement_omp_taskreg *omp_taskreg_stmt
6174 omp_taskreg_stmt->child_fn = child_fn;
6175}
6176
6177
6178/* Return the artificial argument used to send variables and values
6179 from the parent to the children threads in OMP_TASK GS. */
6180
6181inline tree
6183{
6184 const gimple_statement_omp_taskreg *omp_taskreg_stmt
6186 return omp_taskreg_stmt->data_arg;
6187}
6189
6190/* Return a pointer to the data argument for OMP_TASK GS. */
6191
6192inline tree *
6194{
6195 gimple_statement_omp_taskreg *omp_taskreg_stmt
6197 return &omp_taskreg_stmt->data_arg;
6199
6200
6201/* Set DATA_ARG to be the data argument for OMP_TASK GS. */
6202
6203inline void
6204gimple_omp_taskreg_set_data_arg (gimple *gs, tree data_arg)
6205{
6206 gimple_statement_omp_taskreg *omp_taskreg_stmt
6208 omp_taskreg_stmt->data_arg = data_arg;
6209}
6210
6211
6212/* Return the copy function used to hold the body of OMP_TASK GS. */
6213
6214inline tree
6215gimple_omp_task_copy_fn (const gimple *gs)
6216{
6217 const gomp_task *omp_task_stmt = as_a <const gomp_task *> (gs);
6218 return omp_task_stmt->copy_fn;
6219}
6220
6221/* Return a pointer to the copy function used to hold the body of
6222 OMP_TASK GS. */
6223
6224inline tree *
6225gimple_omp_task_copy_fn_ptr (gimple *gs)
6226{
6227 gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
6228 return &omp_task_stmt->copy_fn;
6229}
6230
6231
6232/* Set CHILD_FN to be the copy function for OMP_TASK GS. */
6233
6234inline void
6236{
6237 gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
6238 omp_task_stmt->copy_fn = copy_fn;
6239}
6240
6241
6242/* Return size of the data block in bytes in OMP_TASK GS. */
6243
6244inline tree
6245gimple_omp_task_arg_size (const gimple *gs)
6246{
6247 const gomp_task *omp_task_stmt = as_a <const gomp_task *> (gs);
6248 return omp_task_stmt->arg_size;
6249}
6250
6251
6252/* Return a pointer to the data block size for OMP_TASK GS. */
6253
6254inline tree *
6256{
6257 gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
6258 return &omp_task_stmt->arg_size;
6259}
6260
6261
6262/* Set ARG_SIZE to be the data block size for OMP_TASK GS. */
6263
6264inline void
6265gimple_omp_task_set_arg_size (gimple *gs, tree arg_size)
6266{
6267 gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
6268 omp_task_stmt->arg_size = arg_size;
6269}
6270
6271
6272/* Return align of the data block in bytes in OMP_TASK GS. */
6273
6274inline tree
6275gimple_omp_task_arg_align (const gimple *gs)
6276{
6277 const gomp_task *omp_task_stmt = as_a <const gomp_task *> (gs);
6278 return omp_task_stmt->arg_align;
6279}
6280
6281
6282/* Return a pointer to the data block align for OMP_TASK GS. */
6283
6284inline tree *
6286{
6287 gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
6288 return &omp_task_stmt->arg_align;
6289}
6290
6291
6292/* Set ARG_SIZE to be the data block align for OMP_TASK GS. */
6293
6294inline void
6295gimple_omp_task_set_arg_align (gimple *gs, tree arg_align)
6296{
6297 gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
6298 omp_task_stmt->arg_align = arg_align;
6299}
6300
6301
6302/* Return the clauses associated with OMP_SINGLE GS. */
6303
6304inline tree
6305gimple_omp_single_clauses (const gimple *gs)
6306{
6307 const gomp_single *omp_single_stmt = as_a <const gomp_single *> (gs);
6308 return omp_single_stmt->clauses;
6309}
6310
6311
6312/* Return a pointer to the clauses associated with OMP_SINGLE GS. */
6313
6314inline tree *
6316{
6317 gomp_single *omp_single_stmt = as_a <gomp_single *> (gs);
6318 return &omp_single_stmt->clauses;
6319}
6320
6321
6322/* Set CLAUSES to be the clauses associated with OMP_SINGLE_STMT. */
6323
6324inline void
6325gimple_omp_single_set_clauses (gomp_single *omp_single_stmt, tree clauses)
6326{
6327 omp_single_stmt->clauses = clauses;
6328}
6329
6330
6331/* Return the clauses associated with OMP_TARGET GS. */
6332
6333inline tree
6334gimple_omp_target_clauses (const gimple *gs)
6335{
6336 const gomp_target *omp_target_stmt = as_a <const gomp_target *> (gs);
6337 return omp_target_stmt->clauses;
6338}
6339
6340
6341/* Return a pointer to the clauses associated with OMP_TARGET GS. */
6342
6343inline tree *
6345{
6346 gomp_target *omp_target_stmt = as_a <gomp_target *> (gs);
6347 return &omp_target_stmt->clauses;
6348}
6349
6350
6351/* Set CLAUSES to be the clauses associated with OMP_TARGET_STMT. */
6352
6353inline void
6354gimple_omp_target_set_clauses (gomp_target *omp_target_stmt,
6355 tree clauses)
6356{
6357 omp_target_stmt->clauses = clauses;
6358}
6359
6360
6361/* Return the kind of the OMP_TARGET G. */
6362
6363inline int
6364gimple_omp_target_kind (const gimple *g)
6365{
6366 GIMPLE_CHECK (g, GIMPLE_OMP_TARGET);
6368}
6369
6370
6371/* Set the kind of the OMP_TARGET G. */
6372
6373inline void
6374gimple_omp_target_set_kind (gomp_target *g, int kind)
6376 g->subcode = (g->subcode & ~GF_OMP_TARGET_KIND_MASK)
6377 | (kind & GF_OMP_TARGET_KIND_MASK);
6378}
6379
6380
6381/* Return the child function used to hold the body of OMP_TARGET_STMT. */
6382
6383inline tree
6385{
6386 return omp_target_stmt->child_fn;
6387}
6388
6389/* Return a pointer to the child function used to hold the body of
6390 OMP_TARGET_STMT. */
6391
6392inline tree *
6393gimple_omp_target_child_fn_ptr (gomp_target *omp_target_stmt)
6394{
6395 return &omp_target_stmt->child_fn;
6396}
6397
6398
6399/* Set CHILD_FN to be the child function for OMP_TARGET_STMT. */
6400
6401inline void
6402gimple_omp_target_set_child_fn (gomp_target *omp_target_stmt,
6403 tree child_fn)
6404{
6405 omp_target_stmt->child_fn = child_fn;
6406}
6407
6408
6409/* Return the artificial argument used to send variables and values
6410 from the parent to the children threads in OMP_TARGET_STMT. */
6411
6412inline tree
6413gimple_omp_target_data_arg (const gomp_target *omp_target_stmt)
6414{
6415 return omp_target_stmt->data_arg;
6417
6418
6419/* Return a pointer to the data argument for OMP_TARGET GS. */
6420
6421inline tree *
6422gimple_omp_target_data_arg_ptr (gomp_target *omp_target_stmt)
6423{
6424 return &omp_target_stmt->data_arg;
6425}
6427
6428/* Set DATA_ARG to be the data argument for OMP_TARGET_STMT. */
6429
6430inline void
6432 tree data_arg)
6433{
6434 omp_target_stmt->data_arg = data_arg;
6435}
6437
6438/* Return the Gimple sequence used to store loops for OpenMP iterators used
6439 by OMP_TARGET_STMT. */
6440
6441inline gimple_seq
6442gimple_omp_target_iterator_loops (const gomp_target *omp_target_stmt)
6443{
6444 return omp_target_stmt->iterator_loops;
6445}
6447
6448/* Return a pointer to the Gimple sequence used to store loops for OpenMP
6449 iterators used by OMP_TARGET GS. */
6450
6451inline gimple_seq *
6453{
6454 gomp_target *omp_target_stmt = as_a <gomp_target *> (gs);
6455 return &omp_target_stmt->iterator_loops;
6456}
6457
6458
6459/* Set ITERATOR_LOOPS to be the Gimple sequence used to store loops
6460 constructed for OpenMP iterators in OMP_TARGET_STMT. */
6461
6462inline void
6464 gimple_seq iterator_loops)
6465{
6466 omp_target_stmt->iterator_loops = iterator_loops;
6467}
6468
6469
6470/* Return the clauses associated with OMP_TEAMS GS. */
6471
6472inline tree
6474{
6475 const gomp_teams *omp_teams_stmt = as_a <const gomp_teams *> (gs);
6476 return omp_teams_stmt->clauses;
6477}
6478
6479
6480/* Return a pointer to the clauses associated with OMP_TEAMS GS. */
6481
6482inline tree *
6484{
6485 gomp_teams *omp_teams_stmt = as_a <gomp_teams *> (gs);
6486 return &omp_teams_stmt->clauses;
6487}
6488
6489
6490/* Set CLAUSES to be the clauses associated with OMP_TEAMS_STMT. */
6492inline void
6493gimple_omp_teams_set_clauses (gomp_teams *omp_teams_stmt, tree clauses)
6494{
6495 omp_teams_stmt->clauses = clauses;
6496}
6497
6498/* Return the child function used to hold the body of OMP_TEAMS_STMT. */
6499
6500inline tree
6501gimple_omp_teams_child_fn (const gomp_teams *omp_teams_stmt)
6502{
6503 return omp_teams_stmt->child_fn;
6504}
6505
6506/* Return a pointer to the child function used to hold the body of
6507 OMP_TEAMS_STMT. */
6509inline tree *
6511{
6512 return &omp_teams_stmt->child_fn;
6513}
6514
6515
6516/* Set CHILD_FN to be the child function for OMP_TEAMS_STMT. */
6517
6518inline void
6519gimple_omp_teams_set_child_fn (gomp_teams *omp_teams_stmt, tree child_fn)
6520{
6521 omp_teams_stmt->child_fn = child_fn;
6522}
6523
6524
6525/* Return the artificial argument used to send variables and values
6526 from the parent to the children threads in OMP_TEAMS_STMT. */
6528inline tree
6529gimple_omp_teams_data_arg (const gomp_teams *omp_teams_stmt)
6530{
6531 return omp_teams_stmt->data_arg;
6532}
6533
6534
6535/* Return a pointer to the data argument for OMP_TEAMS_STMT. */
6536
6537inline tree *
6539{
6540 return &omp_teams_stmt->data_arg;
6541}
6542
6543
6544/* Set DATA_ARG to be the data argument for OMP_TEAMS_STMT. */
6545
6546inline void
6547gimple_omp_teams_set_data_arg (gomp_teams *omp_teams_stmt, tree data_arg)
6549 omp_teams_stmt->data_arg = data_arg;
6550}
6551
6552/* Return the host flag of an OMP_TEAMS_STMT. */
6553
6554inline bool
6555gimple_omp_teams_host (const gomp_teams *omp_teams_stmt)
6556{
6557 return (gimple_omp_subcode (omp_teams_stmt) & GF_OMP_TEAMS_HOST) != 0;
6558}
6560/* Set host flag of an OMP_TEAMS_STMT to VALUE. */
6561
6562inline void
6563gimple_omp_teams_set_host (gomp_teams *omp_teams_stmt, bool value)
6564{
6565 if (value)
6566 omp_teams_stmt->subcode |= GF_OMP_TEAMS_HOST;
6567 else
6568 omp_teams_stmt->subcode &= ~GF_OMP_TEAMS_HOST;
6569}
6571/* Return the clauses associated with OMP_SECTIONS GS. */
6572
6573inline tree
6575{
6576 const gomp_sections *omp_sections_stmt = as_a <const gomp_sections *> (gs);
6577 return omp_sections_stmt->clauses;
6578}
6579
6580
6581/* Return a pointer to the clauses associated with OMP_SECTIONS GS. */
6582
6583inline tree *
6585{
6586 gomp_sections *omp_sections_stmt = as_a <gomp_sections *> (gs);
6587 return &omp_sections_stmt->clauses;
6588}
6589
6590
6591/* Set CLAUSES to be the set of clauses associated with OMP_SECTIONS
6592 GS. */
6593
6594inline void
6596{
6597 gomp_sections *omp_sections_stmt = as_a <gomp_sections *> (gs);
6598 omp_sections_stmt->clauses = clauses;
6599}
6601
6602/* Return the control variable associated with the GIMPLE_OMP_SECTIONS
6603 in GS. */
6604
6605inline tree
6607{
6608 const gomp_sections *omp_sections_stmt = as_a <const gomp_sections *> (gs);
6609 return omp_sections_stmt->control;
6610}
6611
6612
6613/* Return a pointer to the clauses associated with the GIMPLE_OMP_SECTIONS
6614 GS. */
6615
6616inline tree *
6619 gomp_sections *omp_sections_stmt = as_a <gomp_sections *> (gs);
6620 return &omp_sections_stmt->control;
6621}
6622
6623
6624/* Set CONTROL to be the set of clauses associated with the
6625 GIMPLE_OMP_SECTIONS in GS. */
6626
6627inline void
6629{
6630 gomp_sections *omp_sections_stmt = as_a <gomp_sections *> (gs);
6631 omp_sections_stmt->control = control;
6632}
6633
6634
6635/* Set the value being stored in an atomic store. */
6637inline void
6639{
6640 store_stmt->val = val;
6641}
6642
6643
6644/* Return the value being stored in an atomic store. */
6646inline tree
6648{
6649 return store_stmt->val;
6650}
6651
6652
6653/* Return a pointer to the value being stored in an atomic store. */
6655inline tree *
6657{
6658 return &store_stmt->val;
6659}
6660
6661
6662/* Set the LHS of an atomic load. */
6664inline void
6666{
6667 load_stmt->lhs = lhs;
6668}
6669
6670
6671/* Get the LHS of an atomic load. */
6673inline tree
6675{
6676 return load_stmt->lhs;
6677}
6678
6679
6680/* Return a pointer to the LHS of an atomic load. */
6681
6682inline tree *
6684{
6685 return &load_stmt->lhs;
6686}
6687
6689/* Set the RHS of an atomic load. */
6690
6691inline void
6693{
6694 load_stmt->rhs = rhs;
6695}
6696
6698/* Get the RHS of an atomic load. */
6699
6700inline tree
6702{
6703 return load_stmt->rhs;
6704}
6705
6707/* Return a pointer to the RHS of an atomic load. */
6708
6709inline tree *
6711{
6712 return &load_stmt->rhs;
6713}
6714
6716/* Get the definition of the control variable in a GIMPLE_OMP_CONTINUE. */
6717
6718inline tree
6720{
6721 return cont_stmt->control_def;
6722}
6724/* The same as above, but return the address. */
6725
6726inline tree *
6728{
6729 return &cont_stmt->control_def;
6730}
6731
6732/* Set the definition of the control variable in a GIMPLE_OMP_CONTINUE. */
6734inline void
6736{
6737 cont_stmt->control_def = def;
6738}
6739
6741/* Get the use of the control variable in a GIMPLE_OMP_CONTINUE. */
6742
6743inline tree
6745{
6746 return cont_stmt->control_use;
6747}
6748
6749
6750/* The same as above, but return the address. */
6751
6752inline tree *
6754{
6755 return &cont_stmt->control_use;
6756}
6757
6758
6759/* Set the use of the control variable in a GIMPLE_OMP_CONTINUE. */
6760
6761inline void
6763{
6764 cont_stmt->control_use = use;
6765}
6766
6767/* Return the guard associated with the GIMPLE_ASSUME statement GS. */
6768
6769inline tree
6774 return assume_stmt->guard;
6775}
6776
6777/* Set the guard associated with the GIMPLE_ASSUME statement GS. */
6779inline void
6781{
6783 assume_stmt->guard = guard;
6784}
6785
6790 return &assume_stmt->guard;
6791}
6793/* Return the address of the GIMPLE sequence contained in the GIMPLE_ASSUME
6794 statement GS. */
6795
6796inline gimple_seq *
6800 return &assume_stmt->body;
6801}
6802
6803/* Return the GIMPLE sequence contained in the GIMPLE_ASSUME statement GS. */
6805inline gimple_seq
6806gimple_assume_body (const gimple *gs)
6807{
6808 const gimple_statement_assume *assume_stmt
6810 return assume_stmt->body;
6811}
6812
6813/* Return a pointer to the body for the GIMPLE_TRANSACTION statement
6814 TRANSACTION_STMT. */
6815
6817gimple_transaction_body_ptr (gtransaction *transaction_stmt)
6818{
6819 return &transaction_stmt->body;
6820}
6821
6822/* Return the body for the GIMPLE_TRANSACTION statement TRANSACTION_STMT. */
6823
6825gimple_transaction_body (const gtransaction *transaction_stmt)
6826{
6827 return transaction_stmt->body;
6828}
6829
6830/* Return the label associated with a GIMPLE_TRANSACTION. */
6831
6832inline tree
6834{
6835 return transaction_stmt->label_norm;
6836}
6837
6838inline tree *
6839gimple_transaction_label_norm_ptr (gtransaction *transaction_stmt)
6840{
6841 return &transaction_stmt->label_norm;
6843
6844inline tree
6845gimple_transaction_label_uninst (const gtransaction *transaction_stmt)
6846{
6847 return transaction_stmt->label_uninst;
6849
6850inline tree *
6851gimple_transaction_label_uninst_ptr (gtransaction *transaction_stmt)
6852{
6853 return &transaction_stmt->label_uninst;
6855
6856inline tree
6857gimple_transaction_label_over (const gtransaction *transaction_stmt)
6858{
6859 return transaction_stmt->label_over;
6860}
6861
6862inline tree *
6864{
6865 return &transaction_stmt->label_over;
6866}
6867
6868/* Return the subcode associated with a GIMPLE_TRANSACTION. */
6869
6870inline unsigned int
6872{
6873 return transaction_stmt->subcode;
6874}
6875
6876/* Set BODY to be the body for the GIMPLE_TRANSACTION statement
6877 TRANSACTION_STMT. */
6878
6879inline void
6880gimple_transaction_set_body (gtransaction *transaction_stmt,
6881 gimple_seq body)
6882{
6883 transaction_stmt->body = body;
6884}
6885
6886/* Set the label associated with a GIMPLE_TRANSACTION. */
6887
6888inline void
6889gimple_transaction_set_label_norm (gtransaction *transaction_stmt, tree label)
6890{
6891 transaction_stmt->label_norm = label;
6892}
6893
6894inline void
6895gimple_transaction_set_label_uninst (gtransaction *transaction_stmt, tree label)
6897 transaction_stmt->label_uninst = label;
6898}
6899
6900inline void
6901gimple_transaction_set_label_over (gtransaction *transaction_stmt, tree label)
6902{
6903 transaction_stmt->label_over = label;
6904}
6905
6906/* Set the subcode associated with a GIMPLE_TRANSACTION. */
6907
6908inline void
6909gimple_transaction_set_subcode (gtransaction *transaction_stmt,
6910 unsigned int subcode)
6911{
6912 transaction_stmt->subcode = subcode;
6913}
6914
6915/* Return a pointer to the return value for GIMPLE_RETURN GS. */
6916
6917inline tree *
6918gimple_return_retval_ptr (greturn *gs)
6919{
6920 return &gs->op[0];
6921}
6923/* Return the return value for GIMPLE_RETURN GS. */
6924
6925inline tree
6926gimple_return_retval (const greturn *gs)
6927{
6928 return gs->op[0];
6929}
6930
6931
6932/* Set RETVAL to be the return value for GIMPLE_RETURN GS. */
6933
6934inline void
6935gimple_return_set_retval (greturn *gs, tree retval)
6936{
6937 gs->op[0] = retval;
6938}
6939
6940
6941/* Returns true when the gimple statement STMT is any of the OMP types. */
6942
6943#define CASE_GIMPLE_OMP \
6944 case GIMPLE_OMP_PARALLEL: \
6945 case GIMPLE_OMP_TASK: \
6946 case GIMPLE_OMP_FOR: \
6947 case GIMPLE_OMP_SECTIONS: \
6948 case GIMPLE_OMP_SECTIONS_SWITCH: \
6949 case GIMPLE_OMP_SINGLE: \
6950 case GIMPLE_OMP_TARGET: \
6951 case GIMPLE_OMP_TEAMS: \
6952 case GIMPLE_OMP_SCOPE: \
6953 case GIMPLE_OMP_DISPATCH: \
6954 case GIMPLE_OMP_INTEROP: \
6955 case GIMPLE_OMP_SECTION: \
6956 case GIMPLE_OMP_STRUCTURED_BLOCK: \
6957 case GIMPLE_OMP_MASTER: \
6958 case GIMPLE_OMP_MASKED: \
6959 case GIMPLE_OMP_TASKGROUP: \
6960 case GIMPLE_OMP_ORDERED: \
6961 case GIMPLE_OMP_CRITICAL: \
6962 case GIMPLE_OMP_SCAN: \
6963 case GIMPLE_OMP_RETURN: \
6964 case GIMPLE_OMP_ATOMIC_LOAD: \
6965 case GIMPLE_OMP_ATOMIC_STORE: \
6966 case GIMPLE_OMP_CONTINUE
6967
6968inline bool
6969is_gimple_omp (const gimple *stmt)
6970{
6971 switch (gimple_code (stmt))
6972 {
6974 return true;
6975 default:
6976 return false;
6977 }
6978}
6979
6980/* Return true if the OMP gimple statement STMT is any of the OpenACC types
6981 specifically. */
6982
6983inline bool
6984is_gimple_omp_oacc (const gimple *stmt)
6985{
6987 switch (gimple_code (stmt))
6988 {
6989 case GIMPLE_OMP_ATOMIC_LOAD:
6990 case GIMPLE_OMP_ATOMIC_STORE:
6991 case GIMPLE_OMP_CONTINUE:
6992 case GIMPLE_OMP_RETURN:
6993 /* Codes shared between OpenACC and OpenMP cannot be used to disambiguate
6994 the two. */
6995 gcc_unreachable ();
6996
6997 case GIMPLE_OMP_FOR:
6998 switch (gimple_omp_for_kind (stmt))
6999 {
7001 return true;
7002 default:
7003 return false;
7004 }
7005 case GIMPLE_OMP_TARGET:
7006 switch (gimple_omp_target_kind (stmt))
7007 {
7020 return true;
7021 default:
7022 return false;
7023 }
7024 default:
7025 return false;
7026 }
7027}
7028
7029
7030/* Return true if the OMP gimple statement STMT is offloaded. */
7031
7032inline bool
7036 switch (gimple_code (stmt))
7037 {
7038 case GIMPLE_OMP_TARGET:
7039 switch (gimple_omp_target_kind (stmt))
7040 {
7047 return true;
7048 default:
7049 return false;
7050 }
7051 default:
7052 return false;
7053 }
7054}
7055
7056
7057/* Returns TRUE if statement G is a GIMPLE_NOP. */
7058
7059inline bool
7060gimple_nop_p (const gimple *g)
7061{
7062 return gimple_code (g) == GIMPLE_NOP;
7064
7065
7066/* Return true if GS is a GIMPLE_RESX. */
7067
7068inline bool
7069is_gimple_resx (const gimple *gs)
7070{
7071 return gimple_code (gs) == GIMPLE_RESX;
7073
7074
7075/* Enum and arrays used for allocation stats. Keep in sync with
7076 gimple.cc:gimple_alloc_kind_names. */
7078{
7079 gimple_alloc_kind_assign, /* Assignments. */
7080 gimple_alloc_kind_phi, /* PHI nodes. */
7081 gimple_alloc_kind_cond, /* Conditionals. */
7082 gimple_alloc_kind_rest, /* Everything else. */
7084};
7085
7086extern uint64_t gimple_alloc_counts[];
7087extern uint64_t gimple_alloc_sizes[];
7088
7089/* Return the allocation kind for a given stmt CODE. */
7090inline enum gimple_alloc_kind
7092{
7093 switch (code)
7094 {
7095 case GIMPLE_ASSIGN:
7097 case GIMPLE_PHI:
7098 return gimple_alloc_kind_phi;
7099 case GIMPLE_COND:
7101 default:
7103 }
7104}
7105
7106/* Return true if a location should not be emitted for this statement
7107 by annotate_all_with_location. */
7108
7109inline bool
7110gimple_do_not_emit_location_p (const gimple *g)
7111{
7112 return gimple_plf (g, GF_PLF_1);
7113}
7114
7115/* Mark statement G so a location will not be emitted by
7116 annotate_one_with_location. */
7117
7118inline void
7120{
7121 /* The PLF flags are initialized to 0 when a new tuple is created,
7122 so no need to initialize it anywhere. */
7123 gimple_set_plf (g, GF_PLF_1, true);
7124}
7125
7126#endif /* GCC_GIMPLE_H */
bool bb_in_transaction(basic_block bb)
Definition basic-block.h:504
#define EDGE_PRED(bb, i)
Definition basic-block.h:302
gimple * currently_expanding_gimple_stmt
Definition cfgexpand.cc:94
virtual void update_range_info(tree name)
Definition value-query.cc:98
gcc::context * g
Definition context.cc:31
struct basic_block_def * basic_block
Definition coretypes.h:359
class edge_def * edge
Definition coretypes.h:356
gimple * gimple_seq
Definition coretypes.h:100
const class edge_def * const_edge
Definition coretypes.h:357
const class bitmap_head * const_bitmap
Definition coretypes.h:52
const struct basic_block_def * const_basic_block
Definition coretypes.h:360
const union tree_node * const_tree
Definition coretypes.h:98
#define GTY(x)
Definition coretypes.h:41
union tree_node * tree
Definition coretypes.h:97
int alias_set_type
Definition coretypes.h:353
volatile signed char sc
Definition fp-test.cc:68
#define cfun
Definition function.h:485
void copy_warning(location_t to, location_t from)
Definition gcc-diagnostic-spec.cc:205
built_in_function
Definition genmatch.cc:1018
combined_fn
Definition genmatch.cc:1029
internal_fn
Definition genmatch.cc:1024
tree_code
Definition genmatch.cc:1011
bool is_gimple_reg(tree t)
Definition gimple-expr.cc:788
tree gimple_call_addr_fndecl(const_tree fn)
Definition gimple-expr.h:164
void annotate_all_with_location_after(gimple_seq seq, gimple_stmt_iterator gsi, location_t location)
Definition gimple.cc:1499
bool gimple_call_same_target_p(const gimple *c1, const gimple *c2)
Definition gimple.cc:1583
int gimple_call_retslot_flags(const gcall *stmt)
Definition gimple.cc:1711
gimple * gimple_alloc(enum gimple_code code, unsigned num_ops MEM_STAT_DECL)
Definition gimple.cc:168
gbind * gimple_build_bind(tree vars, gimple_seq body, tree block)
Definition gimple.cc:635
bool gimple_call_builtin_p(const gimple *stmt)
Definition gimple.cc:2979
greturn * gimple_build_return(tree retval)
Definition gimple.cc:220
gdebug * gimple_build_debug_begin_stmt(tree block, location_t location MEM_STAT_DECL)
Definition gimple.cc:922
gdebug * gimple_build_debug_bind(tree var, tree value, gimple *stmt MEM_STAT_DECL)
Definition gimple.cc:880
const unsigned char gimple_rhs_class_table[]
Definition gimple.cc:2584
size_t gimple_size(enum gimple_code code, unsigned num_ops)
Definition gimple.cc:142
gomp_for * gimple_build_omp_for(gimple_seq body, int kind, tree clauses, size_t collapse, gimple_seq pre_body)
Definition gimple.cc:988
const char *const gimple_code_name[]
Definition gimple.cc:96
gswitch * gimple_build_switch(tree index, tree default_label, const vec< tree > &args)
Definition gimple.cc:850
gomp_single * gimple_build_omp_single(gimple_seq body, tree clauses)
Definition gimple.cc:1236
bool nonfreeing_call_p(const gimple *call)
Definition gimple.cc:3085
int gimple_call_flags(const gimple *stmt)
Definition gimple.cc:1600
gcall * gimple_build_call_from_tree(tree t, tree fnptrtype)
Definition gimple.cc:385
bool gimple_has_side_effects(const gimple *s)
Definition gimple.cc:2355
void gimple_set_lhs(gimple *stmt, tree lhs)
Definition gimple.cc:2026
gimple * gimple_build_omp_return(bool wait_p)
Definition gimple.cc:1172
uint64_t gimple_alloc_sizes[(int) gimple_alloc_kind_all]
Definition gimple.cc:110
bool gimple_inexpensive_call_p(const gcall *stmt)
Definition gimple.cc:3571
gomp_parallel * gimple_build_omp_parallel(gimple_seq body, tree clauses, tree child_fn, tree data_arg)
Definition gimple.cc:1014
gimple * gimple_build_omp_masked(gimple_seq body, tree clauses)
Definition gimple.cc:1106
gasm * gimple_build_asm_vec(const char *string, vec< tree, va_gc > *inputs, vec< tree, va_gc > *outputs, vec< tree, va_gc > *clobbers, vec< tree, va_gc > *labels)
Definition gimple.cc:689
EXPORTED_CONST size_t gimple_ops_offset_[]
Definition gimple.cc:84
bool gimple_builtin_call_types_compatible_p(const gimple *stmt, tree fndecl)
Definition gimple.cc:2932
location_t gimple_or_expr_nonartificial_location(const gimple *stmt, tree expr)
Definition gimple.cc:3585
bool gimple_compare_field_offset(const_tree f1, const_tree f2)
Definition gimple.cc:2635
geh_dispatch * gimple_build_eh_dispatch(int region)
Definition gimple.cc:866
bool gimple_call_nonnull_result_p(const gcall *call)
Definition gimple.cc:1787
void gimple_assign_set_rhs_with_ops(gimple_stmt_iterator *gsi, enum tree_code code, tree op1, tree op2, tree op3)
Definition gimple.cc:1969
gassign * gimple_build_assign(tree lhs, tree rhs MEM_STAT_DECL)
Definition gimple.cc:473
uint64_t gimple_alloc_counts[(int) gimple_alloc_kind_all]
Definition gimple.cc:109
gimple * gimple_build_omp_master(gimple_seq body)
Definition gimple.cc:1092
gimple * gimple_build_assume(tree guard, gimple_seq body)
Definition gimple.cc:1365
gcall * gimple_call_copy_skip_args(const gcall *stmt, const_bitmap args_to_skip)
Definition gimple.cc:2595
gimple * gimple_build_omp_sections_switch(void)
Definition gimple.cc:1223
gcond * gimple_build_cond_from_tree(tree cond, tree t_label, tree f_label)
Definition gimple.cc:576
gcall * gimple_build_call_internal(enum internal_fn fn, unsigned nargs,...)
Definition gimple.cc:346
ggoto * gimple_build_goto(tree dest)
Definition gimple.cc:612
gomp_sections * gimple_build_omp_sections(gimple_seq body, tree clauses)
Definition gimple.cc:1208
void gimple_assign_set_rhs_from_tree(gimple_stmt_iterator *gsi, tree expr)
Definition gimple.cc:1952
gtry * gimple_build_try(gimple_seq eval, gimple_seq cleanup, enum gimple_try_flags kind)
Definition gimple.cc:782
geh_else * gimple_build_eh_else(gimple_seq n_body, gimple_seq e_body)
Definition gimple.cc:766
gomp_task * gimple_build_omp_task(gimple_seq body, tree clauses, tree child_fn, tree data_arg, tree copy_fn, tree arg_size, tree arg_align)
Definition gimple.cc:1039
geh_mnt * gimple_build_eh_must_not_throw(tree decl)
Definition gimple.cc:752
gimple * gimple_build_omp_scope(gimple_seq body, tree clauses)
Definition gimple.cc:1255
gcall * gimple_build_call_valist(tree fn, unsigned nargs, va_list ap)
Definition gimple.cc:309
bool empty_body_p(gimple_seq body)
Definition gimple.cc:1545
gcall * gimple_build_call_internal_1(enum internal_fn fn, unsigned nargs)
Definition gimple.cc:330
int gimple_call_arg_flags(const gcall *stmt, unsigned arg)
Definition gimple.cc:1680
gomp_atomic_load * gimple_build_omp_atomic_load(tree lhs, tree rhs, enum omp_memory_order mo)
Definition gimple.cc:1338
gomp_teams * gimple_build_omp_teams(gimple_seq body, tree clauses)
Definition gimple.cc:1324
gcatch * gimple_build_catch(tree types, gimple_seq handler)
Definition gimple.cc:723
void gimple_seq_add_stmt(gimple_seq *seq_p, gimple *gs)
Definition gimple.cc:1412
geh_filter * gimple_build_eh_filter(tree types, gimple_seq failure)
Definition gimple.cc:739
void gimple_cond_set_condition_from_tree(gcond *stmt, tree cond)
Definition gimple.cc:589
gdebug * gimple_build_debug_source_bind(tree var, tree value, gimple *stmt MEM_STAT_DECL)
Definition gimple.cc:900
gomp_continue * gimple_build_omp_continue(tree control_def, tree control_use)
Definition gimple.cc:1140
gimple * gimple_build_omp_section(gimple_seq body)
Definition gimple.cc:1062
void dump_gimple_statistics(void)
Definition gimple.cc:2503
bool gimple_assign_unary_nop_p(const gimple *gs)
Definition gimple.cc:1871
bool gimple_could_trap_p_1(const gimple *s, bool include_mem, bool include_stores)
Definition gimple.cc:2391
gomp_scan * gimple_build_omp_scan(gimple_seq body, tree clauses)
Definition gimple.cc:1189
gimple * gimple_copy(const gimple *stmt)
Definition gimple.cc:2045
void gimple_seq_set_location(gimple_seq seq, location_t loc)
Definition gimple.cc:3529
glabel * gimple_build_label(tree label)
Definition gimple.cc:601
EXPORTED_CONST enum gimple_statement_structure_enum gss_for_code_[]
Definition gimple.cc:102
bool gimple_assign_load_p(const gimple *gs)
Definition gimple.cc:1884
bool infer_nonnull_range(gimple *stmt, tree op)
Definition gimple.cc:3174
bool infer_nonnull_range_by_dereference(gimple *stmt, tree op)
Definition gimple.cc:3183
void gimple_seq_add_seq(gimple_seq *dst_p, gimple_seq src)
Definition gimple.cc:1444
void dump_decl_set(FILE *file, const_bitmap set)
Definition gimple.cc:3061
gcall * gimple_build_call_vec(tree fn, const vec< tree > &args)
Definition gimple.cc:269
void gimple_init(gimple *g, enum gimple_code code, unsigned num_ops)
Definition gimple.cc:153
bool gimple_assign_ssa_name_copy_p(const gimple *gs)
Definition gimple.cc:1848
gimple * gimple_build_omp_structured_block(gimple_seq body)
Definition gimple.cc:1077
gcall * gimple_build_call_internal_vec(enum internal_fn fn, const vec< tree > &args)
Definition gimple.cc:366
tree gimple_get_lhs(const gimple *stmt)
Definition gimple.cc:2007
gcall * gimple_build_call(tree fn, unsigned nargs,...)
Definition gimple.cc:286
void gimple_seq_discard(gimple_seq seq)
Definition gimple.cc:3538
bool gimple_asm_clobbers_memory_p(const gasm *stmt)
Definition gimple.cc:3040
gimple * gimple_build_wce(gimple_seq cleanup)
Definition gimple.cc:803
void gimple_set_bb(gimple *stmt, basic_block bb)
Definition gimple.cc:1904
gomp_target * gimple_build_omp_target(gimple_seq body, int kind, tree clauses, gimple_seq iterator_loops)
Definition gimple.cc:1303
bool gimple_could_trap_p(const gimple *s)
Definition gimple.cc:2485
void gimple_call_reset_alias_info(gcall *s)
Definition gimple.cc:233
gimple * gimple_build_omp_dispatch(gimple_seq body, tree clauses)
Definition gimple.cc:1271
gresx * gimple_build_resx(int region)
Definition gimple.cc:816
gimple * gimple_build_nop(void)
Definition gimple.cc:624
gdebug * gimple_build_debug_inline_entry(tree block, location_t location MEM_STAT_DECL)
Definition gimple.cc:943
gimple * gimple_build_omp_taskgroup(gimple_seq body, tree clauses)
Definition gimple.cc:1123
gomp_ordered * gimple_build_omp_ordered(gimple_seq body, tree clauses)
Definition gimple.cc:1156
int gimple_call_return_flags(const gcall *stmt)
Definition gimple.cc:1767
bool gimple_call_operator_delete_p(const gcall *stmt)
Definition gimple.cc:2967
int gimple_call_static_chain_flags(const gcall *stmt)
Definition gimple.cc:1739
gtransaction * gimple_build_transaction(gimple_seq body)
Definition gimple.cc:1377
void preprocess_case_label_vec_for_gimple(vec< tree > &labels, tree index_type, tree *default_casep)
Definition gimple.cc:3362
gcond * gimple_build_cond(enum tree_code pred_code, tree lhs, tree rhs, tree t_label, tree f_label)
Definition gimple.cc:558
void annotate_all_with_location(gimple_seq stmt_p, location_t location)
Definition gimple.cc:1514
bool infer_nonnull_range_by_attribute(const gimple *stmt, tree op, tree *op2, tree *op3)
Definition gimple.cc:3208
gimple_seq gimple_seq_copy(gimple_seq src)
Definition gimple.cc:1563
gomp_critical * gimple_build_omp_critical(gimple_seq body, tree name, tree clauses)
Definition gimple.cc:967
tree gimple_signed_type(tree type)
Definition gimple.cc:2875
void gimple_seq_add_stmt_without_update(gimple_seq *seq_p, gimple *gs)
Definition gimple.cc:1429
bool gimple_assign_rhs_could_trap_p(const gimple *s)
Definition gimple.cc:2493
gcall * gimple_build_builtin_unreachable(location_t loc)
Definition gimple.cc:457
void sort_case_labels(vec< tree > &label_vec)
Definition gimple.cc:3337
gimple * gimple_build_omp_interop(tree clauses)
Definition gimple.cc:1286
bool nonbarrier_call_p(const gimple *call)
Definition gimple.cc:3131
gswitch * gimple_build_switch_nlabels(unsigned nlabels, tree index, tree default_label)
Definition gimple.cc:831
combined_fn gimple_call_combined_fn(const gimple *stmt)
Definition gimple.cc:3020
unsigned get_gimple_rhs_num_ops(enum tree_code code)
Definition gimple.cc:2537
void maybe_remove_unused_call_args(struct function *fn, gimple *stmt)
Definition gimple.cc:3556
tree gimple_call_nonnull_arg(const gcall *call)
Definition gimple.cc:1813
tree gimple_unsigned_type(tree type)
Definition gimple.cc:2866
alias_set_type gimple_get_alias_set(tree t)
Definition gimple.cc:2885
void gimple_move_vops(gimple *new_stmt, const gimple *old_stmt)
Definition gimple.cc:2339
bool gimple_assign_copy_p(const gimple *gs)
Definition gimple.cc:1838
gomp_atomic_store * gimple_build_omp_atomic_store(tree val, enum omp_memory_order mo)
Definition gimple.cc:1353
void gimple_seq_add_seq_without_update(gimple_seq *dst_p, gimple_seq src)
Definition gimple.cc:1459
void gimple_omp_target_set_clauses(gomp_target *omp_target_stmt, tree clauses)
Definition gimple.h:6307
gimple_alloc_kind
Definition gimple.h:7031
@ gimple_alloc_kind_assign
Definition gimple.h:7032
@ gimple_alloc_kind_phi
Definition gimple.h:7033
@ gimple_alloc_kind_rest
Definition gimple.h:7035
@ gimple_alloc_kind_all
Definition gimple.h:7036
@ gimple_alloc_kind_cond
Definition gimple.h:7034
tree gimple_transaction_label_uninst(const gtransaction *transaction_stmt)
Definition gimple.h:6798
tree gimple_label_label(const glabel *gs)
Definition gimple.h:3977
tree * gimple_omp_task_arg_size_ptr(gimple *gs)
Definition gimple.h:6208
gimple_seq * gimple_omp_target_iterator_loops_ptr(gimple *gs)
Definition gimple.h:6405
tree gimple_omp_task_arg_size(const gimple *gs)
Definition gimple.h:6198
tree * gimple_omp_scope_clauses_ptr(gimple *gs)
Definition gimple.h:5466
gimple * gimple_seq_node
Definition gimple.h:32
bool gimple_clobber_p(const gimple *s)
Definition gimple.h:2989
void gimple_omp_task_set_clauses(gimple *gs, tree clauses)
Definition gimple.h:5946
location_t gimple_phi_arg_location_from_edge(const gphi *phi, edge e)
Definition gimple.h:4807
void gimple_cond_set_code(gcond *gs, enum tree_code code)
Definition gimple.h:3724
location_t gimple_location(const gimple *g)
Definition gimple.h:1907
tree gimple_omp_interop_clauses(const gimple *gs)
Definition gimple.h:5516
tree * gimple_catch_types_ptr(gcatch *catch_stmt)
Definition gimple.h:4305
tree gimple_omp_for_initial(const gimple *gs, size_t i)
Definition gimple.h:5710
gimple_seq gimple_eh_else_n_body(const geh_else *eh_else_stmt)
Definition gimple.h:4437
bool gimple_seq_singleton_p(gimple_seq seq)
Definition gimple.h:1985
gimple_seq * gimple_omp_for_pre_body_ptr(gimple *gs)
Definition gimple.h:5810
static void gimple_call_set_expected_throw(gcall *s, bool expected_throw_p)
Definition gimple.h:3581
tree * gimple_omp_task_child_fn_ptr(gimple *gs)
Definition gimple.h:6016
void gimple_omp_set_subcode(gimple *s, unsigned int subcode)
Definition gimple.h:2357
gimple_seq gimple_eh_filter_failure(const gimple *gs)
Definition gimple.h:4385
gimple_seq_node gimple_seq_last(gimple_seq s)
Definition gimple.h:1731
tree gimple_bind_block(const gbind *bind_stmt)
Definition gimple.h:4088
void gimple_omp_atomic_store_set_val(gomp_atomic_store *store_stmt, tree val)
Definition gimple.h:6591
tree * gimple_op_ptr(gimple *gs, unsigned i)
Definition gimple.h:2615
tree gimple_cond_lhs(const gcond *gs)
Definition gimple.h:3734
void gimple_transaction_set_label_norm(gtransaction *transaction_stmt, tree label)
Definition gimple.h:6842
tree gimple_omp_ordered_clauses(const gomp_ordered *ord_stmt)
Definition gimple.h:5328
tree gimple_block(const gimple *g)
Definition gimple.h:1888
bool gimple_cond_false_canonical_p(const gcond *gs)
Definition gimple.h:3929
void gimple_try_set_eval(gtry *try_stmt, gimple_seq eval)
Definition gimple.h:4559
tree * gimple_omp_taskreg_data_arg_ptr(gimple *gs)
Definition gimple.h:6146
tree * gimple_vdef_ptr(gimple *g)
Definition gimple.h:2246
bool gimple_omp_task_taskloop_p(const gimple *g)
Definition gimple.h:5957
void gimple_bind_append_vars(gbind *bind_stmt, tree vars)
Definition gimple.h:4035
void gimple_omp_task_set_taskwait_p(gimple *g, bool taskwait_p)
Definition gimple.h:5993
bool gimple_call_from_thunk_p(const gcall *s)
Definition gimple.h:3488
tree gimple_omp_task_child_fn(const gimple *gs)
Definition gimple.h:6006
gimple_seq * gimple_eh_else_n_body_ptr(geh_else *eh_else_stmt)
Definition gimple.h:4431
void gimple_assign_set_rhs2(gassign *gs, tree rhs)
Definition gimple.h:2797
void gimple_bind_add_seq(gbind *bind_stmt, gimple_seq seq)
Definition gimple.h:4078
tree * gimple_omp_teams_data_arg_ptr(gomp_teams *omp_teams_stmt)
Definition gimple.h:6491
tree gimple_omp_atomic_load_rhs(const gomp_atomic_load *load_stmt)
Definition gimple.h:6654
void gimple_omp_task_set_child_fn(gimple *gs, tree child_fn)
Definition gimple.h:6026
bool gimple_has_ops(const gimple *g)
Definition gimple.h:2122
tree gimple_op(const gimple *gs, unsigned i)
Definition gimple.h:2601
tree * gimple_omp_taskreg_child_fn_ptr(gimple *gs)
Definition gimple.h:6112
bool gimple_cond_true_p(const gcond *gs)
Definition gimple.h:3865
tree gimple_assume_guard(const gimple *gs)
Definition gimple.h:6723
void gimple_debug_bind_reset_value(gimple *dbg)
Definition gimple.h:5107
void gimple_omp_teams_set_data_arg(gomp_teams *omp_teams_stmt, tree data_arg)
Definition gimple.h:6500
bool gimple_debug_inline_entry_p(const gimple *s)
Definition gimple.h:5205
bool gimple_omp_atomic_need_value_p(const gimple *g)
Definition gimple.h:2490
void gimple_assign_set_rhs3(gassign *gs, tree rhs)
Definition gimple.h:2850
void gimple_cond_make_false(gcond *gs)
Definition gimple.h:3843
void gimple_omp_target_set_child_fn(gomp_target *omp_target_stmt, tree child_fn)
Definition gimple.h:6355
gimple * gimple_seq_first_stmt(gimple_seq s)
Definition gimple.h:1711
enum gimple_statement_structure_enum gimple_statement_structure(const gimple *gs)
Definition gimple.h:1830
tree * gimple_omp_for_initial_ptr(gimple *gs, size_t i)
Definition gimple.h:5721
void gimple_omp_teams_set_host(gomp_teams *omp_teams_stmt, bool value)
Definition gimple.h:6516
tree * gimple_omp_sections_control_ptr(gimple *gs)
Definition gimple.h:6570
void gimple_omp_task_set_data_arg(gimple *gs, tree data_arg)
Definition gimple.h:6057
void gimple_bind_set_body(gbind *bind_stmt, gimple_seq seq)
Definition gimple.h:4060
tree gimple_eh_filter_types(const gimple *gs)
Definition gimple.h:4352
tree gimple_vdef(const gimple *g)
Definition gimple.h:2222
void gimple_asm_set_volatile(gasm *asm_stmt, bool volatile_p)
Definition gimple.h:4241
void gimple_omp_parallel_set_combined_p(gimple *g, bool combined_p)
Definition gimple.h:2476
bool gimple_store_p(const gimple *gs)
Definition gimple.h:2964
#define CASE_GIMPLE_OMP
Definition gimple.h:6896
bool gimple_debug_bind_has_value_p(const gimple *dbg)
Definition gimple.h:5118
bool gimple_has_lhs(const gimple *stmt)
Definition gimple.h:3695
bool gimple_assign_nontemporal_move_p(const gassign *gs)
Definition gimple.h:2887
void gimple_omp_for_set_pre_body(gimple *gs, gimple_seq pre_body)
Definition gimple.h:5831
void gimple_call_set_tail(gcall *s, bool tail_p)
Definition gimple.h:3412
tree * gimple_call_chain_ptr(gcall *call_stmt)
Definition gimple.h:3325
void gimple_phi_set_result(gphi *phi, tree result)
Definition gimple.h:4681
unsigned gimple_omp_subcode(const gimple *s)
Definition gimple.h:2347
gimple_code
Definition gimple.h:34
void gimple_debug_bind_set_value(gimple *dbg, tree value)
Definition gimple.h:5092
unsigned int gimple_stmt_max_uid(struct function *fn)
Definition gimple.h:1680
void gimple_transaction_set_label_over(gtransaction *transaction_stmt, tree label)
Definition gimple.h:6854
location_t gimple_phi_arg_location(const gphi *phi, size_t i)
Definition gimple.h:4799
tree * gimple_omp_sections_clauses_ptr(gimple *gs)
Definition gimple.h:6537
tree gimple_debug_source_bind_get_value(const gimple *dbg)
Definition gimple.h:5152
void gimple_omp_ordered_set_clauses(gomp_ordered *ord_stmt, tree clauses)
Definition gimple.h:5348
bool gimple_call_va_arg_pack_p(const gcall *s)
Definition gimple.h:3534
void gimple_asm_set_basic(gasm *asm_stmt, bool basic_p)
Definition gimple.h:4275
void gimple_omp_for_set_cond(gimple *gs, size_t i, enum tree_code cond)
Definition gimple.h:5665
tree gimple_debug_source_bind_get_var(const gimple *dbg)
Definition gimple.h:5141
bool gimple_debug_nonbind_marker_p(const gimple *s)
Definition gimple.h:5216
void gimple_cond_set_rhs(gcond *gs, tree rhs)
Definition gimple.h:3794
unsigned int inc_gimple_stmt_max_uid(struct function *fn)
Definition gimple.h:1694
tree gimple_transaction_label_norm(const gtransaction *transaction_stmt)
Definition gimple.h:6786
tree * gimple_omp_scan_clauses_ptr(gomp_scan *scan_stmt)
Definition gimple.h:5367
void gimple_omp_taskgroup_set_clauses(gimple *gs, tree clauses)
Definition gimple.h:5409
bool gimple_do_not_emit_location_p(const gimple *g)
Definition gimple.h:7063
bool gimple_omp_for_combined_p(const gimple *g)
Definition gimple.h:5565
unsigned int gimple_plf(const gimple *stmt, enum plf_mask plf)
Definition gimple.h:2075
tree * gimple_omp_atomic_store_val_ptr(gomp_atomic_store *store_stmt)
Definition gimple.h:6609
gimple_seq phi_nodes(const_basic_block bb)
Definition gimple.h:4734
void gimple_set_visited(gimple *stmt, bool visited_p)
Definition gimple.h:2020
tree * gimple_omp_task_arg_align_ptr(gimple *gs)
Definition gimple.h:6238
static bool gimple_call_expected_throw_p(const gcall *s)
Definition gimple.h:3593
enum tree_code gimple_omp_for_cond(const gimple *gs, size_t i)
Definition gimple.h:5654
bool gimple_call_internal_unique_p(const gcall *gs)
Definition gimple.h:3116
gbind * gimple_seq_first_stmt_as_a_bind(gimple_seq s)
Definition gimple.h:1721
tree gimple_omp_teams_child_fn(const gomp_teams *omp_teams_stmt)
Definition gimple.h:6454
gimple_rhs_class
Definition gimple.h:117
@ GIMPLE_TERNARY_RHS
Definition gimple.h:119
@ GIMPLE_INVALID_RHS
Definition gimple.h:118
@ GIMPLE_SINGLE_RHS
Definition gimple.h:122
@ GIMPLE_UNARY_RHS
Definition gimple.h:121
@ GIMPLE_BINARY_RHS
Definition gimple.h:120
void gimple_bind_add_stmt(gbind *bind_stmt, gimple *stmt)
Definition gimple.h:4069
tree gimple_assign_rhs3(const gassign *gs)
Definition gimple.h:2814
void gimple_goto_set_dest(ggoto *gs, tree dest)
Definition gimple.h:4006
tree * gimple_arg_ptr(gimple *gs, unsigned int i)
Definition gimple.h:4866
bool gimple_asm_inline_p(const gasm *asm_stmt)
Definition gimple.h:4253
tree gimple_omp_target_clauses(const gimple *gs)
Definition gimple.h:6287
void gimple_omp_continue_set_control_use(gomp_continue *cont_stmt, tree use)
Definition gimple.h:6715
void gimple_transaction_set_body(gtransaction *transaction_stmt, gimple_seq body)
Definition gimple.h:6833
tree gimple_omp_scope_clauses(const gimple *gs)
Definition gimple.h:5454
tree gimple_omp_for_incr(const gimple *gs, size_t i)
Definition gimple.h:5776
combined_fn gimple_call_combined_fn(const gimple *)
Definition gimple.cc:3020
unsigned gimple_switch_num_labels(const gswitch *gs)
Definition gimple.h:4911
void gimple_wce_set_cleanup(gimple *gs, gimple_seq cleanup)
Definition gimple.h:4599
tree gimple_switch_index(const gswitch *gs)
Definition gimple.h:4934
gimple * gimple_seq_last_stmt(gimple_seq s)
Definition gimple.h:1740
bool gimple_assign_cast_p(const gimple *s)
Definition gimple.h:2973
void gimple_omp_target_set_kind(gomp_target *g, int kind)
Definition gimple.h:6327
unsigned gimple_asm_nlabels(const gasm *asm_stmt)
Definition gimple.h:4135
tree gimple_omp_parallel_data_arg(const gomp_parallel *omp_parallel_stmt)
Definition gimple.h:5898
int get_lineno(const gimple *stmt)
Definition gimple.h:5228
void gimple_call_set_fntype(gcall *call_stmt, tree fntype)
Definition gimple.h:3194
void gimple_omp_task_set_arg_align(gimple *gs, tree arg_align)
Definition gimple.h:6248
unsigned gimple_call_num_args(const gcall *gs)
Definition gimple.h:3342
unsigned gimple_num_ops(const gimple *gs)
Definition gimple.h:2559
tree gimple_omp_parallel_clauses(const gimple *gs)
Definition gimple.h:5840
void gimple_switch_set_index(gswitch *gs, tree index)
Definition gimple.h:4952
void suppress_warning(gimple *, opt_code=all_warnings, bool=true) ATTRIBUTE_NONNULL(1)
Definition warning-control.cc:173
unsigned gimple_asm_noutputs(const gasm *asm_stmt)
Definition gimple.h:4118
bool gimple_debug_bind_p(const gimple *s)
Definition gimple.h:5038
bool gimple_omp_task_taskwait_p(const gimple *g)
Definition gimple.h:5982
void gimple_seq_set_last(gimple_seq *ps, gimple_seq_node last)
Definition gimple.h:1750
tree * gimple_omp_parallel_clauses_ptr(gomp_parallel *omp_parallel_stmt)
Definition gimple.h:5850
gf_mask
Definition gimple.h:137
@ GF_OMP_ATOMIC_NEED_VALUE
Definition gimple.h:200
@ GF_OMP_TARGET_KIND_ENTER_DATA
Definition gimple.h:169
@ GF_CALL_MUST_TAIL_CALL
Definition gimple.h:149
@ GF_OMP_TARGET_KIND_OACC_SERIAL
Definition gimple.h:173
@ GF_CALL_INTERNAL
Definition gimple.h:147
@ GF_OMP_ATOMIC_MEMORY_ORDER
Definition gimple.h:199
@ GF_CALL_NOTHROW
Definition gimple.h:145
@ GF_OMP_RETURN_NOWAIT
Definition gimple.h:195
@ GF_OMP_TARGET_KIND_OACC_DATA_KERNELS
Definition gimple.h:188
@ GF_CALL_CTRL_ALTERING
Definition gimple.h:148
@ GF_OMP_TEAMS_HOST
Definition gimple.h:189
@ GF_CALL_VA_ARG_PACK
Definition gimple.h:144
@ GF_OMP_PARALLEL_COMBINED
Definition gimple.h:154
@ GF_OMP_SECTION_LAST
Definition gimple.h:197
@ GF_OMP_TARGET_KIND_OACC_DATA
Definition gimple.h:174
@ GF_CALL_RETURN_SLOT_OPT
Definition gimple.h:142
@ GF_OMP_TARGET_KIND_EXIT_DATA
Definition gimple.h:170
@ GF_OMP_TARGET_KIND_DATA
Definition gimple.h:167
@ GF_OMP_TARGET_KIND_OACC_EXIT_DATA
Definition gimple.h:177
@ GF_PREDICT_TAKEN
Definition gimple.h:202
@ GF_CALL_TAILCALL
Definition gimple.h:143
@ GF_OMP_FOR_KIND_SIMD
Definition gimple.h:162
@ GF_ASM_BASIC
Definition gimple.h:138
@ GF_OMP_TASK_TASKWAIT
Definition gimple.h:156
@ GF_OMP_TARGET_KIND_OACC_UPDATE
Definition gimple.h:175
@ GF_OMP_TARGET_KIND_OACC_PARALLEL_KERNELS_PARALLELIZED
Definition gimple.h:182
@ GF_OMP_TARGET_KIND_OACC_KERNELS
Definition gimple.h:172
@ GF_OMP_TARGET_KIND_MASK
Definition gimple.h:165
@ GF_OMP_FOR_KIND_TASKLOOP
Definition gimple.h:160
@ GF_CALL_BY_DESCRIPTOR
Definition gimple.h:150
@ GF_CALL_FROM_THUNK
Definition gimple.h:141
@ GF_OMP_ORDERED_STANDALONE
Definition gimple.h:198
@ GF_OMP_TASK_TASKLOOP
Definition gimple.h:155
@ GF_OMP_FOR_COMBINED_INTO
Definition gimple.h:164
@ GF_OMP_ATOMIC_WEAK
Definition gimple.h:201
@ GF_OMP_TARGET_KIND_UPDATE
Definition gimple.h:168
@ GF_OMP_TARGET_KIND_REGION
Definition gimple.h:166
@ GF_ASM_INLINE
Definition gimple.h:140
@ GF_CALL_XTHROW
Definition gimple.h:153
@ GF_OMP_TARGET_KIND_OACC_HOST_DATA
Definition gimple.h:179
@ GF_CALL_FROM_NEW_OR_DELETE
Definition gimple.h:152
@ GF_OMP_FOR_KIND_MASK
Definition gimple.h:157
@ GF_OMP_FOR_COMBINED
Definition gimple.h:163
@ GF_OMP_FOR_KIND_OACC_LOOP
Definition gimple.h:161
@ GF_OMP_TARGET_KIND_OACC_DECLARE
Definition gimple.h:178
@ GF_ASM_VOLATILE
Definition gimple.h:139
@ GF_CALL_ALLOCA_FOR_VAR
Definition gimple.h:146
@ GF_OMP_FOR_KIND_DISTRIBUTE
Definition gimple.h:159
@ GF_OMP_TARGET_KIND_OACC_PARALLEL
Definition gimple.h:171
@ GF_OMP_TARGET_KIND_OACC_ENTER_DATA
Definition gimple.h:176
@ GF_OMP_FOR_KIND_FOR
Definition gimple.h:158
@ GF_OMP_TARGET_KIND_OACC_PARALLEL_KERNELS_GANG_SINGLE
Definition gimple.h:185
@ GF_CALL_NOCF_CHECK
Definition gimple.h:151
enum gimple_statement_structure_enum gss_for_code(enum gimple_code code)
Definition gimple.h:1820
tree * gimple_omp_for_index_ptr(gimple *gs, size_t i)
Definition gimple.h:5688
void gimple_omp_return_set_nowait(gimple *s)
Definition gimple.h:2368
void gimple_call_set_from_new_or_delete(gcall *s, bool from_new_or_delete_p)
Definition gimple.h:3498
tree gimple_omp_for_final(const gimple *gs, size_t i)
Definition gimple.h:5743
tree * gimple_omp_task_copy_fn_ptr(gimple *gs)
Definition gimple.h:6178
tree * gimple_omp_teams_child_fn_ptr(gomp_teams *omp_teams_stmt)
Definition gimple.h:6463
tree * gimple_omp_for_clauses_ptr(gimple *gs)
Definition gimple.h:5623
void gimple_init_singleton(gimple *g)
Definition gimple.h:2112
gimple_seq gimple_eh_else_e_body(const geh_else *eh_else_stmt)
Definition gimple.h:4449
void gimple_omp_task_set_taskloop_p(gimple *g, bool taskloop_p)
Definition gimple.h:5968
bool gimple_call_nothrow_p(const gcall *s)
Definition gimple.h:3571
void gimple_omp_for_set_index(gimple *gs, size_t i, tree index)
Definition gimple.h:5699
void gimple_catch_set_types(gcatch *catch_stmt, tree t)
Definition gimple.h:4334
gimple_seq gimple_try_cleanup(const gimple *gs)
Definition gimple.h:4536
gimple_seq * gimple_catch_handler_ptr(gcatch *catch_stmt)
Definition gimple.h:4315
T GIMPLE_CHECK2(gimple *gs)
Definition gimple.h:102
void gimple_set_use_ops(gimple *g, struct use_optype_d *use)
Definition gimple.h:2199
tree * gimple_assign_rhs1_ptr(gassign *gs)
Definition gimple.h:2728
tree * gimple_debug_source_bind_get_value_ptr(gimple *dbg)
Definition gimple.h:5163
bool gimple_call_ctrl_altering_p(const gcall *gs)
Definition gimple.h:3161
void gimple_omp_sections_set_clauses(gimple *gs, tree clauses)
Definition gimple.h:6548
tree * gimple_omp_return_lhs_ptr(gimple *g)
Definition gimple.h:2411
tree * gimple_omp_parallel_data_arg_ptr(gomp_parallel *omp_parallel_stmt)
Definition gimple.h:5907
void gimple_eh_else_set_e_body(geh_else *eh_else_stmt, gimple_seq seq)
Definition gimple.h:4461
tree * gimple_omp_atomic_load_rhs_ptr(gomp_atomic_load *load_stmt)
Definition gimple.h:6663
gimple_seq * gimple_wce_cleanup_ptr(gimple *gs)
Definition gimple.h:4578
void gimple_eh_dispatch_set_region(geh_dispatch *eh_dispatch_stmt, int region)
Definition gimple.h:4903
tree gimple_phi_result(const gphi *gs)
Definition gimple.h:4651
void gimple_assign_set_lhs(gassign *gs, tree lhs)
Definition gimple.h:2692
void gimple_asm_set_output_op(gasm *asm_stmt, unsigned index, tree out_op)
Definition gimple.h:4172
location_t gimple_location_safe(const gimple *g)
Definition gimple.h:1916
tree gimple_debug_bind_get_value(const gimple *dbg)
Definition gimple.h:5060
#define GIMPLE_CHECK(GS, CODE)
Definition gimple.h:99
gimple_seq * gimple_assume_body_ptr(gimple *gs)
Definition gimple.h:6750
tree * gimple_assume_guard_ptr(gimple *gs)
Definition gimple.h:6740
enum gimple_rhs_class gimple_assign_rhs_class(const gimple *gs)
Definition gimple.h:2943
bool stmt_can_terminate_bb_p(gimple *)
Definition tree-cfg.cc:8850
tree gimple_omp_masked_clauses(const gimple *gs)
Definition gimple.h:5420
void gimple_omp_for_set_combined_into_p(gomp_for *g, bool combined_p)
Definition gimple.h:5600
unsigned gimple_asm_ninputs(const gasm *asm_stmt)
Definition gimple.h:4109
void gimple_omp_interop_set_clauses(gimple *gs, tree clauses)
Definition gimple.h:5535
void gimple_omp_critical_set_name(gomp_critical *crit_stmt, tree name)
Definition gimple.h:5290
void gimple_try_set_catch_is_cleanup(gtry *g, bool catch_is_cleanup)
Definition gimple.h:4545
void gimple_omp_taskreg_set_clauses(gimple *gs, tree clauses)
Definition gimple.h:6090
gimple_seq * gimple_omp_body_ptr(gimple *gs)
Definition gimple.h:5245
bool gimple_seq_empty_p(gimple_seq s)
Definition gimple.h:1768
tree gimple_cond_false_label(const gcond *gs)
Definition gimple.h:3834
bool gimple_omp_teams_host(const gomp_teams *omp_teams_stmt)
Definition gimple.h:6508
struct use_optype_d * gimple_use_ops(const gimple *g)
Definition gimple.h:2186
void set_gimple_stmt_max_uid(struct function *fn, unsigned int maxid)
Definition gimple.h:1687
tree * gimple_cond_lhs_ptr(gcond *gs)
Definition gimple.h:3750
tree gimple_omp_continue_control_use(const gomp_continue *cont_stmt)
Definition gimple.h:6697
tree gimple_omp_teams_clauses(const gimple *gs)
Definition gimple.h:6426
gimple_seq bb_seq(const_basic_block bb)
Definition gimple.h:1787
gimple_seq gimple_wce_cleanup(const gimple *gs)
Definition gimple.h:4588
void gimple_omp_continue_set_control_def(gomp_continue *cont_stmt, tree def)
Definition gimple.h:6688
bool is_gimple_debug(const gimple *gs)
Definition gimple.h:5002
void gimple_omp_atomic_load_set_rhs(gomp_atomic_load *load_stmt, tree rhs)
Definition gimple.h:6645
void gimple_eh_else_set_n_body(geh_else *eh_else_stmt, gimple_seq seq)
Definition gimple.h:4455
tree * gimple_omp_target_child_fn_ptr(gomp_target *omp_target_stmt)
Definition gimple.h:6346
tree * gimple_omp_taskreg_clauses_ptr(gimple *gs)
Definition gimple.h:6078
void gimple_assume_set_guard(gimple *gs, tree guard)
Definition gimple.h:6733
bool gimple_asm_basic_p(const gasm *asm_stmt)
Definition gimple.h:4287
tree gimple_omp_atomic_store_val(const gomp_atomic_store *store_stmt)
Definition gimple.h:6600
bool gimple_call_return_slot_opt_p(const gcall *s)
Definition gimple.h:3466
void gimple_debug_source_bind_set_var(gimple *dbg, tree var)
Definition gimple.h:5173
tree * gimple_switch_index_ptr(gswitch *gs)
Definition gimple.h:4943
void gimple_omp_sections_set_control(gimple *gs, tree control)
Definition gimple.h:6581
unsigned gimple_uid(const gimple *g)
Definition gimple.h:2103
bool gimple_omp_for_combined_into_p(const gimple *g)
Definition gimple.h:5589
tree gimple_omp_sections_clauses(const gimple *gs)
Definition gimple.h:6527
void gimple_call_set_chain(gcall *call_stmt, tree chain)
Definition gimple.h:3333
tree gimple_catch_types(const gcatch *catch_stmt)
Definition gimple.h:4296
tree * gimple_debug_bind_get_value_ptr(gimple *dbg)
Definition gimple.h:5071
tree * gimple_omp_target_clauses_ptr(gimple *gs)
Definition gimple.h:6297
void gimple_set_block(gimple *g, tree block)
Definition gimple.h:1899
void gimple_omp_atomic_set_need_value(gimple *g)
Definition gimple.h:2501
void gimple_call_set_alloca_for_var(gcall *s, bool for_var)
Definition gimple.h:3604
void gimple_omp_for_set_combined_p(gomp_for *g, bool combined_p)
Definition gimple.h:5576
gimple_debug_subcode
Definition gimple.h:207
@ GIMPLE_DEBUG_INLINE_ENTRY
Definition gimple.h:211
@ GIMPLE_DEBUG_BEGIN_STMT
Definition gimple.h:210
@ GIMPLE_DEBUG_BIND
Definition gimple.h:208
@ GIMPLE_DEBUG_SOURCE_BIND
Definition gimple.h:209
tree * gimple_omp_ordered_clauses_ptr(gomp_ordered *ord_stmt)
Definition gimple.h:5338
bool is_gimple_resx(const gimple *gs)
Definition gimple.h:7022
tree gimple_omp_continue_control_def(const gomp_continue *cont_stmt)
Definition gimple.h:6672
tree gimple_omp_task_data_arg(const gimple *gs)
Definition gimple.h:6037
gimple_seq gimple_assume_body(const gimple *gs)
Definition gimple.h:6759
enum tree_code gimple_assign_rhs_code(const gassign *gs)
Definition gimple.h:2907
void gimple_catch_set_handler(gcatch *catch_stmt, gimple_seq handler)
Definition gimple.h:4343
tree gimple_call_fntype(const gcall *gs)
Definition gimple.h:3177
tree gimple_omp_task_arg_align(const gimple *gs)
Definition gimple.h:6228
bool gimple_debug_begin_stmt_p(const gimple *s)
Definition gimple.h:5194
bool warning_suppressed_p(const gimple *, opt_code=all_warnings) ATTRIBUTE_NONNULL(1)
Definition warning-control.cc:138
tree gimple_call_fn(const gcall *gs)
Definition gimple.h:3205
edge gimple_phi_arg_edge(const gphi *phi, size_t i)
Definition gimple.h:4791
void gimple_omp_masked_set_clauses(gimple *gs, tree clauses)
Definition gimple.h:5443
bool is_gimple_assign(const gimple *gs)
Definition gimple.h:2643
enum internal_fn gimple_call_internal_fn(const gcall *gs)
Definition gimple.h:3100
tree * gimple_return_retval_ptr(greturn *gs)
Definition gimple.h:6871
gimple * gimple_seq_first_nondebug_stmt(gimple_seq s)
Definition gimple.h:5011
tree gimple_asm_label_op(const gasm *asm_stmt, unsigned index)
Definition gimple.h:4203
void gimple_set_vuse(gimple *g, tree vuse)
Definition gimple.h:2258
bool gimple_has_location(const gimple *g)
Definition gimple.h:1944
tree gimple_asm_clobber_op(const gasm *asm_stmt, unsigned index)
Definition gimple.h:4183
void gimple_omp_for_set_incr(gimple *gs, size_t i, tree incr)
Definition gimple.h:5798
gimple_seq * gimple_try_eval_ptr(gimple *gs)
Definition gimple.h:4505
void gimple_transaction_set_subcode(gtransaction *transaction_stmt, unsigned int subcode)
Definition gimple.h:6862
tree * gimple_omp_taskgroup_clauses_ptr(gimple *gs)
Definition gimple.h:5398
tree gimple_omp_return_lhs(const gimple *g)
Definition gimple.h:2400
tree gimple_debug_bind_get_var(const gimple *dbg)
Definition gimple.h:5049
int gimple_omp_for_kind(const gimple *g)
Definition gimple.h:5544
void gimple_call_set_nothrow(gcall *s, bool nothrow_p)
Definition gimple.h:3560
void gimple_call_set_lhs(gcall *gs, tree lhs)
Definition gimple.h:3047
gimple_seq * gimple_eh_else_e_body_ptr(geh_else *eh_else_stmt)
Definition gimple.h:4443
tree * gimple_assign_lhs_ptr(gassign *gs)
Definition gimple.h:2676
bool gimple_has_substatements(const gimple *g)
Definition gimple.h:1840
bool gimple_wce_cleanup_eh_only(const gimple *gs)
Definition gimple.h:4609
void gimple_omp_target_set_iterator_loops(gomp_target *omp_target_stmt, gimple_seq iterator_loops)
Definition gimple.h:6416
tree * gimple_omp_continue_control_def_ptr(gomp_continue *cont_stmt)
Definition gimple.h:6680
void gimple_bind_set_vars(gbind *bind_stmt, tree vars)
Definition gimple.h:4025
enum tree_code gimple_cond_code(const gcond *gs)
Definition gimple.h:3708
tree gimple_call_return_type(const gcall *gs)
Definition gimple.h:3293
bool gimple_call_operator_delete_p(const gcall *)
Definition gimple.cc:2967
void gimple_call_set_from_thunk(gcall *s, bool from_thunk_p)
Definition gimple.h:3476
int gimple_omp_target_kind(const gimple *g)
Definition gimple.h:6317
tree * gimple_cond_rhs_ptr(gcond *gs)
Definition gimple.h:3784
enum gimple_rhs_class get_gimple_rhs_class(enum tree_code code)
Definition gimple.h:2652
bool gimple_in_transaction(const gimple *stmt)
Definition gimple.h:2330
bool is_gimple_call(const gimple *gs)
Definition gimple.h:3007
void gimple_assign_set_rhs1(gassign *gs, tree rhs)
Definition gimple.h:2743
void gimple_asm_set_inline(gasm *asm_stmt, bool inline_p)
Definition gimple.h:4262
size_t gimple_omp_for_collapse(const gimple *gs)
Definition gimple.h:5644
tree * gimple_omp_task_data_arg_ptr(gimple *gs)
Definition gimple.h:6047
bool gimple_cond_false_p(const gcond *gs)
Definition gimple.h:3905
tree gimple_switch_default_label(const gswitch *gs)
Definition gimple.h:4983
void gimple_call_set_fn(gcall *gs, tree fn)
Definition gimple.h:3237
location_t gimple_nonartificial_location(const gimple *g)
Definition gimple.h:1953
void gimple_resx_set_region(gresx *resx_stmt, int region)
Definition gimple.h:4886
void gimple_call_set_arg(gcall *gs, unsigned index, tree arg)
Definition gimple.h:3393
tree gimple_return_retval(const greturn *gs)
Definition gimple.h:6879
void gimple_omp_parallel_set_child_fn(gomp_parallel *omp_parallel_stmt, tree child_fn)
Definition gimple.h:5887
void gimple_phi_set_arg(gphi *phi, unsigned index, struct phi_arg_d *phiarg)
Definition gimple.h:4724
location_t * gimple_phi_arg_location_ptr(gphi *phi, size_t i)
Definition gimple.h:4823
void set_bb_seq(basic_block bb, gimple_seq seq)
Definition gimple.h:1801
bool gimple_call_noreturn_p(const gcall *s)
Definition gimple.h:3543
void gimple_omp_section_set_last(gimple *g)
Definition gimple.h:2433
bool gimple_call_from_new_or_delete(const gcall *s)
Definition gimple.h:3511
bool gimple_has_mem_ops(const gimple *g)
Definition gimple.h:2162
gimple_seq gimple_transaction_body(const gtransaction *transaction_stmt)
Definition gimple.h:6778
gimple * gimple_seq_last_nondebug_stmt(gimple_seq s)
Definition gimple.h:5023
bool gimple_omp_section_last_p(const gimple *g)
Definition gimple.h:2423
tree * gimple_transaction_label_uninst_ptr(gtransaction *transaction_stmt)
Definition gimple.h:6804
tree gimple_goto_dest(const gimple *gs)
Definition gimple.h:3996
void gimple_switch_set_default_label(gswitch *gs, tree label)
Definition gimple.h:4993
tree * gimple_vuse_ptr(gimple *g)
Definition gimple.h:2234
tree * gimple_phi_arg_def_ptr(gphi *phi, size_t index)
Definition gimple.h:4783
tree * gimple_eh_filter_types_ptr(gimple *gs)
Definition gimple.h:4363
tree gimple_assign_rhs1(const gassign *gs)
Definition gimple.h:2711
#define GIMPLE_DEBUG_BIND_NOVALUE
Definition gimple.h:5101
bool gimple_modified_p(const gimple *g)
Definition gimple.h:2280
tree gimple_omp_sections_control(const gimple *gs)
Definition gimple.h:6559
tree gimple_omp_task_clauses(const gimple *gs)
Definition gimple.h:5925
void gimple_transaction_set_label_uninst(gtransaction *transaction_stmt, tree label)
Definition gimple.h:6848
bool gimple_omp_ordered_standalone_p(const gimple *g)
Definition gimple.h:2444
tree gimple_eh_must_not_throw_fndecl(const geh_mnt *eh_mnt_stmt)
Definition gimple.h:4414
location_t * gimple_location_ptr(gimple *g)
Definition gimple.h:1935
bool gimple_call_alloca_for_var_p(const gcall *s)
Definition gimple.h:3615
tree gimple_asm_output_op(const gasm *asm_stmt, unsigned index)
Definition gimple.h:4163
basic_block gimple_bb(const gimple *g)
Definition gimple.h:1879
int gimple_eh_dispatch_region(const geh_dispatch *eh_dispatch_stmt)
Definition gimple.h:4894
bool gimple_assign_single_p(const gimple *gs)
Definition gimple.h:2955
gimple_statement_structure_enum
Definition gimple.h:854
@ LAST_GSS_ENUM
Definition gimple.h:913
const tree * gimple_ops(const gimple *gs)
Definition gimple.h:2577
tree gimple_omp_parallel_child_fn(const gomp_parallel *omp_parallel_stmt)
Definition gimple.h:5869
tree * gimple_assign_rhs2_ptr(gassign *gs)
Definition gimple.h:2780
void gimple_switch_set_num_labels(gswitch *g, unsigned nlabels)
Definition gimple.h:4924
tree gimple_omp_taskreg_clauses(const gimple *gs)
Definition gimple.h:6067
void gimple_omp_task_set_copy_fn(gimple *gs, tree copy_fn)
Definition gimple.h:6188
void gimple_omp_atomic_load_set_lhs(gomp_atomic_load *load_stmt, tree lhs)
Definition gimple.h:6618
tree * gimple_omp_for_incr_ptr(gimple *gs, size_t i)
Definition gimple.h:5787
bool gimple_visited_p(const gimple *stmt)
Definition gimple.h:2038
void gimple_seq_set_first(gimple_seq *ps, gimple_seq_node first)
Definition gimple.h:1759
gimple_seq gimple_omp_for_pre_body(const gimple *gs)
Definition gimple.h:5821
void gimple_call_set_va_arg_pack(gcall *s, bool pass_arg_pack_p)
Definition gimple.h:3521
bool gimple_omp_atomic_weak_p(const gimple *g)
Definition gimple.h:2513
tree * gimple_omp_teams_clauses_ptr(gimple *gs)
Definition gimple.h:6436
bool gimple_cond_true_canonical_p(const gcond *gs)
Definition gimple.h:3889
tree gimple_cond_rhs(const gcond *gs)
Definition gimple.h:3768
plf_mask
Definition gimple.h:216
@ GF_PLF_2
Definition gimple.h:218
@ GF_PLF_1
Definition gimple.h:217
enum omp_memory_order gimple_omp_atomic_memory_order(const gimple *g)
Definition gimple.h:2535
tree gimple_omp_task_copy_fn(const gimple *gs)
Definition gimple.h:6168
void gimple_cond_make_true(gcond *gs)
Definition gimple.h:3854
tree gimple_switch_label(const gswitch *gs, unsigned index)
Definition gimple.h:4963
gimple_seq gimple_try_eval(const gimple *gs)
Definition gimple.h:4515
gimple_seq * bb_seq_addr(basic_block bb)
Definition gimple.h:1793
void gimple_call_copy_flags(gcall *dest_call, const gcall *orig_call)
Definition gimple.h:3650
void gimple_asm_set_label_op(gasm *asm_stmt, unsigned index, tree label_op)
Definition gimple.h:4212
struct pt_solution * gimple_call_clobber_set(gcall *call_stmt)
Definition gimple.h:3677
void gimple_omp_atomic_set_weak(gimple *g)
Definition gimple.h:2524
tree gimple_omp_target_child_fn(const gomp_target *omp_target_stmt)
Definition gimple.h:6337
tree gimple_call_arg(const gcall *gs, unsigned index)
Definition gimple.h:3358
tree gimple_transaction_label_over(const gtransaction *transaction_stmt)
Definition gimple.h:6810
tree gimple_assign_lhs(const gassign *gs)
Definition gimple.h:2660
void gimple_try_set_cleanup(gtry *try_stmt, gimple_seq cleanup)
Definition gimple.h:4569
bool gimple_omp_parallel_combined_p(const gimple *g)
Definition gimple.h:2465
void gimple_debug_bind_set_var(gimple *dbg, tree var)
Definition gimple.h:5081
tree gimple_omp_single_clauses(const gimple *gs)
Definition gimple.h:6258
bool gimple_call_tail_p(const gcall *s)
Definition gimple.h:3424
void gimple_omp_single_set_clauses(gomp_single *omp_single_stmt, tree clauses)
Definition gimple.h:6278
bool gimple_nop_p(const gimple *g)
Definition gimple.h:7013
unsigned gimple_phi_capacity(const gimple *gs)
Definition gimple.h:4629
tree * gimple_omp_critical_name_ptr(gomp_critical *crit_stmt)
Definition gimple.h:5280
tree gimple_cond_true_label(const gcond *gs)
Definition gimple.h:3804
tree * gimple_omp_target_data_arg_ptr(gomp_target *omp_target_stmt)
Definition gimple.h:6375
bool gimple_asm_volatile_p(const gasm *asm_stmt)
Definition gimple.h:4232
tree * gimple_transaction_label_over_ptr(gtransaction *transaction_stmt)
Definition gimple.h:6816
struct gimple_temp_hash_elt elt_t
void gimple_set_location(gimple *, location_t)
Definition gimple.h:1924
gimple_seq gimple_omp_body(const gimple *gs)
Definition gimple.h:5253
bool gimple_builtin_call_types_compatible_p(const gimple *, tree)
Definition gimple.cc:2932
int gimple_lineno(const gimple *stmt)
Definition gimple.h:1976
void gimple_call_set_internal_fn(gcall *call_stmt, enum internal_fn fn)
Definition gimple.h:3265
gimple_seq gimple_omp_target_iterator_loops(const gomp_target *omp_target_stmt)
Definition gimple.h:6395
bool gimple_call_nocf_check_p(const gcall *gs)
Definition gimple.h:3081
tree gimple_phi_arg_def(const gphi *gs, size_t index)
Definition gimple.h:4752
void gimple_phi_arg_set_location(gphi *phi, size_t i, location_t loc)
Definition gimple.h:4815
void gimple_omp_teams_set_clauses(gomp_teams *omp_teams_stmt, tree clauses)
Definition gimple.h:6446
void gimple_cond_set_true_label(gcond *gs, tree label)
Definition gimple.h:3814
tree gimple_omp_scan_clauses(const gomp_scan *scan_stmt)
Definition gimple.h:5357
void gimple_try_set_kind(gtry *gs, enum gimple_try_flags kind)
Definition gimple.h:4482
tree * gimple_omp_interop_clauses_ptr(gimple *gs)
Definition gimple.h:5525
void gimple_cond_set_lhs(gcond *gs, tree lhs)
Definition gimple.h:3759
void gimple_omp_for_set_initial(gimple *gs, size_t i, tree initial)
Definition gimple.h:5732
void gimple_debug_source_bind_set_value(gimple *dbg, tree value)
Definition gimple.h:5184
enum tree_code gimple_expr_code(const gimple *stmt)
Definition gimple.h:3960
bool gimple_call_must_tail_p(const gcall *s)
Definition gimple.h:3444
tree gimple_omp_critical_name(const gomp_critical *crit_stmt)
Definition gimple.h:5270
tree gimple_call_chain(const gcall *gs)
Definition gimple.h:3309
struct pt_solution * gimple_call_use_set(gcall *call_stmt)
Definition gimple.h:3660
void gimple_call_set_ctrl_altering(gcall *s, bool ctrl_altering_p)
Definition gimple.h:3142
void gimple_omp_for_set_clauses(gimple *gs, tree clauses)
Definition gimple.h:5634
void gimple_set_modified(gimple *s, bool modifiedp)
Definition gimple.h:2290
void gimple_label_set_label(glabel *gs, tree label)
Definition gimple.h:3987
tree gimple_omp_taskreg_child_fn(const gimple *gs)
Definition gimple.h:6101
bool gimple_call_by_descriptor_p(const gcall *s)
Definition gimple.h:3642
bool is_gimple_omp(const gimple *stmt)
Definition gimple.h:6922
bool gimple_references_memory_p(const gimple *stmt)
Definition gimple.h:2338
void gimple_cond_set_false_label(gcond *gs, tree label)
Definition gimple.h:3824
bool gimple_has_volatile_ops(const gimple *stmt)
Definition gimple.h:2309
void gimple_set_has_volatile_ops(gimple *stmt, bool volatilep)
Definition gimple.h:2321
void gimple_call_set_nocf_check(gcall *gs, bool nocf_check)
Definition gimple.h:3089
tree gimple_omp_for_clauses(const gimple *gs)
Definition gimple.h:5612
#define gcc_gimple_checking_assert(EXPR)
Definition gimple.h:98
tree * gimple_call_arg_ptr(gcall *gs, unsigned index)
Definition gimple.h:3376
bool is_gimple_omp_offloaded(const gimple *stmt)
Definition gimple.h:6986
void gimple_omp_parallel_set_clauses(gomp_parallel *omp_parallel_stmt, tree clauses)
Definition gimple.h:5859
void gimple_omp_task_set_arg_size(gimple *gs, tree arg_size)
Definition gimple.h:6218
gimple_try_flags
Definition gimple.h:521
@ GIMPLE_TRY_FINALLY
Definition gimple.h:526
@ GIMPLE_TRY_CATCH_IS_CLEANUP
Definition gimple.h:530
@ GIMPLE_TRY_KIND
Definition gimple.h:527
@ GIMPLE_TRY_CATCH
Definition gimple.h:523
void gimple_set_num_ops(gimple *gs, unsigned num_ops)
Definition gimple.h:2568
tree * gimple_assign_rhs3_ptr(gassign *gs)
Definition gimple.h:2833
tree * gimple_omp_parallel_child_fn_ptr(gomp_parallel *omp_parallel_stmt)
Definition gimple.h:5878
void gimple_eh_filter_set_failure(geh_filter *eh_filter_stmt, gimple_seq failure)
Definition gimple.h:4405
const char * gimple_asm_string(const gasm *asm_stmt)
Definition gimple.h:4223
gimple_seq * gimple_eh_filter_failure_ptr(gimple *gs)
Definition gimple.h:4374
void gimple_omp_for_set_final(gimple *gs, size_t i, tree final)
Definition gimple.h:5765
void gimple_bind_set_block(gbind *bind_stmt, tree block)
Definition gimple.h:4098
tree * gimple_phi_result_ptr(gphi *gs)
Definition gimple.h:4666
tree gimple_omp_dispatch_clauses(const gimple *gs)
Definition gimple.h:5487
tree gimple_omp_taskreg_data_arg(const gimple *gs)
Definition gimple.h:6135
void gimple_set_uid(gimple *g, unsigned uid)
Definition gimple.h:2089
unsigned int gimple_transaction_subcode(const gtransaction *transaction_stmt)
Definition gimple.h:6824
tree gimple_omp_for_index(const gimple *gs, size_t i)
Definition gimple.h:5677
void gimple_call_set_return_slot_opt(gcall *s, bool return_slot_opt_p)
Definition gimple.h:3454
void gimple_asm_set_input_op(gasm *asm_stmt, unsigned index, tree in_op)
Definition gimple.h:4152
bool is_gimple_omp_oacc(const gimple *stmt)
Definition gimple.h:6937
gimple_seq * gimple_transaction_body_ptr(gtransaction *transaction_stmt)
Definition gimple.h:6770
gimple_seq gimple_bind_body(const gbind *gs)
Definition gimple.h:4050
void gimple_set_plf(gimple *stmt, enum plf_mask plf, bool val_p)
Definition gimple.h:2055
bool gimple_omp_return_nowait_p(const gimple *g)
Definition gimple.h:2379
void gimple_omp_dispatch_set_clauses(gimple *gs, tree clauses)
Definition gimple.h:5507
void gimple_omp_for_set_kind(gomp_for *g, int kind)
Definition gimple.h:5554
void gimple_omp_ordered_standalone(gimple *g)
Definition gimple.h:2454
tree gimple_omp_atomic_load_lhs(const gomp_atomic_load *load_stmt)
Definition gimple.h:6627
enum gimple_try_flags gimple_try_kind(const gimple *gs)
Definition gimple.h:4472
tree * gimple_omp_dispatch_clauses_ptr(gimple *gs)
Definition gimple.h:5497
tree * gimple_omp_task_clauses_ptr(gimple *gs)
Definition gimple.h:5935
void gimple_return_set_retval(greturn *gs, tree retval)
Definition gimple.h:6888
unsigned gimple_asm_nclobbers(const gasm *asm_stmt)
Definition gimple.h:4127
void gimple_omp_scan_set_clauses(gomp_scan *scan_stmt, tree clauses)
Definition gimple.h:5377
bool gimple_try_catch_is_cleanup(const gimple *gs)
Definition gimple.h:4494
void gimple_omp_taskreg_set_data_arg(gimple *gs, tree data_arg)
Definition gimple.h:6157
void gimple_call_set_fndecl(gcall *gs, tree decl)
Definition gimple.h:3247
tree * gimple_call_fn_ptr(gcall *gs)
Definition gimple.h:3221
tree gimple_call_lhs(const gcall *gs)
Definition gimple.h:3015
void gimple_eh_filter_set_types(geh_filter *eh_filter_stmt, tree types)
Definition gimple.h:4395
void gimple_set_vdef(gimple *g, tree vdef)
Definition gimple.h:2268
void gimple_omp_atomic_set_memory_order(gimple *g, enum omp_memory_order mo)
Definition gimple.h:2547
void gimple_wce_set_cleanup_eh_only(gimple *gs, bool eh_only_p)
Definition gimple.h:4619
void gimple_asm_set_clobber_op(gasm *asm_stmt, unsigned index, tree clobber_op)
Definition gimple.h:4193
tree gimple_vuse(const gimple *g)
Definition gimple.h:2210
tree * gimple_call_lhs_ptr(gcall *gs)
Definition gimple.h:3031
void gimple_omp_return_set_lhs(gimple *g, tree lhs)
Definition gimple.h:2389
tree * gimple_transaction_label_norm_ptr(gtransaction *transaction_stmt)
Definition gimple.h:6792
tree gimple_omp_target_data_arg(const gomp_target *omp_target_stmt)
Definition gimple.h:6366
void gimple_omp_scope_set_clauses(gimple *gs, tree clauses)
Definition gimple.h:5477
const char * gimple_filename(const gimple *stmt)
Definition gimple.h:1967
void gimple_call_set_by_descriptor(gcall *s, bool by_descriptor_p)
Definition gimple.h:3631
void gimple_cond_set_condition(gcond *stmt, enum tree_code code, tree lhs, tree rhs)
Definition gimple.h:3944
tree gimple_assign_rhs2(const gassign *gs)
Definition gimple.h:2760
tree gimple_omp_taskgroup_clauses(const gimple *gs)
Definition gimple.h:5386
void gimple_set_op(gimple *gs, unsigned i, tree op)
Definition gimple.h:2629
void gimple_omp_set_body(gimple *gs, gimple_seq body)
Definition gimple.h:5261
void gimple_eh_must_not_throw_set_fndecl(geh_mnt *eh_mnt_stmt, tree decl)
Definition gimple.h:4422
void gimple_call_set_must_tail(gcall *s, bool must_tail_p)
Definition gimple.h:3432
void gimple_set_no_warning(gimple *stmt, bool no_warning)
Definition gimple.h:2002
tree * gimple_omp_for_final_ptr(gimple *gs, size_t i)
Definition gimple.h:5754
void gimple_omp_parallel_set_data_arg(gomp_parallel *omp_parallel_stmt, tree data_arg)
Definition gimple.h:5916
tree gimple_omp_critical_clauses(const gomp_critical *crit_stmt)
Definition gimple.h:5299
gimple_seq * gimple_bind_body_ptr(gbind *bind_stmt)
Definition gimple.h:4042
tree * gimple_omp_masked_clauses_ptr(gimple *gs)
Definition gimple.h:5432
bool gimple_phi_arg_has_location(const gphi *phi, size_t i)
Definition gimple.h:4831
gimple_seq_node gimple_seq_first(gimple_seq s)
Definition gimple.h:1702
int gimple_resx_region(const gresx *resx_stmt)
Definition gimple.h:4878
void gimple_omp_critical_set_clauses(gomp_critical *crit_stmt, tree clauses)
Definition gimple.h:5319
void gimple_switch_set_label(gswitch *gs, unsigned index, tree label)
Definition gimple.h:4972
tree * gimple_omp_continue_control_use_ptr(gomp_continue *cont_stmt)
Definition gimple.h:6706
void gimple_assign_set_nontemporal_move(gimple *gs, bool nontemporal)
Definition gimple.h:2895
unsigned gimple_num_args(const gimple *gs)
Definition gimple.h:4839
tree * gimple_omp_critical_clauses_ptr(gomp_critical *crit_stmt)
Definition gimple.h:5309
bool gimple_no_warning_p(const gimple *stmt)
Definition gimple.h:1994
unsigned gimple_phi_num_args(const gimple *gs)
Definition gimple.h:4641
tree gimple_call_fndecl(const gcall *gs)
Definition gimple.h:3277
alias_set_type gimple_get_alias_set(tree)
Definition gimple.cc:2885
tree gimple_omp_teams_data_arg(const gomp_teams *omp_teams_stmt)
Definition gimple.h:6482
void gimple_omp_taskreg_set_child_fn(gimple *gs, tree child_fn)
Definition gimple.h:6123
void gimple_omp_target_set_data_arg(gomp_target *omp_target_stmt, tree data_arg)
Definition gimple.h:6384
tree gimple_bind_vars(const gbind *bind_stmt)
Definition gimple.h:4015
struct phi_arg_d * gimple_phi_arg(gphi *gs, unsigned index)
Definition gimple.h:4693
bool gimple_debug_source_bind_p(const gimple *s)
Definition gimple.h:5130
tree gimple_asm_input_op(const gasm *asm_stmt, unsigned index)
Definition gimple.h:4143
gimple_seq gimple_catch_handler(const gcatch *catch_stmt)
Definition gimple.h:4325
tree * gimple_omp_atomic_load_lhs_ptr(gomp_atomic_load *load_stmt)
Definition gimple.h:6636
tree * gimple_omp_single_clauses_ptr(gimple *gs)
Definition gimple.h:6268
gimple_seq gimple_seq_alloc_with_stmt(gimple *stmt)
Definition gimple.h:1776
bool gimple_call_internal_p(const gcall *gs)
Definition gimple.h:3066
gimple_seq * gimple_try_cleanup_ptr(gimple *gs)
Definition gimple.h:4525
void gimple_omp_teams_set_child_fn(gomp_teams *omp_teams_stmt, tree child_fn)
Definition gimple.h:6472
gimple_seq * phi_nodes_ptr(basic_block bb)
Definition gimple.h:4743
void gimple_assign_set_rhs_code(gimple *s, enum tree_code code)
Definition gimple.h:2931
tree gimple_arg(const gimple *gs, unsigned int i)
Definition gimple.h:4854
void gimple_set_do_not_emit_location(gimple *g)
Definition gimple.h:7072
tree gimple_phi_arg_def_from_edge(const gphi *gs, const_edge e)
Definition gimple.h:4767
#define LOCATION_LOCUS(LOC)
Definition input.h:138
#define LOCATION_BLOCK(LOC)
Definition input.h:141
#define LOCATION_FILE(LOC)
Definition input.h:135
#define LOCATION_LINE(LOC)
Definition input.h:136
#define UNKNOWN_LOCATION
Definition input.h:32
T as_a(U *p)
Definition is-a.h:253
T dyn_cast(U *p)
Definition is-a.h:280
@ stmt
Definition checker-event.h:38
@ code
Definition region.h:38
const json::integer_property index
@ s
Definition graphviz.h:249
const char *const lhs
Definition pretty-print.cc:3362
const char *const rhs
Definition pretty-print.cc:3363
i
Definition poly-int.h:776
#define CXX_MEM_STAT_INFO
Definition statistics.h:58
tree variable_size(tree size)
Definition stor-layout.cc:67
union basic_block_def::basic_block_il_dependent il
int flags
Definition basic-block.h:144
Definition tree-predcom.cc:300
Definition genautomata.cc:499
Definition loop-invariant.cc:88
Definition function.h:249
int last_stmt_uid
Definition function.h:322
Definition gimple.h:553
unsigned char nl
Definition gimple.h:565
unsigned char nc
Definition gimple.h:564
unsigned char no
Definition gimple.h:563
unsigned char ni
Definition gimple.h:562
const char * string
Definition gimple.h:558
tree op[1]
Definition gimple.h:571
Definition gimple.h:911
static enum gimple_code code_
Definition gimple.h:912
Definition gimple.h:393
tree block
Definition gimple.h:406
tree vars
Definition gimple.h:398
gimple_seq body
Definition gimple.h:409
Definition gimple.h:356
struct pt_solution call_used
Definition gimple.h:360
tree op[1]
Definition gimple.h:373
struct pt_solution call_clobbered
Definition gimple.h:361
static enum gimple_code code_
Definition gimple.h:375
union gcall::@103242352322264346325113136141165045026143300141 u
Definition gimple.h:416
gimple_seq handler
Definition gimple.h:423
tree types
Definition gimple.h:420
Definition gimple.h:865
static enum gimple_code code_
Definition gimple.h:867
Definition gimple.h:875
Definition gimple.h:498
Definition gimple.h:445
gimple_seq e_body
Definition gimple.h:449
gimple_seq n_body
Definition gimple.h:449
Definition gimple.h:430
gimple_seq failure
Definition gimple.h:439
tree types
Definition gimple.h:435
Definition gimple.h:455
tree fndecl
Definition gimple.h:459
Definition gimple.h:884
gimple_seq phi_nodes
Definition basic-block.h:88
gimple_seq seq
Definition basic-block.h:85
Definition gimple.h:589
enum tree_code cond
Definition gimple.h:591
tree final
Definition gimple.h:600
tree index
Definition gimple.h:594
tree initial
Definition gimple.h:597
tree incr
Definition gimple.h:603
Definition gimple.h:802
tree guard
Definition gimple.h:806
gimple_seq body
Definition gimple.h:809
Definition gimple.h:483
int region
Definition gimple.h:488
tree val
Definition gimple.h:782
tree data_arg
Definition gimple.h:644
tree child_fn
Definition gimple.h:640
tree clauses
Definition gimple.h:636
Definition gimple.h:794
Definition gimple.h:730
tree clauses
Definition gimple.h:734
Definition gimple.h:649
Definition gimple.h:382
gimple_seq body
Definition gimple.h:386
Definition gimple.h:536
gimple_seq cleanup
Definition gimple.h:546
tree vdef
Definition gimple.h:333
tree vuse
Definition gimple.h:334
Definition gimple.h:342
tree op[1]
Definition gimple.h:349
Definition gimple.h:298
struct use_optype_d * use_ops
Definition gimple.h:306
Definition gimple.h:313
tree op[1]
Definition gimple.h:320
Definition gimple-iterator.h:26
Definition gimple.h:1673
tree temp
Definition gimple.h:1675
tree val
Definition gimple.h:1674
Definition gimple.h:225
unsigned int visited
Definition gimple.h:235
unsigned int plf
Definition gimple.h:246
unsigned ilf
Definition gimple.h:256
unsigned int subcode
Definition gimple.h:262
basic_block bb
Definition gimple.h:281
gimple * next
Definition gimple.h:289
enum gimple_code code
Definition gimple.h:228
unsigned int no_warning
Definition gimple.h:231
unsigned int nontemporal_move
Definition gimple.h:239
unsigned uid
Definition gimple.h:267
unsigned modified
Definition gimple.h:250
gimple * prev
Definition gimple.h:290
location_t location
Definition gimple.h:277
unsigned has_volatile_ops
Definition gimple.h:253
unsigned num_ops
Definition gimple.h:271
Definition gimple.h:893
Definition gimple.h:767
tree rhs
Definition gimple.h:771
tree lhs
Definition gimple.h:771
Definition gimple.h:787
Definition gimple.h:715
tree control_def
Definition gimple.h:719
tree control_use
Definition gimple.h:722
Definition gimple.h:577
tree name
Definition gimple.h:585
tree clauses
Definition gimple.h:581
Definition gimple.h:609
gimple_seq pre_body
Definition gimple.h:624
size_t collapse
Definition gimple.h:617
struct gimple_omp_for_iter * iter
Definition gimple.h:620
tree clauses
Definition gimple.h:613
Definition gimple.h:750
Definition gimple.h:658
Definition gimple.h:756
Definition gimple.h:697
tree clauses
Definition gimple.h:701
tree control
Definition gimple.h:706
Definition gimple.h:738
Definition gimple.h:665
gimple_seq iterator_loops
Definition gimple.h:670
Definition gimple.h:676
tree copy_fn
Definition gimple.h:681
tree arg_size
Definition gimple.h:685
tree arg_align
Definition gimple.h:686
Definition gimple.h:744
Definition gimple.h:465
unsigned nargs
Definition gimple.h:470
unsigned capacity
Definition gimple.h:469
struct phi_arg_d args[1]
Definition gimple.h:476
tree result
Definition gimple.h:473
Definition gimple.h:492
Definition gimple.h:921
Definition gimple.h:902
Definition gimple.h:841
tree label_uninst
Definition gimple.h:849
gimple_seq body
Definition gimple.h:845
tree label_over
Definition gimple.h:850
tree label_norm
Definition gimple.h:848
Definition gimple.h:507
gimple_seq cleanup
Definition gimple.h:516
gimple_seq eval
Definition gimple.h:512
static bool test(U *p)
Definition tree-core.h:1811
tree def
Definition tree-core.h:1815
location_t locus
Definition tree-core.h:1816
Definition tree-ssa-alias.h:29
bitmap vars
Definition tree-ssa-alias.h:67
Definition gengtype.h:252
Definition tree-ssa-operands.h:38
Definition loop-invariant.cc:78
Definition vec.h:450
#define NULL
Definition system.h:55
#define gcc_assert(EXPR)
Definition system.h:758
#define gcc_unreachable()
Definition system.h:785
#define bool
Definition system.h:830
#define gcc_checking_assert(EXPR)
Definition system.h:765
#define ECF_NORETURN
Definition tree-core.h:60
built_in_class
Definition tree-core.h:173
@ tcc_comparison
Definition tree-core.h:239
#define ECF_NOTHROW
Definition tree-core.h:69
#define ECF_XTHROW
Definition tree-core.h:100
omp_memory_order
Definition tree-core.h:688
clobber_kind
Definition tree-core.h:1150
tree copy_fn(tree fn, tree &parms, tree &result)
Definition tree-inline.cc:6748
tree chainon(tree op1, tree op2)
Definition tree.cc:3630
tree build_pointer_type(tree to_type)
Definition tree.cc:7434
location_t set_block(location_t loc, tree block)
Definition tree.cc:15256
location_t * block_nonartificial_location(tree block)
Definition tree.cc:12407
#define boolean_false_node
Definition tree.h:4953
#define SSA_NAME_DEF_STMT(NODE)
Definition tree.h:2294
#define boolean_true_node
Definition tree.h:4954
#define TREE_CODE_CLASS(CODE)
Definition tree.h:205
#define CASE_LOW(NODE)
Definition tree.h:1444
constexpr opt_code all_warnings
Definition tree.h:7387
#define TREE_CODE(NODE)
Definition tree.h:327
constexpr opt_code no_warning
Definition tree.h:7385
#define CONVERT_EXPR_CODE_P(CODE)
Definition tree.h:556
#define TREE_TYPE(NODE)
Definition tree.h:515
#define CONSTANT_CLASS_P(NODE)
Definition tree.h:218
#define TREE_CLOBBER_P(NODE)
Definition tree.h:1322
#define SSA_VAR_P(DECL)
Definition tree.h:3104
#define CLOBBER_KIND(NODE)
Definition tree.h:1326
tree build1_loc(location_t loc, enum tree_code code, tree type, tree arg1 CXX_MEM_STAT_INFO)
Definition tree.h:5190
#define CASE_HIGH(NODE)
Definition tree.h:1445
#define NULL_TREE
Definition tree.h:320
struct gimple_bb_info gimple
Definition basic-block.h:136
enum internal_fn internal_fn
ATTRIBUTE_RETURNS_NONNULL range_query * get_range_query(const struct function *fun)
Definition value-query.h:139