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