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