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