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