OSDN Git Service

gcc/ChangeLog:
[pf3gnuchains/gcc-fork.git] / gcc / gimple.h
1 /* Gimple IR definitions.
2
3    Copyright 2007, 2008, 2009 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 "pointer-set.h"
26 #include "vec.h"
27 #include "ggc.h"
28 #include "tm.h"
29 #include "hard-reg-set.h"
30 #include "basic-block.h"
31 #include "tree-ssa-operands.h"
32
33 DEF_VEC_P(gimple);
34 DEF_VEC_ALLOC_P(gimple,heap);
35 DEF_VEC_ALLOC_P(gimple,gc);
36
37 typedef gimple *gimple_p;
38 DEF_VEC_P(gimple_p);
39 DEF_VEC_ALLOC_P(gimple_p,heap);
40
41 DEF_VEC_P(gimple_seq);
42 DEF_VEC_ALLOC_P(gimple_seq,gc);
43 DEF_VEC_ALLOC_P(gimple_seq,heap);
44
45 /* For each block, the PHI nodes that need to be rewritten are stored into
46    these vectors.  */
47 typedef VEC(gimple, heap) *gimple_vec;
48 DEF_VEC_P (gimple_vec);
49 DEF_VEC_ALLOC_P (gimple_vec, heap);
50
51 enum gimple_code {
52 #define DEFGSCODE(SYM, STRING, STRUCT)  SYM,
53 #include "gimple.def"
54 #undef DEFGSCODE
55     LAST_AND_UNUSED_GIMPLE_CODE
56 };
57
58 extern const char *const gimple_code_name[];
59 extern const unsigned char gimple_rhs_class_table[];
60
61 /* Error out if a gimple tuple is addressed incorrectly.  */
62 #if defined ENABLE_GIMPLE_CHECKING
63 extern void gimple_check_failed (const_gimple, const char *, int,          \
64                                  const char *, enum gimple_code,           \
65                                  enum tree_code) ATTRIBUTE_NORETURN;
66
67 #define GIMPLE_CHECK(GS, CODE)                                          \
68   do {                                                                  \
69     const_gimple __gs = (GS);                                           \
70     if (gimple_code (__gs) != (CODE))                                   \
71       gimple_check_failed (__gs, __FILE__, __LINE__, __FUNCTION__,      \
72                            (CODE), ERROR_MARK);                         \
73   } while (0)
74 #else  /* not ENABLE_GIMPLE_CHECKING  */
75 #define GIMPLE_CHECK(GS, CODE)                  (void)0
76 #endif
77
78 /* Class of GIMPLE expressions suitable for the RHS of assignments.  See
79    get_gimple_rhs_class.  */
80 enum gimple_rhs_class
81 {
82   GIMPLE_INVALID_RHS,   /* The expression cannot be used on the RHS.  */
83   GIMPLE_BINARY_RHS,    /* The expression is a binary operation.  */
84   GIMPLE_UNARY_RHS,     /* The expression is a unary operation.  */
85   GIMPLE_SINGLE_RHS     /* The expression is a single object (an SSA
86                            name, a _DECL, a _REF, etc.  */
87 };
88
89 /* Specific flags for individual GIMPLE statements.  These flags are
90    always stored in gimple_statement_base.subcode and they may only be
91    defined for statement codes that do not use sub-codes.
92
93    Values for the masks can overlap as long as the overlapping values
94    are never used in the same statement class.
95
96    The maximum mask value that can be defined is 1 << 15 (i.e., each
97    statement code can hold up to 16 bitflags).
98
99    Keep this list sorted.  */
100 enum gf_mask {
101     GF_ASM_INPUT                = 1 << 0,
102     GF_ASM_VOLATILE             = 1 << 1,
103     GF_CALL_CANNOT_INLINE       = 1 << 0,
104     GF_CALL_FROM_THUNK          = 1 << 1,
105     GF_CALL_RETURN_SLOT_OPT     = 1 << 2,
106     GF_CALL_TAILCALL            = 1 << 3,
107     GF_CALL_VA_ARG_PACK         = 1 << 4,
108     GF_OMP_PARALLEL_COMBINED    = 1 << 0,
109
110     /* True on an GIMPLE_OMP_RETURN statement if the return does not require
111        a thread synchronization via some sort of barrier.  The exact barrier
112        that would otherwise be emitted is dependent on the OMP statement with
113        which this return is associated.  */
114     GF_OMP_RETURN_NOWAIT        = 1 << 0,
115
116     GF_OMP_SECTION_LAST         = 1 << 0,
117     GF_PREDICT_TAKEN            = 1 << 15
118 };
119
120 /* Currently, there's only one type of gimple debug stmt.  Others are
121    envisioned, for example, to enable the generation of is_stmt notes
122    in line number information, to mark sequence points, etc.  This
123    subcode is to be used to tell them apart.  */
124 enum gimple_debug_subcode {
125   GIMPLE_DEBUG_BIND = 0
126 };
127
128 /* Masks for selecting a pass local flag (PLF) to work on.  These
129    masks are used by gimple_set_plf and gimple_plf.  */
130 enum plf_mask {
131     GF_PLF_1    = 1 << 0,
132     GF_PLF_2    = 1 << 1
133 };
134
135 /* A node in a gimple_seq_d.  */
136 struct GTY((chain_next ("%h.next"), chain_prev ("%h.prev"))) gimple_seq_node_d {
137   gimple stmt;
138   struct gimple_seq_node_d *prev;
139   struct gimple_seq_node_d *next;
140 };
141
142 /* A double-linked sequence of gimple statements.  */
143 struct GTY ((chain_next ("%h.next_free"))) gimple_seq_d {
144   /* First and last statements in the sequence.  */
145   gimple_seq_node first;
146   gimple_seq_node last;
147
148   /* Sequences are created/destroyed frequently.  To minimize
149      allocation activity, deallocated sequences are kept in a pool of
150      available sequences.  This is the pointer to the next free
151      sequence in the pool.  */
152   gimple_seq next_free;
153 };
154
155
156 /* Return the first node in GIMPLE sequence S.  */
157
158 static inline gimple_seq_node
159 gimple_seq_first (const_gimple_seq s)
160 {
161   return s ? s->first : NULL;
162 }
163
164
165 /* Return the first statement in GIMPLE sequence S.  */
166
167 static inline gimple
168 gimple_seq_first_stmt (const_gimple_seq s)
169 {
170   gimple_seq_node n = gimple_seq_first (s);
171   return (n) ? n->stmt : NULL;
172 }
173
174
175 /* Return the last node in GIMPLE sequence S.  */
176
177 static inline gimple_seq_node
178 gimple_seq_last (const_gimple_seq s)
179 {
180   return s ? s->last : NULL;
181 }
182
183
184 /* Return the last statement in GIMPLE sequence S.  */
185
186 static inline gimple
187 gimple_seq_last_stmt (const_gimple_seq s)
188 {
189   gimple_seq_node n = gimple_seq_last (s);
190   return (n) ? n->stmt : NULL;
191 }
192
193
194 /* Set the last node in GIMPLE sequence S to LAST.  */
195
196 static inline void
197 gimple_seq_set_last (gimple_seq s, gimple_seq_node last)
198 {
199   s->last = last;
200 }
201
202
203 /* Set the first node in GIMPLE sequence S to FIRST.  */
204
205 static inline void
206 gimple_seq_set_first (gimple_seq s, gimple_seq_node first)
207 {
208   s->first = first;
209 }
210
211
212 /* Return true if GIMPLE sequence S is empty.  */
213
214 static inline bool
215 gimple_seq_empty_p (const_gimple_seq s)
216 {
217   return s == NULL || s->first == NULL;
218 }
219
220
221 void gimple_seq_add_stmt (gimple_seq *, gimple);
222
223 /* Allocate a new sequence and initialize its first element with STMT.  */
224
225 static inline gimple_seq
226 gimple_seq_alloc_with_stmt (gimple stmt)
227 {
228   gimple_seq seq = NULL;
229   gimple_seq_add_stmt (&seq, stmt);
230   return seq;
231 }
232
233
234 /* Returns the sequence of statements in BB.  */
235
236 static inline gimple_seq
237 bb_seq (const_basic_block bb)
238 {
239   return (!(bb->flags & BB_RTL) && bb->il.gimple) ? bb->il.gimple->seq : NULL;
240 }
241
242
243 /* Sets the sequence of statements in BB to SEQ.  */
244
245 static inline void
246 set_bb_seq (basic_block bb, gimple_seq seq)
247 {
248   gcc_assert (!(bb->flags & BB_RTL));
249   bb->il.gimple->seq = seq;
250 }
251
252 /* Iterator object for GIMPLE statement sequences.  */
253
254 typedef struct
255 {
256   /* Sequence node holding the current statement.  */
257   gimple_seq_node ptr;
258
259   /* Sequence and basic block holding the statement.  These fields
260      are necessary to handle edge cases such as when statement is
261      added to an empty basic block or when the last statement of a
262      block/sequence is removed.  */
263   gimple_seq seq;
264   basic_block bb;
265 } gimple_stmt_iterator;
266
267
268 /* Data structure definitions for GIMPLE tuples.  NOTE: word markers
269    are for 64 bit hosts.  */
270
271 struct GTY(()) gimple_statement_base {
272   /* [ WORD 1 ]
273      Main identifying code for a tuple.  */
274   ENUM_BITFIELD(gimple_code) code : 8;
275
276   /* Nonzero if a warning should not be emitted on this tuple.  */
277   unsigned int no_warning       : 1;
278
279   /* Nonzero if this tuple has been visited.  Passes are responsible
280      for clearing this bit before using it.  */
281   unsigned int visited          : 1;
282
283   /* Nonzero if this tuple represents a non-temporal move.  */
284   unsigned int nontemporal_move : 1;
285
286   /* Pass local flags.  These flags are free for any pass to use as
287      they see fit.  Passes should not assume that these flags contain
288      any useful value when the pass starts.  Any initial state that
289      the pass requires should be set on entry to the pass.  See
290      gimple_set_plf and gimple_plf for usage.  */
291   unsigned int plf              : 2;
292
293   /* Nonzero if this statement has been modified and needs to have its
294      operands rescanned.  */
295   unsigned modified             : 1;
296
297   /* Nonzero if this statement contains volatile operands.  */
298   unsigned has_volatile_ops     : 1;
299
300   /* Padding to get subcode to 16 bit alignment.  */
301   unsigned pad                  : 1;
302
303   /* The SUBCODE field can be used for tuple-specific flags for tuples
304      that do not require subcodes.  Note that SUBCODE should be at
305      least as wide as tree codes, as several tuples store tree codes
306      in there.  */
307   unsigned int subcode          : 16;
308
309   /* UID of this statement.  This is used by passes that want to
310      assign IDs to statements.  It must be assigned and used by each
311      pass.  By default it should be assumed to contain garbage.  */
312   unsigned uid;
313
314   /* [ WORD 2 ]
315      Locus information for debug info.  */
316   location_t location;
317
318   /* Number of operands in this tuple.  */
319   unsigned num_ops;
320
321   /* [ WORD 3 ]
322      Basic block holding this statement.  */
323   struct basic_block_def *bb;
324
325   /* [ WORD 4 ]
326      Lexical block holding this statement.  */
327   tree block;
328 };
329
330
331 /* Base structure for tuples with operands.  */
332
333 struct GTY(()) gimple_statement_with_ops_base
334 {
335   /* [ WORD 1-4 ]  */
336   struct gimple_statement_base gsbase;
337
338   /* [ WORD 5-6 ]
339      SSA operand vectors.  NOTE: It should be possible to
340      amalgamate these vectors with the operand vector OP.  However,
341      the SSA operand vectors are organized differently and contain
342      more information (like immediate use chaining).  */
343   struct def_optype_d GTY((skip (""))) *def_ops;
344   struct use_optype_d GTY((skip (""))) *use_ops;
345 };
346
347
348 /* Statements that take register operands.  */
349
350 struct GTY(()) gimple_statement_with_ops
351 {
352   /* [ WORD 1-6 ]  */
353   struct gimple_statement_with_ops_base opbase;
354
355   /* [ WORD 7 ]
356      Operand vector.  NOTE!  This must always be the last field
357      of this structure.  In particular, this means that this
358      structure cannot be embedded inside another one.  */
359   tree GTY((length ("%h.opbase.gsbase.num_ops"))) op[1];
360 };
361
362
363 /* Base for statements that take both memory and register operands.  */
364
365 struct GTY(()) gimple_statement_with_memory_ops_base
366 {
367   /* [ WORD 1-6 ]  */
368   struct gimple_statement_with_ops_base opbase;
369
370   /* [ WORD 7-8 ]
371      Virtual operands for this statement.  The GC will pick them
372      up via the ssa_names array.  */
373   tree GTY((skip (""))) vdef;
374   tree GTY((skip (""))) vuse;
375 };
376
377
378 /* Statements that take both memory and register operands.  */
379
380 struct GTY(()) gimple_statement_with_memory_ops
381 {
382   /* [ WORD 1-8 ]  */
383   struct gimple_statement_with_memory_ops_base membase;
384
385   /* [ WORD 9 ]
386      Operand vector.  NOTE!  This must always be the last field
387      of this structure.  In particular, this means that this
388      structure cannot be embedded inside another one.  */
389   tree GTY((length ("%h.membase.opbase.gsbase.num_ops"))) op[1];
390 };
391
392
393 /* OpenMP statements (#pragma omp).  */
394
395 struct GTY(()) gimple_statement_omp {
396   /* [ WORD 1-4 ]  */
397   struct gimple_statement_base gsbase;
398
399   /* [ WORD 5 ]  */
400   gimple_seq body;
401 };
402
403
404 /* GIMPLE_BIND */
405
406 struct GTY(()) gimple_statement_bind {
407   /* [ WORD 1-4 ]  */
408   struct gimple_statement_base gsbase;
409
410   /* [ WORD 5 ]
411      Variables declared in this scope.  */
412   tree vars;
413
414   /* [ WORD 6 ]
415      This is different than the BLOCK field in gimple_statement_base,
416      which is analogous to TREE_BLOCK (i.e., the lexical block holding
417      this statement).  This field is the equivalent of BIND_EXPR_BLOCK
418      in tree land (i.e., the lexical scope defined by this bind).  See
419      gimple-low.c.  */
420   tree block;
421
422   /* [ WORD 7 ]  */
423   gimple_seq body;
424 };
425
426
427 /* GIMPLE_CATCH */
428
429 struct GTY(()) gimple_statement_catch {
430   /* [ WORD 1-4 ]  */
431   struct gimple_statement_base gsbase;
432
433   /* [ WORD 5 ]  */
434   tree types;
435
436   /* [ WORD 6 ]  */
437   gimple_seq handler;
438 };
439
440
441 /* GIMPLE_EH_FILTER */
442
443 struct GTY(()) gimple_statement_eh_filter {
444   /* [ WORD 1-4 ]  */
445   struct gimple_statement_base gsbase;
446
447   /* [ WORD 5 ]
448      Filter types.  */
449   tree types;
450
451   /* [ WORD 6 ]
452      Failure actions.  */
453   gimple_seq failure;
454 };
455
456
457 /* GIMPLE_EH_MUST_NOT_THROW */
458
459 struct GTY(()) gimple_statement_eh_mnt {
460   /* [ WORD 1-4 ]  */
461   struct gimple_statement_base gsbase;
462
463   /* [ WORD 5 ] Abort function decl.  */
464   tree fndecl;
465 };
466
467 /* GIMPLE_PHI */
468
469 struct GTY(()) gimple_statement_phi {
470   /* [ WORD 1-4 ]  */
471   struct gimple_statement_base gsbase;
472
473   /* [ WORD 5 ]  */
474   unsigned capacity;
475   unsigned nargs;
476
477   /* [ WORD 6 ]  */
478   tree result;
479
480   /* [ WORD 7 ]  */
481   struct phi_arg_d GTY ((length ("%h.nargs"))) args[1];
482 };
483
484
485 /* GIMPLE_RESX, GIMPLE_EH_DISPATCH */
486
487 struct GTY(()) gimple_statement_eh_ctrl
488 {
489   /* [ WORD 1-4 ]  */
490   struct gimple_statement_base gsbase;
491
492   /* [ WORD 5 ]
493      Exception region number.  */
494   int region;
495 };
496
497
498 /* GIMPLE_TRY */
499
500 struct GTY(()) gimple_statement_try {
501   /* [ WORD 1-4 ]  */
502   struct gimple_statement_base gsbase;
503
504   /* [ WORD 5 ]
505      Expression to evaluate.  */
506   gimple_seq eval;
507
508   /* [ WORD 6 ]
509      Cleanup expression.  */
510   gimple_seq cleanup;
511 };
512
513 /* Kind of GIMPLE_TRY statements.  */
514 enum gimple_try_flags
515 {
516   /* A try/catch.  */
517   GIMPLE_TRY_CATCH = 1 << 0,
518
519   /* A try/finally.  */
520   GIMPLE_TRY_FINALLY = 1 << 1,
521   GIMPLE_TRY_KIND = GIMPLE_TRY_CATCH | GIMPLE_TRY_FINALLY,
522
523   /* Analogous to TRY_CATCH_IS_CLEANUP.  */
524   GIMPLE_TRY_CATCH_IS_CLEANUP = 1 << 2
525 };
526
527 /* GIMPLE_WITH_CLEANUP_EXPR */
528
529 struct GTY(()) gimple_statement_wce {
530   /* [ WORD 1-4 ]  */
531   struct gimple_statement_base gsbase;
532
533   /* Subcode: CLEANUP_EH_ONLY.  True if the cleanup should only be
534               executed if an exception is thrown, not on normal exit of its
535               scope.  This flag is analogous to the CLEANUP_EH_ONLY flag
536               in TARGET_EXPRs.  */
537
538   /* [ WORD 5 ]
539      Cleanup expression.  */
540   gimple_seq cleanup;
541 };
542
543
544 /* GIMPLE_ASM  */
545
546 struct GTY(()) gimple_statement_asm
547 {
548   /* [ WORD 1-8 ]  */
549   struct gimple_statement_with_memory_ops_base membase;
550
551   /* [ WORD 9 ]
552      __asm__ statement.  */
553   const char *string;
554
555   /* [ WORD 10 ]
556        Number of inputs, outputs, clobbers, labels.  */
557   unsigned char ni;
558   unsigned char no;
559   unsigned char nc;
560   unsigned char nl;
561
562   /* [ WORD 11 ]
563      Operand vector.  NOTE!  This must always be the last field
564      of this structure.  In particular, this means that this
565      structure cannot be embedded inside another one.  */
566   tree GTY((length ("%h.membase.opbase.gsbase.num_ops"))) op[1];
567 };
568
569 /* GIMPLE_OMP_CRITICAL */
570
571 struct GTY(()) gimple_statement_omp_critical {
572   /* [ WORD 1-5 ]  */
573   struct gimple_statement_omp omp;
574
575   /* [ WORD 6 ]
576      Critical section name.  */
577   tree name;
578 };
579
580
581 struct GTY(()) gimple_omp_for_iter {
582   /* Condition code.  */
583   enum tree_code cond;
584
585   /* Index variable.  */
586   tree index;
587     
588   /* Initial value.  */
589   tree initial;
590
591   /* Final value.  */
592   tree final;
593                                  
594   /* Increment.  */
595   tree incr;
596 };
597
598 /* GIMPLE_OMP_FOR */
599
600 struct GTY(()) gimple_statement_omp_for {
601   /* [ WORD 1-5 ]  */
602   struct gimple_statement_omp omp;
603
604   /* [ WORD 6 ]  */
605   tree clauses;
606
607   /* [ WORD 7 ]
608      Number of elements in iter array.  */
609   size_t collapse;
610
611   /* [ WORD 8 ]  */
612   struct gimple_omp_for_iter * GTY((length ("%h.collapse"))) iter;
613
614   /* [ WORD 9 ]
615      Pre-body evaluated before the loop body begins.  */
616   gimple_seq pre_body;
617 };
618
619
620 /* GIMPLE_OMP_PARALLEL */
621
622 struct GTY(()) gimple_statement_omp_parallel {
623   /* [ WORD 1-5 ]  */
624   struct gimple_statement_omp omp;
625
626   /* [ WORD 6 ]
627      Clauses.  */
628   tree clauses;
629
630   /* [ WORD 7 ]
631      Child function holding the body of the parallel region.  */
632   tree child_fn;
633
634   /* [ WORD 8 ]
635      Shared data argument.  */
636   tree data_arg;
637 };
638
639
640 /* GIMPLE_OMP_TASK */
641
642 struct GTY(()) gimple_statement_omp_task {
643   /* [ WORD 1-8 ]  */
644   struct gimple_statement_omp_parallel par;
645
646   /* [ WORD 9 ]
647      Child function holding firstprivate initialization if needed.  */
648   tree copy_fn;
649
650   /* [ WORD 10-11 ]
651      Size and alignment in bytes of the argument data block.  */
652   tree arg_size;
653   tree arg_align;
654 };
655
656
657 /* GIMPLE_OMP_SECTION */
658 /* Uses struct gimple_statement_omp.  */
659
660
661 /* GIMPLE_OMP_SECTIONS */
662
663 struct GTY(()) gimple_statement_omp_sections {
664   /* [ WORD 1-5 ]  */
665   struct gimple_statement_omp omp;
666
667   /* [ WORD 6 ]  */
668   tree clauses;
669
670   /* [ WORD 7 ]
671      The control variable used for deciding which of the sections to
672      execute.  */
673   tree control;
674 };
675
676 /* GIMPLE_OMP_CONTINUE.
677
678    Note: This does not inherit from gimple_statement_omp, because we
679          do not need the body field.  */
680
681 struct GTY(()) gimple_statement_omp_continue {
682   /* [ WORD 1-4 ]  */
683   struct gimple_statement_base gsbase;
684
685   /* [ WORD 5 ]  */
686   tree control_def;
687
688   /* [ WORD 6 ]  */
689   tree control_use;
690 };
691
692 /* GIMPLE_OMP_SINGLE */
693
694 struct GTY(()) gimple_statement_omp_single {
695   /* [ WORD 1-5 ]  */
696   struct gimple_statement_omp omp;
697
698   /* [ WORD 6 ]  */
699   tree clauses;
700 };
701
702
703 /* GIMPLE_OMP_ATOMIC_LOAD.  
704    Note: This is based on gimple_statement_base, not g_s_omp, because g_s_omp
705    contains a sequence, which we don't need here.  */
706
707 struct GTY(()) gimple_statement_omp_atomic_load {
708   /* [ WORD 1-4 ]  */
709   struct gimple_statement_base gsbase;
710
711   /* [ WORD 5-6 ]  */
712   tree rhs, lhs;
713 };
714
715 /* GIMPLE_OMP_ATOMIC_STORE.
716    See note on GIMPLE_OMP_ATOMIC_LOAD.  */
717
718 struct GTY(()) gimple_statement_omp_atomic_store {
719   /* [ WORD 1-4 ]  */
720   struct gimple_statement_base gsbase;
721
722   /* [ WORD 5 ]  */
723   tree val;
724 };
725
726 #define DEFGSSTRUCT(SYM, STRUCT, HAS_TREE_OP)   SYM,
727 enum gimple_statement_structure_enum {
728 #include "gsstruct.def"
729     LAST_GSS_ENUM
730 };
731 #undef DEFGSSTRUCT
732
733
734 /* Define the overall contents of a gimple tuple.  It may be any of the
735    structures declared above for various types of tuples.  */
736
737 union GTY ((desc ("gimple_statement_structure (&%h)"))) gimple_statement_d {
738   struct gimple_statement_base GTY ((tag ("GSS_BASE"))) gsbase;
739   struct gimple_statement_with_ops GTY ((tag ("GSS_WITH_OPS"))) gsops;
740   struct gimple_statement_with_memory_ops_base GTY ((tag ("GSS_WITH_MEM_OPS_BASE"))) gsmembase;
741   struct gimple_statement_with_memory_ops GTY ((tag ("GSS_WITH_MEM_OPS"))) gsmem;
742   struct gimple_statement_omp GTY ((tag ("GSS_OMP"))) omp;
743   struct gimple_statement_bind GTY ((tag ("GSS_BIND"))) gimple_bind;
744   struct gimple_statement_catch GTY ((tag ("GSS_CATCH"))) gimple_catch;
745   struct gimple_statement_eh_filter GTY ((tag ("GSS_EH_FILTER"))) gimple_eh_filter;
746   struct gimple_statement_eh_mnt GTY ((tag ("GSS_EH_MNT"))) gimple_eh_mnt;
747   struct gimple_statement_phi GTY ((tag ("GSS_PHI"))) gimple_phi;
748   struct gimple_statement_eh_ctrl GTY ((tag ("GSS_EH_CTRL"))) gimple_eh_ctrl;
749   struct gimple_statement_try GTY ((tag ("GSS_TRY"))) gimple_try;
750   struct gimple_statement_wce GTY ((tag ("GSS_WCE"))) gimple_wce;
751   struct gimple_statement_asm GTY ((tag ("GSS_ASM"))) gimple_asm;
752   struct gimple_statement_omp_critical GTY ((tag ("GSS_OMP_CRITICAL"))) gimple_omp_critical;
753   struct gimple_statement_omp_for GTY ((tag ("GSS_OMP_FOR"))) gimple_omp_for;
754   struct gimple_statement_omp_parallel GTY ((tag ("GSS_OMP_PARALLEL"))) gimple_omp_parallel;
755   struct gimple_statement_omp_task GTY ((tag ("GSS_OMP_TASK"))) gimple_omp_task;
756   struct gimple_statement_omp_sections GTY ((tag ("GSS_OMP_SECTIONS"))) gimple_omp_sections;
757   struct gimple_statement_omp_single GTY ((tag ("GSS_OMP_SINGLE"))) gimple_omp_single;
758   struct gimple_statement_omp_continue GTY ((tag ("GSS_OMP_CONTINUE"))) gimple_omp_continue;
759   struct gimple_statement_omp_atomic_load GTY ((tag ("GSS_OMP_ATOMIC_LOAD"))) gimple_omp_atomic_load;
760   struct gimple_statement_omp_atomic_store GTY ((tag ("GSS_OMP_ATOMIC_STORE"))) gimple_omp_atomic_store;
761 };
762
763 /* In gimple.c.  */
764
765 /* Offset in bytes to the location of the operand vector.
766    Zero if there is no operand vector for this tuple structure.  */
767 extern size_t const gimple_ops_offset_[];
768
769 /* Map GIMPLE codes to GSS codes.  */
770 extern enum gimple_statement_structure_enum const gss_for_code_[];
771
772 gimple gimple_build_return (tree);
773
774 gimple gimple_build_assign_stat (tree, tree MEM_STAT_DECL);
775 #define gimple_build_assign(l,r) gimple_build_assign_stat (l, r MEM_STAT_INFO)
776
777 void extract_ops_from_tree (tree, enum tree_code *, tree *, tree *);
778
779 gimple gimple_build_assign_with_ops_stat (enum tree_code, tree, tree,
780                                           tree MEM_STAT_DECL);
781 #define gimple_build_assign_with_ops(c,o1,o2,o3) \
782   gimple_build_assign_with_ops_stat (c, o1, o2, o3 MEM_STAT_INFO)
783
784 gimple gimple_build_debug_bind_stat (tree, tree, gimple MEM_STAT_DECL);
785 #define gimple_build_debug_bind(var,val,stmt)                   \
786   gimple_build_debug_bind_stat ((var), (val), (stmt) MEM_STAT_INFO)
787
788 gimple gimple_build_call_vec (tree, VEC(tree, heap) *);
789 gimple gimple_build_call (tree, unsigned, ...);
790 gimple gimple_build_call_from_tree (tree);
791 gimple gimplify_assign (tree, tree, gimple_seq *);
792 gimple gimple_build_cond (enum tree_code, tree, tree, tree, tree);
793 gimple gimple_build_label (tree label);
794 gimple gimple_build_goto (tree dest);
795 gimple gimple_build_nop (void);
796 gimple gimple_build_bind (tree, gimple_seq, tree);
797 gimple gimple_build_asm_vec (const char *, VEC(tree,gc) *, VEC(tree,gc) *,
798                              VEC(tree,gc) *, VEC(tree,gc) *);
799 gimple gimple_build_catch (tree, gimple_seq);
800 gimple gimple_build_eh_filter (tree, gimple_seq);
801 gimple gimple_build_eh_must_not_throw (tree);
802 gimple gimple_build_try (gimple_seq, gimple_seq, enum gimple_try_flags);
803 gimple gimple_build_wce (gimple_seq);
804 gimple gimple_build_resx (int);
805 gimple gimple_build_eh_dispatch (int);
806 gimple gimple_build_switch_nlabels (unsigned, tree, tree);
807 gimple gimple_build_switch (unsigned, tree, tree, ...);
808 gimple gimple_build_switch_vec (tree, tree, VEC(tree,heap) *);
809 gimple gimple_build_omp_parallel (gimple_seq, tree, tree, tree);
810 gimple gimple_build_omp_task (gimple_seq, tree, tree, tree, tree, tree, tree);
811 gimple gimple_build_omp_for (gimple_seq, tree, size_t, gimple_seq);
812 gimple gimple_build_omp_critical (gimple_seq, tree);
813 gimple gimple_build_omp_section (gimple_seq);
814 gimple gimple_build_omp_continue (tree, tree);
815 gimple gimple_build_omp_master (gimple_seq);
816 gimple gimple_build_omp_return (bool);
817 gimple gimple_build_omp_ordered (gimple_seq);
818 gimple gimple_build_omp_sections (gimple_seq, tree);
819 gimple gimple_build_omp_sections_switch (void);
820 gimple gimple_build_omp_single (gimple_seq, tree);
821 gimple gimple_build_cdt (tree, tree);
822 gimple gimple_build_omp_atomic_load (tree, tree);
823 gimple gimple_build_omp_atomic_store (tree);
824 gimple gimple_build_predict (enum br_predictor, enum prediction);
825 enum gimple_statement_structure_enum gss_for_assign (enum tree_code);
826 void sort_case_labels (VEC(tree,heap) *);
827 void gimple_set_body (tree, gimple_seq);
828 gimple_seq gimple_body (tree);
829 bool gimple_has_body_p (tree);
830 gimple_seq gimple_seq_alloc (void);
831 void gimple_seq_free (gimple_seq);
832 void gimple_seq_add_seq (gimple_seq *, gimple_seq);
833 gimple_seq gimple_seq_copy (gimple_seq);
834 int gimple_call_flags (const_gimple);
835 bool gimple_assign_copy_p (gimple);
836 bool gimple_assign_ssa_name_copy_p (gimple);
837 bool gimple_assign_single_p (gimple);
838 bool gimple_assign_unary_nop_p (gimple);
839 void gimple_set_bb (gimple, struct basic_block_def *);
840 tree gimple_fold (const_gimple);
841 void gimple_assign_set_rhs_from_tree (gimple_stmt_iterator *, tree);
842 void gimple_assign_set_rhs_with_ops (gimple_stmt_iterator *, enum tree_code,
843                                      tree, tree);
844 tree gimple_get_lhs (const_gimple);
845 void gimple_set_lhs (gimple, tree);
846 void gimple_replace_lhs (gimple, tree);
847 gimple gimple_copy (gimple);
848 bool is_gimple_operand (const_tree);
849 void gimple_set_modified (gimple, bool);
850 void gimple_cond_get_ops_from_tree (tree, enum tree_code *, tree *, tree *);
851 gimple gimple_build_cond_from_tree (tree, tree, tree);
852 void gimple_cond_set_condition_from_tree (gimple, tree);
853 bool gimple_has_side_effects (const_gimple);
854 bool gimple_rhs_has_side_effects (const_gimple);
855 bool gimple_could_trap_p (gimple);
856 bool gimple_assign_rhs_could_trap_p (gimple);
857 void gimple_regimplify_operands (gimple, gimple_stmt_iterator *);
858 bool empty_body_p (gimple_seq);
859 unsigned get_gimple_rhs_num_ops (enum tree_code);
860 #define gimple_alloc(c, n) gimple_alloc_stat (c, n MEM_STAT_INFO)
861 gimple gimple_alloc_stat (enum gimple_code, unsigned MEM_STAT_DECL);
862 const char *gimple_decl_printable_name (tree, int);
863 tree gimple_fold_obj_type_ref (tree, tree);
864
865 /* Returns true iff T is a valid GIMPLE statement.  */
866 extern bool is_gimple_stmt (tree);
867
868 /* Returns true iff TYPE is a valid type for a scalar register variable.  */
869 extern bool is_gimple_reg_type (tree);
870 /* Returns true iff T is a scalar register variable.  */
871 extern bool is_gimple_reg (tree);
872 /* Returns true iff T is any sort of variable.  */
873 extern bool is_gimple_variable (tree);
874 /* Returns true iff T is any sort of symbol.  */
875 extern bool is_gimple_id (tree);
876 /* Returns true iff T is a variable or an INDIRECT_REF (of a variable).  */
877 extern bool is_gimple_min_lval (tree);
878 /* Returns true iff T is something whose address can be taken.  */
879 extern bool is_gimple_addressable (tree);
880 /* Returns true iff T is any valid GIMPLE lvalue.  */
881 extern bool is_gimple_lvalue (tree);
882
883 /* Returns true iff T is a GIMPLE address.  */
884 bool is_gimple_address (const_tree);
885 /* Returns true iff T is a GIMPLE invariant address.  */
886 bool is_gimple_invariant_address (const_tree);
887 /* Returns true iff T is a GIMPLE invariant address at interprocedural
888    level.  */
889 bool is_gimple_ip_invariant_address (const_tree);
890 /* Returns true iff T is a valid GIMPLE constant.  */
891 bool is_gimple_constant (const_tree);
892 /* Returns true iff T is a GIMPLE restricted function invariant.  */
893 extern bool is_gimple_min_invariant (const_tree);
894 /* Returns true iff T is a GIMPLE restricted interprecodural invariant.  */
895 extern bool is_gimple_ip_invariant (const_tree);
896 /* Returns true iff T is a GIMPLE rvalue.  */
897 extern bool is_gimple_val (tree);
898 /* Returns true iff T is a GIMPLE asm statement input.  */
899 extern bool is_gimple_asm_val (tree);
900 /* Returns true iff T is a valid rhs for a MODIFY_EXPR where the LHS is a
901    GIMPLE temporary, a renamed user variable, or something else,
902    respectively.  */
903 extern bool is_gimple_reg_rhs (tree);
904 extern bool is_gimple_mem_rhs (tree);
905
906 /* Returns true iff T is a valid if-statement condition.  */
907 extern bool is_gimple_condexpr (tree);
908
909 /* Returns true iff T is a type conversion.  */
910 extern bool is_gimple_cast (tree);
911 /* Returns true iff T is a variable that does not need to live in memory.  */
912 extern bool is_gimple_non_addressable (tree t);
913
914 /* Returns true iff T is a valid call address expression.  */
915 extern bool is_gimple_call_addr (tree);
916 /* If T makes a function call, returns the CALL_EXPR operand.  */
917 extern tree get_call_expr_in (tree t);
918
919 extern void recalculate_side_effects (tree);
920 extern tree gimple_register_type (tree);
921 extern void print_gimple_types_stats (void);
922 extern void free_gimple_type_tables (void);
923 extern tree gimple_unsigned_type (tree);
924 extern tree gimple_signed_type (tree);
925 extern alias_set_type gimple_get_alias_set (tree);
926 extern void count_uses_and_derefs (tree, gimple, unsigned *, unsigned *,
927                                    unsigned *);
928 extern bool walk_stmt_load_store_addr_ops (gimple, void *,
929                                            bool (*)(gimple, tree, void *),
930                                            bool (*)(gimple, tree, void *),
931                                            bool (*)(gimple, tree, void *));
932 extern bool walk_stmt_load_store_ops (gimple, void *,
933                                       bool (*)(gimple, tree, void *),
934                                       bool (*)(gimple, tree, void *));
935 extern bool gimple_ior_addresses_taken (bitmap, gimple);
936
937 /* In gimplify.c  */
938 extern tree create_tmp_var_raw (tree, const char *);
939 extern tree create_tmp_var_name (const char *);
940 extern tree create_tmp_var (tree, const char *);
941 extern tree get_initialized_tmp_var (tree, gimple_seq *, gimple_seq *);
942 extern tree get_formal_tmp_var (tree, gimple_seq *);
943 extern void declare_vars (tree, gimple, bool);
944 extern void annotate_all_with_location (gimple_seq, location_t);
945
946 /* Validation of GIMPLE expressions.  Note that these predicates only check
947    the basic form of the expression, they don't recurse to make sure that
948    underlying nodes are also of the right form.  */
949 typedef bool (*gimple_predicate)(tree);
950
951
952 /* FIXME we should deduce this from the predicate.  */
953 enum fallback {
954   fb_none = 0,          /* Do not generate a temporary.  */
955
956   fb_rvalue = 1,        /* Generate an rvalue to hold the result of a
957                            gimplified expression.  */
958
959   fb_lvalue = 2,        /* Generate an lvalue to hold the result of a
960                            gimplified expression.  */
961
962   fb_mayfail = 4,       /* Gimplification may fail.  Error issued
963                            afterwards.  */
964   fb_either= fb_rvalue | fb_lvalue
965 };
966
967 typedef int fallback_t;
968
969 enum gimplify_status {
970   GS_ERROR      = -2,   /* Something Bad Seen.  */
971   GS_UNHANDLED  = -1,   /* A langhook result for "I dunno".  */
972   GS_OK         = 0,    /* We did something, maybe more to do.  */
973   GS_ALL_DONE   = 1     /* The expression is fully gimplified.  */
974 };
975
976 struct gimplify_ctx
977 {
978   struct gimplify_ctx *prev_context;
979
980   VEC(gimple,heap) *bind_expr_stack;
981   tree temps;
982   gimple_seq conditional_cleanups;
983   tree exit_label;
984   tree return_temp;
985   
986   VEC(tree,heap) *case_labels;
987   /* The formal temporary table.  Should this be persistent?  */
988   htab_t temp_htab;
989
990   int conditions;
991   bool save_stack;
992   bool into_ssa;
993   bool allow_rhs_cond_expr;
994 };
995
996 extern enum gimplify_status gimplify_expr (tree *, gimple_seq *, gimple_seq *,
997                                            bool (*) (tree), fallback_t);
998 extern void gimplify_type_sizes (tree, gimple_seq *);
999 extern void gimplify_one_sizepos (tree *, gimple_seq *);
1000 extern bool gimplify_stmt (tree *, gimple_seq *);
1001 extern gimple gimplify_body (tree *, tree, bool);
1002 extern void push_gimplify_context (struct gimplify_ctx *);
1003 extern void pop_gimplify_context (gimple);
1004 extern void gimplify_and_add (tree, gimple_seq *);
1005
1006 /* Miscellaneous helpers.  */
1007 extern void gimple_add_tmp_var (tree);
1008 extern gimple gimple_current_bind_expr (void);
1009 extern VEC(gimple, heap) *gimple_bind_expr_stack (void);
1010 extern tree voidify_wrapper_expr (tree, tree);
1011 extern tree build_and_jump (tree *);
1012 extern tree alloc_stmt_list (void);
1013 extern void free_stmt_list (tree);
1014 extern tree force_labels_r (tree *, int *, void *);
1015 extern enum gimplify_status gimplify_va_arg_expr (tree *, gimple_seq *,
1016                                                   gimple_seq *);
1017 struct gimplify_omp_ctx;
1018 extern void omp_firstprivatize_variable (struct gimplify_omp_ctx *, tree);
1019 extern tree gimple_boolify (tree);
1020 extern gimple_predicate rhs_predicate_for (tree);
1021 extern tree canonicalize_cond_expr_cond (tree);
1022
1023 /* In omp-low.c.  */
1024 extern tree omp_reduction_init (tree, tree);
1025
1026 /* In tree-nested.c.  */
1027 extern void lower_nested_functions (tree);
1028 extern void insert_field_into_struct (tree, tree);
1029
1030 /* In gimplify.c.  */
1031 extern void gimplify_function_tree (tree);
1032
1033 /* In cfgexpand.c.  */
1034 extern tree gimple_assign_rhs_to_tree (gimple);
1035
1036 /* In builtins.c  */
1037 extern bool validate_gimple_arglist (const_gimple, ...);
1038
1039 /* In tree-ssa.c  */
1040 extern bool tree_ssa_useless_type_conversion (tree);
1041 extern tree tree_ssa_strip_useless_type_conversions (tree);
1042 extern bool useless_type_conversion_p (tree, tree);
1043 extern bool types_compatible_p (tree, tree);
1044
1045 /* Return the code for GIMPLE statement G.  */
1046
1047 static inline enum gimple_code
1048 gimple_code (const_gimple g)
1049 {
1050   return g->gsbase.code;
1051 }
1052
1053
1054 /* Return the GSS code used by a GIMPLE code.  */
1055
1056 static inline enum gimple_statement_structure_enum
1057 gss_for_code (enum gimple_code code)
1058 {
1059   gcc_assert ((unsigned int)code < LAST_AND_UNUSED_GIMPLE_CODE);
1060   return gss_for_code_[code];
1061 }
1062
1063
1064 /* Return which GSS code is used by GS.  */
1065
1066 static inline enum gimple_statement_structure_enum
1067 gimple_statement_structure (gimple gs)
1068 {
1069   return gss_for_code (gimple_code (gs));
1070 }
1071
1072
1073 /* Return true if statement G has sub-statements.  This is only true for
1074    High GIMPLE statements.  */
1075
1076 static inline bool
1077 gimple_has_substatements (gimple g)
1078 {
1079   switch (gimple_code (g))
1080     {
1081     case GIMPLE_BIND:
1082     case GIMPLE_CATCH:
1083     case GIMPLE_EH_FILTER:
1084     case GIMPLE_TRY:
1085     case GIMPLE_OMP_FOR:
1086     case GIMPLE_OMP_MASTER:
1087     case GIMPLE_OMP_ORDERED:
1088     case GIMPLE_OMP_SECTION:
1089     case GIMPLE_OMP_PARALLEL:
1090     case GIMPLE_OMP_TASK:
1091     case GIMPLE_OMP_SECTIONS:
1092     case GIMPLE_OMP_SINGLE:
1093     case GIMPLE_OMP_CRITICAL:
1094     case GIMPLE_WITH_CLEANUP_EXPR:
1095       return true;
1096
1097     default:
1098       return false;
1099     }
1100 }
1101           
1102
1103 /* Return the basic block holding statement G.  */
1104
1105 static inline struct basic_block_def *
1106 gimple_bb (const_gimple g)
1107 {
1108   return g->gsbase.bb;
1109 }
1110
1111
1112 /* Return the lexical scope block holding statement G.  */
1113
1114 static inline tree
1115 gimple_block (const_gimple g)
1116 {
1117   return g->gsbase.block;
1118 }
1119
1120
1121 /* Set BLOCK to be the lexical scope block holding statement G.  */
1122
1123 static inline void
1124 gimple_set_block (gimple g, tree block)
1125 {
1126   g->gsbase.block = block;
1127 }
1128
1129
1130 /* Return location information for statement G.  */
1131
1132 static inline location_t
1133 gimple_location (const_gimple g)
1134 {
1135   return g->gsbase.location;
1136 }
1137
1138 /* Return pointer to location information for statement G.  */
1139
1140 static inline const location_t *
1141 gimple_location_ptr (const_gimple g)
1142 {
1143   return &g->gsbase.location;
1144 }
1145
1146
1147 /* Set location information for statement G.  */
1148
1149 static inline void
1150 gimple_set_location (gimple g, location_t location)
1151 {
1152   g->gsbase.location = location;
1153 }
1154
1155
1156 /* Return true if G contains location information.  */
1157
1158 static inline bool
1159 gimple_has_location (const_gimple g)
1160 {
1161   return gimple_location (g) != UNKNOWN_LOCATION;
1162 }
1163
1164
1165 /* Return the file name of the location of STMT.  */
1166
1167 static inline const char *
1168 gimple_filename (const_gimple stmt)
1169 {
1170   return LOCATION_FILE (gimple_location (stmt));
1171 }
1172
1173
1174 /* Return the line number of the location of STMT.  */
1175
1176 static inline int
1177 gimple_lineno (const_gimple stmt)
1178 {
1179   return LOCATION_LINE (gimple_location (stmt));
1180 }
1181
1182
1183 /* Determine whether SEQ is a singleton. */
1184
1185 static inline bool
1186 gimple_seq_singleton_p (gimple_seq seq)
1187 {
1188   return ((gimple_seq_first (seq) != NULL)
1189           && (gimple_seq_first (seq) == gimple_seq_last (seq)));
1190 }
1191
1192 /* Return true if no warnings should be emitted for statement STMT.  */
1193
1194 static inline bool
1195 gimple_no_warning_p (const_gimple stmt)
1196 {
1197   return stmt->gsbase.no_warning;
1198 }
1199
1200 /* Set the no_warning flag of STMT to NO_WARNING.  */
1201
1202 static inline void
1203 gimple_set_no_warning (gimple stmt, bool no_warning)
1204 {
1205   stmt->gsbase.no_warning = (unsigned) no_warning;
1206 }
1207
1208 /* Set the visited status on statement STMT to VISITED_P.  */
1209
1210 static inline void
1211 gimple_set_visited (gimple stmt, bool visited_p)
1212 {
1213   stmt->gsbase.visited = (unsigned) visited_p;
1214 }
1215
1216
1217 /* Return the visited status for statement STMT.  */
1218
1219 static inline bool
1220 gimple_visited_p (gimple stmt)
1221 {
1222   return stmt->gsbase.visited;
1223 }
1224
1225
1226 /* Set pass local flag PLF on statement STMT to VAL_P.  */
1227
1228 static inline void
1229 gimple_set_plf (gimple stmt, enum plf_mask plf, bool val_p)
1230 {
1231   if (val_p)
1232     stmt->gsbase.plf |= (unsigned int) plf;
1233   else
1234     stmt->gsbase.plf &= ~((unsigned int) plf);
1235 }
1236
1237
1238 /* Return the value of pass local flag PLF on statement STMT.  */
1239
1240 static inline unsigned int
1241 gimple_plf (gimple stmt, enum plf_mask plf)
1242 {
1243   return stmt->gsbase.plf & ((unsigned int) plf);
1244 }
1245
1246
1247 /* Set the UID of statement.  */
1248
1249 static inline void
1250 gimple_set_uid (gimple g, unsigned uid)
1251 {
1252   g->gsbase.uid = uid;
1253 }
1254
1255
1256 /* Return the UID of statement.  */
1257
1258 static inline unsigned
1259 gimple_uid (const_gimple g)
1260 {
1261   return g->gsbase.uid;
1262 }
1263
1264
1265 /* Return true if GIMPLE statement G has register or memory operands.  */
1266
1267 static inline bool
1268 gimple_has_ops (const_gimple g)
1269 {
1270   return gimple_code (g) >= GIMPLE_COND && gimple_code (g) <= GIMPLE_RETURN;
1271 }
1272
1273
1274 /* Return true if GIMPLE statement G has memory operands.  */
1275
1276 static inline bool
1277 gimple_has_mem_ops (const_gimple g)
1278 {
1279   return gimple_code (g) >= GIMPLE_ASSIGN && gimple_code (g) <= GIMPLE_RETURN;
1280 }
1281
1282
1283 /* Return the set of DEF operands for statement G.  */
1284
1285 static inline struct def_optype_d *
1286 gimple_def_ops (const_gimple g)
1287 {
1288   if (!gimple_has_ops (g))
1289     return NULL;
1290   return g->gsops.opbase.def_ops;
1291 }
1292
1293
1294 /* Set DEF to be the set of DEF operands for statement G.  */
1295
1296 static inline void
1297 gimple_set_def_ops (gimple g, struct def_optype_d *def)
1298 {
1299   gcc_assert (gimple_has_ops (g));
1300   g->gsops.opbase.def_ops = def;
1301 }
1302
1303
1304 /* Return the set of USE operands for statement G.  */
1305
1306 static inline struct use_optype_d *
1307 gimple_use_ops (const_gimple g)
1308 {
1309   if (!gimple_has_ops (g))
1310     return NULL;
1311   return g->gsops.opbase.use_ops;
1312 }
1313
1314
1315 /* Set USE to be the set of USE operands for statement G.  */
1316
1317 static inline void
1318 gimple_set_use_ops (gimple g, struct use_optype_d *use)
1319 {
1320   gcc_assert (gimple_has_ops (g));
1321   g->gsops.opbase.use_ops = use;
1322 }
1323
1324
1325 /* Return the set of VUSE operand for statement G.  */
1326
1327 static inline use_operand_p
1328 gimple_vuse_op (const_gimple g)
1329 {
1330   struct use_optype_d *ops;
1331   if (!gimple_has_mem_ops (g))
1332     return NULL_USE_OPERAND_P;
1333   ops = g->gsops.opbase.use_ops;
1334   if (ops
1335       && USE_OP_PTR (ops)->use == &g->gsmembase.vuse)
1336     return USE_OP_PTR (ops);
1337   return NULL_USE_OPERAND_P;
1338 }
1339
1340 /* Return the set of VDEF operand for statement G.  */
1341
1342 static inline def_operand_p
1343 gimple_vdef_op (const_gimple g)
1344 {
1345   struct def_optype_d *ops;
1346   if (!gimple_has_mem_ops (g))
1347     return NULL_DEF_OPERAND_P;
1348   ops = g->gsops.opbase.def_ops;
1349   if (ops
1350       && DEF_OP_PTR (ops) == &g->gsmembase.vdef)
1351     return DEF_OP_PTR (ops);
1352   return NULL_DEF_OPERAND_P;
1353 }
1354
1355
1356 /* Return the single VUSE operand of the statement G.  */
1357
1358 static inline tree
1359 gimple_vuse (const_gimple g)
1360 {
1361   if (!gimple_has_mem_ops (g))
1362     return NULL_TREE;
1363   return g->gsmembase.vuse;
1364 }
1365
1366 /* Return the single VDEF operand of the statement G.  */
1367
1368 static inline tree
1369 gimple_vdef (const_gimple g)
1370 {
1371   if (!gimple_has_mem_ops (g))
1372     return NULL_TREE;
1373   return g->gsmembase.vdef;
1374 }
1375
1376 /* Return the single VUSE operand of the statement G.  */
1377
1378 static inline tree *
1379 gimple_vuse_ptr (gimple g)
1380 {
1381   if (!gimple_has_mem_ops (g))
1382     return NULL;
1383   return &g->gsmembase.vuse;
1384 }
1385
1386 /* Return the single VDEF operand of the statement G.  */
1387
1388 static inline tree *
1389 gimple_vdef_ptr (gimple g)
1390 {
1391   if (!gimple_has_mem_ops (g))
1392     return NULL;
1393   return &g->gsmembase.vdef;
1394 }
1395
1396 /* Set the single VUSE operand of the statement G.  */
1397
1398 static inline void
1399 gimple_set_vuse (gimple g, tree vuse)
1400 {
1401   gcc_assert (gimple_has_mem_ops (g));
1402   g->gsmembase.vuse = vuse;
1403 }
1404
1405 /* Set the single VDEF operand of the statement G.  */
1406
1407 static inline void
1408 gimple_set_vdef (gimple g, tree vdef)
1409 {
1410   gcc_assert (gimple_has_mem_ops (g));
1411   g->gsmembase.vdef = vdef;
1412 }
1413
1414
1415 /* Return true if statement G has operands and the modified field has
1416    been set.  */
1417
1418 static inline bool
1419 gimple_modified_p (const_gimple g)
1420 {
1421   return (gimple_has_ops (g)) ? (bool) g->gsbase.modified : false;
1422 }
1423
1424
1425 /* Return the tree code for the expression computed by STMT.  This is
1426    only valid for GIMPLE_COND, GIMPLE_CALL and GIMPLE_ASSIGN.  For
1427    GIMPLE_CALL, return CALL_EXPR as the expression code for
1428    consistency.  This is useful when the caller needs to deal with the
1429    three kinds of computation that GIMPLE supports.  */
1430
1431 static inline enum tree_code
1432 gimple_expr_code (const_gimple stmt)
1433 {
1434   enum gimple_code code = gimple_code (stmt);
1435   if (code == GIMPLE_ASSIGN || code == GIMPLE_COND)
1436     return (enum tree_code) stmt->gsbase.subcode;
1437   else if (code == GIMPLE_CALL)
1438     return CALL_EXPR;
1439   else
1440     gcc_unreachable ();
1441 }
1442
1443
1444 /* Mark statement S as modified, and update it.  */
1445
1446 static inline void
1447 update_stmt (gimple s)
1448 {
1449   if (gimple_has_ops (s))
1450     {
1451       gimple_set_modified (s, true);
1452       update_stmt_operands (s);
1453     }
1454 }
1455
1456 /* Update statement S if it has been optimized.  */
1457
1458 static inline void
1459 update_stmt_if_modified (gimple s)
1460 {
1461   if (gimple_modified_p (s))
1462     update_stmt_operands (s);
1463 }
1464
1465 /* Return true if statement STMT contains volatile operands.  */
1466
1467 static inline bool
1468 gimple_has_volatile_ops (const_gimple stmt)
1469 {
1470   if (gimple_has_mem_ops (stmt))
1471     return stmt->gsbase.has_volatile_ops;
1472   else
1473     return false;
1474 }
1475
1476
1477 /* Set the HAS_VOLATILE_OPS flag to VOLATILEP.  */
1478
1479 static inline void
1480 gimple_set_has_volatile_ops (gimple stmt, bool volatilep)
1481 {
1482   if (gimple_has_mem_ops (stmt))
1483     stmt->gsbase.has_volatile_ops = (unsigned) volatilep;
1484 }
1485
1486
1487 /* Return true if statement STMT may access memory.  */
1488
1489 static inline bool
1490 gimple_references_memory_p (gimple stmt)
1491 {
1492   return gimple_has_mem_ops (stmt) && gimple_vuse (stmt);
1493 }
1494
1495
1496 /* Return the subcode for OMP statement S.  */
1497
1498 static inline unsigned
1499 gimple_omp_subcode (const_gimple s)
1500 {
1501   gcc_assert (gimple_code (s) >= GIMPLE_OMP_ATOMIC_LOAD
1502               && gimple_code (s) <= GIMPLE_OMP_SINGLE);
1503   return s->gsbase.subcode;
1504 }
1505
1506 /* Set the subcode for OMP statement S to SUBCODE.  */
1507
1508 static inline void
1509 gimple_omp_set_subcode (gimple s, unsigned int subcode)
1510 {
1511   /* We only have 16 bits for the subcode.  Assert that we are not
1512      overflowing it.  */
1513   gcc_assert (subcode < (1 << 16));
1514   s->gsbase.subcode = subcode;
1515 }
1516
1517 /* Set the nowait flag on OMP_RETURN statement S.  */
1518
1519 static inline void
1520 gimple_omp_return_set_nowait (gimple s)
1521 {
1522   GIMPLE_CHECK (s, GIMPLE_OMP_RETURN);
1523   s->gsbase.subcode |= GF_OMP_RETURN_NOWAIT;
1524 }
1525
1526
1527 /* Return true if OMP return statement G has the GF_OMP_RETURN_NOWAIT
1528    flag set.  */
1529
1530 static inline bool
1531 gimple_omp_return_nowait_p (const_gimple g)
1532 {
1533   GIMPLE_CHECK (g, GIMPLE_OMP_RETURN);
1534   return (gimple_omp_subcode (g) & GF_OMP_RETURN_NOWAIT) != 0;
1535 }
1536
1537
1538 /* Return true if OMP section statement G has the GF_OMP_SECTION_LAST
1539    flag set.  */
1540
1541 static inline bool
1542 gimple_omp_section_last_p (const_gimple g)
1543 {
1544   GIMPLE_CHECK (g, GIMPLE_OMP_SECTION);
1545   return (gimple_omp_subcode (g) & GF_OMP_SECTION_LAST) != 0;
1546 }
1547
1548
1549 /* Set the GF_OMP_SECTION_LAST flag on G.  */
1550
1551 static inline void
1552 gimple_omp_section_set_last (gimple g)
1553 {
1554   GIMPLE_CHECK (g, GIMPLE_OMP_SECTION);
1555   g->gsbase.subcode |= GF_OMP_SECTION_LAST;
1556 }
1557
1558
1559 /* Return true if OMP parallel statement G has the
1560    GF_OMP_PARALLEL_COMBINED flag set.  */
1561
1562 static inline bool
1563 gimple_omp_parallel_combined_p (const_gimple g)
1564 {
1565   GIMPLE_CHECK (g, GIMPLE_OMP_PARALLEL);
1566   return (gimple_omp_subcode (g) & GF_OMP_PARALLEL_COMBINED) != 0;
1567 }
1568
1569
1570 /* Set the GF_OMP_PARALLEL_COMBINED field in G depending on the boolean
1571    value of COMBINED_P.  */
1572
1573 static inline void
1574 gimple_omp_parallel_set_combined_p (gimple g, bool combined_p)
1575 {
1576   GIMPLE_CHECK (g, GIMPLE_OMP_PARALLEL);
1577   if (combined_p)
1578     g->gsbase.subcode |= GF_OMP_PARALLEL_COMBINED;
1579   else
1580     g->gsbase.subcode &= ~GF_OMP_PARALLEL_COMBINED;
1581 }
1582
1583
1584 /* Return the number of operands for statement GS.  */
1585
1586 static inline unsigned
1587 gimple_num_ops (const_gimple gs)
1588 {
1589   return gs->gsbase.num_ops;
1590 }
1591
1592
1593 /* Set the number of operands for statement GS.  */
1594
1595 static inline void
1596 gimple_set_num_ops (gimple gs, unsigned num_ops)
1597 {
1598   gs->gsbase.num_ops = num_ops;
1599 }
1600
1601
1602 /* Return the array of operands for statement GS.  */
1603
1604 static inline tree *
1605 gimple_ops (gimple gs)
1606 {
1607   size_t off;
1608
1609   /* All the tuples have their operand vector at the very bottom
1610      of the structure.  Note that those structures that do not
1611      have an operand vector have a zero offset.  */
1612   off = gimple_ops_offset_[gimple_statement_structure (gs)];
1613   gcc_assert (off != 0);
1614
1615   return (tree *) ((char *) gs + off);
1616 }
1617
1618
1619 /* Return operand I for statement GS.  */
1620
1621 static inline tree
1622 gimple_op (const_gimple gs, unsigned i)
1623 {
1624   if (gimple_has_ops (gs))
1625     {
1626       gcc_assert (i < gimple_num_ops (gs));
1627       return gimple_ops (CONST_CAST_GIMPLE (gs))[i];
1628     }
1629   else
1630     return NULL_TREE;
1631 }
1632
1633 /* Return a pointer to operand I for statement GS.  */
1634
1635 static inline tree *
1636 gimple_op_ptr (const_gimple gs, unsigned i)
1637 {
1638   if (gimple_has_ops (gs))
1639     {
1640       gcc_assert (i < gimple_num_ops (gs));
1641       return gimple_ops (CONST_CAST_GIMPLE (gs)) + i;
1642     }
1643   else
1644     return NULL;
1645 }
1646
1647 /* Set operand I of statement GS to OP.  */
1648
1649 static inline void
1650 gimple_set_op (gimple gs, unsigned i, tree op)
1651 {
1652   gcc_assert (gimple_has_ops (gs) && i < gimple_num_ops (gs));
1653
1654   /* Note.  It may be tempting to assert that OP matches
1655      is_gimple_operand, but that would be wrong.  Different tuples
1656      accept slightly different sets of tree operands.  Each caller
1657      should perform its own validation.  */
1658   gimple_ops (gs)[i] = op;
1659 }
1660
1661 /* Return true if GS is a GIMPLE_ASSIGN.  */
1662
1663 static inline bool
1664 is_gimple_assign (const_gimple gs)
1665 {
1666   return gimple_code (gs) == GIMPLE_ASSIGN;
1667 }
1668
1669 /* Determine if expression CODE is one of the valid expressions that can
1670    be used on the RHS of GIMPLE assignments.  */
1671
1672 static inline enum gimple_rhs_class
1673 get_gimple_rhs_class (enum tree_code code)
1674 {
1675   return (enum gimple_rhs_class) gimple_rhs_class_table[(int) code];
1676 }
1677
1678 /* Return the LHS of assignment statement GS.  */
1679
1680 static inline tree
1681 gimple_assign_lhs (const_gimple gs)
1682 {
1683   GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
1684   return gimple_op (gs, 0);
1685 }
1686
1687
1688 /* Return a pointer to the LHS of assignment statement GS.  */
1689
1690 static inline tree *
1691 gimple_assign_lhs_ptr (const_gimple gs)
1692 {
1693   GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
1694   return gimple_op_ptr (gs, 0);
1695 }
1696
1697
1698 /* Set LHS to be the LHS operand of assignment statement GS.  */
1699
1700 static inline void
1701 gimple_assign_set_lhs (gimple gs, tree lhs)
1702 {
1703   GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
1704   gcc_assert (is_gimple_operand (lhs));
1705   gimple_set_op (gs, 0, lhs);
1706
1707   if (lhs && TREE_CODE (lhs) == SSA_NAME)
1708     SSA_NAME_DEF_STMT (lhs) = gs;
1709 }
1710
1711
1712 /* Return the first operand on the RHS of assignment statement GS.  */
1713
1714 static inline tree
1715 gimple_assign_rhs1 (const_gimple gs)
1716 {
1717   GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
1718   return gimple_op (gs, 1);
1719 }
1720
1721
1722 /* Return a pointer to the first operand on the RHS of assignment
1723    statement GS.  */
1724
1725 static inline tree *
1726 gimple_assign_rhs1_ptr (const_gimple gs)
1727 {
1728   GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
1729   return gimple_op_ptr (gs, 1);
1730 }
1731
1732 /* Set RHS to be the first operand on the RHS of assignment statement GS.  */
1733
1734 static inline void
1735 gimple_assign_set_rhs1 (gimple gs, tree rhs)
1736 {
1737   GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
1738
1739   /* If there are 3 or more operands, the 2 operands on the RHS must be
1740      GIMPLE values.  */
1741   if (gimple_num_ops (gs) >= 3)
1742     gcc_assert (is_gimple_val (rhs));
1743   else
1744     gcc_assert (is_gimple_operand (rhs));
1745
1746   gimple_set_op (gs, 1, rhs);
1747 }
1748
1749
1750 /* Return the second operand on the RHS of assignment statement GS.
1751    If GS does not have two operands, NULL is returned instead.  */
1752
1753 static inline tree
1754 gimple_assign_rhs2 (const_gimple gs)
1755 {
1756   GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
1757
1758   if (gimple_num_ops (gs) >= 3)
1759     return gimple_op (gs, 2);
1760   else
1761     return NULL_TREE;
1762 }
1763
1764
1765 /* Return a pointer to the second operand on the RHS of assignment
1766    statement GS.  */
1767
1768 static inline tree *
1769 gimple_assign_rhs2_ptr (const_gimple gs)
1770 {
1771   GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
1772   return gimple_op_ptr (gs, 2);
1773 }
1774
1775
1776 /* Set RHS to be the second operand on the RHS of assignment statement GS.  */
1777
1778 static inline void
1779 gimple_assign_set_rhs2 (gimple gs, tree rhs)
1780 {
1781   GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
1782
1783   /* The 2 operands on the RHS must be GIMPLE values.  */
1784   gcc_assert (is_gimple_val (rhs));
1785
1786   gimple_set_op (gs, 2, rhs);
1787 }
1788
1789 /* Returns true if GS is a nontemporal move.  */
1790
1791 static inline bool
1792 gimple_assign_nontemporal_move_p (const_gimple gs)
1793 {
1794   GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
1795   return gs->gsbase.nontemporal_move;
1796 }
1797
1798 /* Sets nontemporal move flag of GS to NONTEMPORAL.  */
1799
1800 static inline void
1801 gimple_assign_set_nontemporal_move (gimple gs, bool nontemporal)
1802 {
1803   GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
1804   gs->gsbase.nontemporal_move = nontemporal;
1805 }
1806
1807
1808 /* Return the code of the expression computed on the rhs of assignment
1809    statement GS.  In case that the RHS is a single object, returns the
1810    tree code of the object.  */
1811
1812 static inline enum tree_code
1813 gimple_assign_rhs_code (const_gimple gs)
1814 {
1815   enum tree_code code;
1816   GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
1817
1818   code = gimple_expr_code (gs);
1819   if (get_gimple_rhs_class (code) == GIMPLE_SINGLE_RHS)
1820     code = TREE_CODE (gimple_assign_rhs1 (gs));
1821
1822   return code;
1823 }
1824
1825
1826 /* Set CODE to be the code for the expression computed on the RHS of
1827    assignment S.  */
1828
1829 static inline void
1830 gimple_assign_set_rhs_code (gimple s, enum tree_code code)
1831 {
1832   GIMPLE_CHECK (s, GIMPLE_ASSIGN);
1833   s->gsbase.subcode = code;
1834 }
1835
1836
1837 /* Return the gimple rhs class of the code of the expression computed on
1838    the rhs of assignment statement GS.
1839    This will never return GIMPLE_INVALID_RHS.  */
1840
1841 static inline enum gimple_rhs_class
1842 gimple_assign_rhs_class (const_gimple gs)
1843 {
1844   return get_gimple_rhs_class (gimple_assign_rhs_code (gs));
1845 }
1846
1847
1848 /* Return true if S is a type-cast assignment.  */
1849
1850 static inline bool
1851 gimple_assign_cast_p (gimple s)
1852 {
1853   if (is_gimple_assign (s))
1854     {
1855       enum tree_code sc = gimple_assign_rhs_code (s);
1856       return CONVERT_EXPR_CODE_P (sc)
1857              || sc == VIEW_CONVERT_EXPR
1858              || sc == FIX_TRUNC_EXPR;
1859     }
1860
1861   return false;
1862 }
1863
1864
1865 /* Return true if GS is a GIMPLE_CALL.  */
1866
1867 static inline bool
1868 is_gimple_call (const_gimple gs)
1869 {
1870   return gimple_code (gs) == GIMPLE_CALL;
1871 }
1872
1873 /* Return the LHS of call statement GS.  */
1874
1875 static inline tree
1876 gimple_call_lhs (const_gimple gs)
1877 {
1878   GIMPLE_CHECK (gs, GIMPLE_CALL);
1879   return gimple_op (gs, 0);
1880 }
1881
1882
1883 /* Return a pointer to the LHS of call statement GS.  */
1884
1885 static inline tree *
1886 gimple_call_lhs_ptr (const_gimple gs)
1887 {
1888   GIMPLE_CHECK (gs, GIMPLE_CALL);
1889   return gimple_op_ptr (gs, 0);
1890 }
1891
1892
1893 /* Set LHS to be the LHS operand of call statement GS.  */
1894
1895 static inline void
1896 gimple_call_set_lhs (gimple gs, tree lhs)
1897 {
1898   GIMPLE_CHECK (gs, GIMPLE_CALL);
1899   gcc_assert (!lhs || is_gimple_operand (lhs));
1900   gimple_set_op (gs, 0, lhs);
1901   if (lhs && TREE_CODE (lhs) == SSA_NAME)
1902     SSA_NAME_DEF_STMT (lhs) = gs;
1903 }
1904
1905
1906 /* Return the tree node representing the function called by call
1907    statement GS.  */
1908
1909 static inline tree
1910 gimple_call_fn (const_gimple gs)
1911 {
1912   GIMPLE_CHECK (gs, GIMPLE_CALL);
1913   return gimple_op (gs, 1);
1914 }
1915
1916
1917 /* Return a pointer to the tree node representing the function called by call
1918    statement GS.  */
1919
1920 static inline tree *
1921 gimple_call_fn_ptr (const_gimple gs)
1922 {
1923   GIMPLE_CHECK (gs, GIMPLE_CALL);
1924   return gimple_op_ptr (gs, 1);
1925 }
1926
1927
1928 /* Set FN to be the function called by call statement GS.  */
1929
1930 static inline void
1931 gimple_call_set_fn (gimple gs, tree fn)
1932 {
1933   GIMPLE_CHECK (gs, GIMPLE_CALL);
1934   gcc_assert (is_gimple_operand (fn));
1935   gimple_set_op (gs, 1, fn);
1936 }
1937
1938
1939 /* Set FNDECL to be the function called by call statement GS.  */
1940
1941 static inline void
1942 gimple_call_set_fndecl (gimple gs, tree decl)
1943 {
1944   GIMPLE_CHECK (gs, GIMPLE_CALL);
1945   gcc_assert (TREE_CODE (decl) == FUNCTION_DECL);
1946   gimple_set_op (gs, 1, build_fold_addr_expr_loc (gimple_location (gs), decl));
1947 }
1948
1949
1950 /* If a given GIMPLE_CALL's callee is a FUNCTION_DECL, return it.
1951    Otherwise return NULL.  This function is analogous to
1952    get_callee_fndecl in tree land.  */
1953
1954 static inline tree
1955 gimple_call_fndecl (const_gimple gs)
1956 {
1957   tree addr = gimple_call_fn (gs);
1958   if (TREE_CODE (addr) == ADDR_EXPR)
1959     {
1960       gcc_assert (TREE_CODE (TREE_OPERAND (addr, 0)) == FUNCTION_DECL);
1961       return TREE_OPERAND (addr, 0);
1962     }
1963   return NULL_TREE;
1964 }
1965
1966
1967 /* Return the type returned by call statement GS.  */
1968
1969 static inline tree
1970 gimple_call_return_type (const_gimple gs)
1971 {
1972   tree fn = gimple_call_fn (gs);
1973   tree type = TREE_TYPE (fn);
1974
1975   /* See through the pointer.  */
1976   gcc_assert (POINTER_TYPE_P (type));
1977   type = TREE_TYPE (type);
1978
1979   gcc_assert (TREE_CODE (type) == FUNCTION_TYPE
1980               || TREE_CODE (type) == METHOD_TYPE);
1981
1982   /* The type returned by a FUNCTION_DECL is the type of its
1983      function type.  */
1984   return TREE_TYPE (type);
1985 }
1986
1987
1988 /* Return the static chain for call statement GS.  */
1989
1990 static inline tree
1991 gimple_call_chain (const_gimple gs)
1992 {
1993   GIMPLE_CHECK (gs, GIMPLE_CALL);
1994   return gimple_op (gs, 2);
1995 }
1996
1997
1998 /* Return a pointer to the static chain for call statement GS.  */
1999
2000 static inline tree *
2001 gimple_call_chain_ptr (const_gimple gs)
2002 {
2003   GIMPLE_CHECK (gs, GIMPLE_CALL);
2004   return gimple_op_ptr (gs, 2);
2005 }
2006
2007 /* Set CHAIN to be the static chain for call statement GS.  */
2008
2009 static inline void
2010 gimple_call_set_chain (gimple gs, tree chain)
2011 {
2012   GIMPLE_CHECK (gs, GIMPLE_CALL);
2013   gcc_assert (chain == NULL
2014               || TREE_CODE (chain) == ADDR_EXPR
2015               || SSA_VAR_P (chain));
2016   gimple_set_op (gs, 2, chain);
2017 }
2018
2019
2020 /* Return the number of arguments used by call statement GS.  */
2021
2022 static inline unsigned
2023 gimple_call_num_args (const_gimple gs)
2024 {
2025   unsigned num_ops;
2026   GIMPLE_CHECK (gs, GIMPLE_CALL);
2027   num_ops = gimple_num_ops (gs);
2028   gcc_assert (num_ops >= 3);
2029   return num_ops - 3;
2030 }
2031
2032
2033 /* Return the argument at position INDEX for call statement GS.  */
2034
2035 static inline tree
2036 gimple_call_arg (const_gimple gs, unsigned index)
2037 {
2038   GIMPLE_CHECK (gs, GIMPLE_CALL);
2039   return gimple_op (gs, index + 3);
2040 }
2041
2042
2043 /* Return a pointer to the argument at position INDEX for call
2044    statement GS.  */
2045
2046 static inline tree *
2047 gimple_call_arg_ptr (const_gimple gs, unsigned index)
2048 {
2049   GIMPLE_CHECK (gs, GIMPLE_CALL);
2050   return gimple_op_ptr (gs, index + 3);
2051 }
2052
2053
2054 /* Set ARG to be the argument at position INDEX for call statement GS.  */
2055
2056 static inline void
2057 gimple_call_set_arg (gimple gs, unsigned index, tree arg)
2058 {
2059   GIMPLE_CHECK (gs, GIMPLE_CALL);
2060   gcc_assert (is_gimple_operand (arg));
2061   gimple_set_op (gs, index + 3, arg);
2062 }
2063
2064
2065 /* If TAIL_P is true, mark call statement S as being a tail call
2066    (i.e., a call just before the exit of a function).  These calls are
2067    candidate for tail call optimization.  */
2068
2069 static inline void
2070 gimple_call_set_tail (gimple s, bool tail_p)
2071 {
2072   GIMPLE_CHECK (s, GIMPLE_CALL);
2073   if (tail_p)
2074     s->gsbase.subcode |= GF_CALL_TAILCALL;
2075   else
2076     s->gsbase.subcode &= ~GF_CALL_TAILCALL;
2077 }
2078
2079
2080 /* Return true if GIMPLE_CALL S is marked as a tail call.  */
2081
2082 static inline bool
2083 gimple_call_tail_p (gimple s)
2084 {
2085   GIMPLE_CHECK (s, GIMPLE_CALL);
2086   return (s->gsbase.subcode & GF_CALL_TAILCALL) != 0;
2087 }
2088
2089
2090 /* Set the inlinable status of GIMPLE_CALL S to INLINABLE_P.  */
2091
2092 static inline void
2093 gimple_call_set_cannot_inline (gimple s, bool inlinable_p)
2094 {
2095   GIMPLE_CHECK (s, GIMPLE_CALL);
2096   if (inlinable_p)
2097     s->gsbase.subcode |= GF_CALL_CANNOT_INLINE;
2098   else
2099     s->gsbase.subcode &= ~GF_CALL_CANNOT_INLINE;
2100 }
2101
2102
2103 /* Return true if GIMPLE_CALL S cannot be inlined.  */
2104
2105 static inline bool
2106 gimple_call_cannot_inline_p (gimple s)
2107 {
2108   GIMPLE_CHECK (s, GIMPLE_CALL);
2109   return (s->gsbase.subcode & GF_CALL_CANNOT_INLINE) != 0;
2110 }
2111
2112
2113 /* If RETURN_SLOT_OPT_P is true mark GIMPLE_CALL S as valid for return
2114    slot optimization.  This transformation uses the target of the call
2115    expansion as the return slot for calls that return in memory.  */
2116
2117 static inline void
2118 gimple_call_set_return_slot_opt (gimple s, bool return_slot_opt_p)
2119 {
2120   GIMPLE_CHECK (s, GIMPLE_CALL);
2121   if (return_slot_opt_p)
2122     s->gsbase.subcode |= GF_CALL_RETURN_SLOT_OPT;
2123   else
2124     s->gsbase.subcode &= ~GF_CALL_RETURN_SLOT_OPT;
2125 }
2126
2127
2128 /* Return true if S is marked for return slot optimization.  */
2129
2130 static inline bool
2131 gimple_call_return_slot_opt_p (gimple s)
2132 {
2133   GIMPLE_CHECK (s, GIMPLE_CALL);
2134   return (s->gsbase.subcode & GF_CALL_RETURN_SLOT_OPT) != 0;
2135 }
2136
2137
2138 /* If FROM_THUNK_P is true, mark GIMPLE_CALL S as being the jump from a
2139    thunk to the thunked-to function.  */
2140
2141 static inline void
2142 gimple_call_set_from_thunk (gimple s, bool from_thunk_p)
2143 {
2144   GIMPLE_CHECK (s, GIMPLE_CALL);
2145   if (from_thunk_p)
2146     s->gsbase.subcode |= GF_CALL_FROM_THUNK;
2147   else
2148     s->gsbase.subcode &= ~GF_CALL_FROM_THUNK;
2149 }
2150
2151
2152 /* Return true if GIMPLE_CALL S is a jump from a thunk.  */
2153
2154 static inline bool
2155 gimple_call_from_thunk_p (gimple s)
2156 {
2157   GIMPLE_CHECK (s, GIMPLE_CALL);
2158   return (s->gsbase.subcode & GF_CALL_FROM_THUNK) != 0;
2159 }
2160
2161
2162 /* If PASS_ARG_PACK_P is true, GIMPLE_CALL S is a stdarg call that needs the
2163    argument pack in its argument list.  */
2164
2165 static inline void
2166 gimple_call_set_va_arg_pack (gimple s, bool pass_arg_pack_p)
2167 {
2168   GIMPLE_CHECK (s, GIMPLE_CALL);
2169   if (pass_arg_pack_p)
2170     s->gsbase.subcode |= GF_CALL_VA_ARG_PACK;
2171   else
2172     s->gsbase.subcode &= ~GF_CALL_VA_ARG_PACK;
2173 }
2174
2175
2176 /* Return true if GIMPLE_CALL S is a stdarg call that needs the
2177    argument pack in its argument list.  */
2178
2179 static inline bool
2180 gimple_call_va_arg_pack_p (gimple s)
2181 {
2182   GIMPLE_CHECK (s, GIMPLE_CALL);
2183   return (s->gsbase.subcode & GF_CALL_VA_ARG_PACK) != 0;
2184 }
2185
2186
2187 /* Return true if S is a noreturn call.  */
2188
2189 static inline bool
2190 gimple_call_noreturn_p (gimple s)
2191 {
2192   GIMPLE_CHECK (s, GIMPLE_CALL);
2193   return (gimple_call_flags (s) & ECF_NORETURN) != 0;
2194 }
2195
2196
2197 /* Return true if S is a nothrow call.  */
2198
2199 static inline bool
2200 gimple_call_nothrow_p (gimple s)
2201 {
2202   GIMPLE_CHECK (s, GIMPLE_CALL);
2203   return (gimple_call_flags (s) & ECF_NOTHROW) != 0;
2204 }
2205
2206
2207 /* Copy all the GF_CALL_* flags from ORIG_CALL to DEST_CALL.  */
2208
2209 static inline void
2210 gimple_call_copy_flags (gimple dest_call, gimple orig_call)
2211 {
2212   GIMPLE_CHECK (dest_call, GIMPLE_CALL);
2213   GIMPLE_CHECK (orig_call, GIMPLE_CALL);
2214   dest_call->gsbase.subcode = orig_call->gsbase.subcode;
2215 }
2216
2217
2218 /* Returns true if this is a GIMPLE_ASSIGN or a GIMPLE_CALL with a
2219    non-NULL lhs.  */
2220
2221 static inline bool
2222 gimple_has_lhs (gimple stmt)
2223 {
2224   return (is_gimple_assign (stmt)
2225           || (is_gimple_call (stmt)
2226               && gimple_call_lhs (stmt) != NULL_TREE));
2227 }
2228
2229
2230 /* Return the code of the predicate computed by conditional statement GS.  */
2231
2232 static inline enum tree_code
2233 gimple_cond_code (const_gimple gs)
2234 {
2235   GIMPLE_CHECK (gs, GIMPLE_COND);
2236   return (enum tree_code) gs->gsbase.subcode;
2237 }
2238
2239
2240 /* Set CODE to be the predicate code for the conditional statement GS.  */
2241
2242 static inline void
2243 gimple_cond_set_code (gimple gs, enum tree_code code)
2244 {
2245   GIMPLE_CHECK (gs, GIMPLE_COND);
2246   gcc_assert (TREE_CODE_CLASS (code) == tcc_comparison);
2247   gs->gsbase.subcode = code;
2248 }
2249
2250
2251 /* Return the LHS of the predicate computed by conditional statement GS.  */
2252
2253 static inline tree
2254 gimple_cond_lhs (const_gimple gs)
2255 {
2256   GIMPLE_CHECK (gs, GIMPLE_COND);
2257   return gimple_op (gs, 0);
2258 }
2259
2260 /* Return the pointer to the LHS of the predicate computed by conditional
2261    statement GS.  */
2262
2263 static inline tree *
2264 gimple_cond_lhs_ptr (const_gimple gs)
2265 {
2266   GIMPLE_CHECK (gs, GIMPLE_COND);
2267   return gimple_op_ptr (gs, 0);
2268 }
2269
2270 /* Set LHS to be the LHS operand of the predicate computed by
2271    conditional statement GS.  */
2272
2273 static inline void
2274 gimple_cond_set_lhs (gimple gs, tree lhs)
2275 {
2276   GIMPLE_CHECK (gs, GIMPLE_COND);
2277   gcc_assert (is_gimple_operand (lhs));
2278   gimple_set_op (gs, 0, lhs);
2279 }
2280
2281
2282 /* Return the RHS operand of the predicate computed by conditional GS.  */
2283
2284 static inline tree
2285 gimple_cond_rhs (const_gimple gs)
2286 {
2287   GIMPLE_CHECK (gs, GIMPLE_COND);
2288   return gimple_op (gs, 1);
2289 }
2290
2291 /* Return the pointer to the RHS operand of the predicate computed by
2292    conditional GS.  */
2293
2294 static inline tree *
2295 gimple_cond_rhs_ptr (const_gimple gs)
2296 {
2297   GIMPLE_CHECK (gs, GIMPLE_COND);
2298   return gimple_op_ptr (gs, 1);
2299 }
2300
2301
2302 /* Set RHS to be the RHS operand of the predicate computed by
2303    conditional statement GS.  */
2304
2305 static inline void
2306 gimple_cond_set_rhs (gimple gs, tree rhs)
2307 {
2308   GIMPLE_CHECK (gs, GIMPLE_COND);
2309   gcc_assert (is_gimple_operand (rhs));
2310   gimple_set_op (gs, 1, rhs);
2311 }
2312
2313
2314 /* Return the label used by conditional statement GS when its
2315    predicate evaluates to true.  */
2316
2317 static inline tree
2318 gimple_cond_true_label (const_gimple gs)
2319 {
2320   GIMPLE_CHECK (gs, GIMPLE_COND);
2321   return gimple_op (gs, 2);
2322 }
2323
2324
2325 /* Set LABEL to be the label used by conditional statement GS when its
2326    predicate evaluates to true.  */
2327
2328 static inline void
2329 gimple_cond_set_true_label (gimple gs, tree label)
2330 {
2331   GIMPLE_CHECK (gs, GIMPLE_COND);
2332   gcc_assert (!label || TREE_CODE (label) == LABEL_DECL);
2333   gimple_set_op (gs, 2, label);
2334 }
2335
2336
2337 /* Set LABEL to be the label used by conditional statement GS when its
2338    predicate evaluates to false.  */
2339
2340 static inline void
2341 gimple_cond_set_false_label (gimple gs, tree label)
2342 {
2343   GIMPLE_CHECK (gs, GIMPLE_COND);
2344   gcc_assert (!label || TREE_CODE (label) == LABEL_DECL);
2345   gimple_set_op (gs, 3, label);
2346 }
2347
2348
2349 /* Return the label used by conditional statement GS when its
2350    predicate evaluates to false.  */
2351
2352 static inline tree
2353 gimple_cond_false_label (const_gimple gs)
2354 {
2355   GIMPLE_CHECK (gs, GIMPLE_COND);
2356   return gimple_op (gs, 3);
2357 }
2358
2359
2360 /* Set the conditional COND_STMT to be of the form 'if (1 == 0)'.  */
2361
2362 static inline void
2363 gimple_cond_make_false (gimple gs)
2364 {
2365   gimple_cond_set_lhs (gs, boolean_true_node);
2366   gimple_cond_set_rhs (gs, boolean_false_node);
2367   gs->gsbase.subcode = EQ_EXPR;
2368 }
2369
2370
2371 /* Set the conditional COND_STMT to be of the form 'if (1 == 1)'.  */
2372
2373 static inline void
2374 gimple_cond_make_true (gimple gs)
2375 {
2376   gimple_cond_set_lhs (gs, boolean_true_node);
2377   gimple_cond_set_rhs (gs, boolean_true_node);
2378   gs->gsbase.subcode = EQ_EXPR;
2379 }
2380
2381 /* Check if conditional statemente GS is of the form 'if (1 == 1)',
2382   'if (0 == 0)', 'if (1 != 0)' or 'if (0 != 1)' */
2383
2384 static inline bool
2385 gimple_cond_true_p (const_gimple gs)
2386 {
2387   tree lhs = gimple_cond_lhs (gs);
2388   tree rhs = gimple_cond_rhs (gs);
2389   enum tree_code code = gimple_cond_code (gs);
2390
2391   if (lhs != boolean_true_node && lhs != boolean_false_node)
2392     return false;
2393
2394   if (rhs != boolean_true_node && rhs != boolean_false_node)
2395     return false;
2396
2397   if (code == NE_EXPR && lhs != rhs)
2398     return true;
2399
2400   if (code == EQ_EXPR && lhs == rhs)
2401       return true;
2402
2403   return false;
2404 }
2405
2406 /* Check if conditional statement GS is of the form 'if (1 != 1)',
2407    'if (0 != 0)', 'if (1 == 0)' or 'if (0 == 1)' */
2408
2409 static inline bool
2410 gimple_cond_false_p (const_gimple gs)
2411 {
2412   tree lhs = gimple_cond_lhs (gs);
2413   tree rhs = gimple_cond_rhs (gs);
2414   enum tree_code code = gimple_cond_code (gs);
2415
2416   if (lhs != boolean_true_node && lhs != boolean_false_node)
2417     return false;
2418
2419   if (rhs != boolean_true_node && rhs != boolean_false_node)
2420     return false;
2421
2422   if (code == NE_EXPR && lhs == rhs)
2423     return true;
2424
2425   if (code == EQ_EXPR && lhs != rhs)
2426       return true;
2427
2428   return false;
2429 }
2430
2431 /* Check if conditional statement GS is of the form 'if (var != 0)' or
2432    'if (var == 1)' */
2433
2434 static inline bool
2435 gimple_cond_single_var_p (gimple gs)
2436 {
2437   if (gimple_cond_code (gs) == NE_EXPR
2438       && gimple_cond_rhs (gs) == boolean_false_node)
2439     return true;
2440
2441   if (gimple_cond_code (gs) == EQ_EXPR
2442       && gimple_cond_rhs (gs) == boolean_true_node)
2443     return true;
2444
2445   return false;
2446 }
2447
2448 /* Set the code, LHS and RHS of GIMPLE_COND STMT from CODE, LHS and RHS.  */
2449
2450 static inline void
2451 gimple_cond_set_condition (gimple stmt, enum tree_code code, tree lhs, tree rhs)
2452 {
2453   gimple_cond_set_code (stmt, code);
2454   gimple_cond_set_lhs (stmt, lhs);
2455   gimple_cond_set_rhs (stmt, rhs);
2456 }
2457
2458 /* Return the LABEL_DECL node used by GIMPLE_LABEL statement GS.  */
2459
2460 static inline tree
2461 gimple_label_label (const_gimple gs)
2462 {
2463   GIMPLE_CHECK (gs, GIMPLE_LABEL);
2464   return gimple_op (gs, 0);
2465 }
2466
2467
2468 /* Set LABEL to be the LABEL_DECL node used by GIMPLE_LABEL statement
2469    GS.  */
2470
2471 static inline void
2472 gimple_label_set_label (gimple gs, tree label)
2473 {
2474   GIMPLE_CHECK (gs, GIMPLE_LABEL);
2475   gcc_assert (TREE_CODE (label) == LABEL_DECL);
2476   gimple_set_op (gs, 0, label);
2477 }
2478
2479
2480 /* Return the destination of the unconditional jump GS.  */
2481
2482 static inline tree
2483 gimple_goto_dest (const_gimple gs)
2484 {
2485   GIMPLE_CHECK (gs, GIMPLE_GOTO);
2486   return gimple_op (gs, 0);
2487 }
2488
2489
2490 /* Set DEST to be the destination of the unconditonal jump GS.  */
2491
2492 static inline void 
2493 gimple_goto_set_dest (gimple gs, tree dest)
2494 {
2495   GIMPLE_CHECK (gs, GIMPLE_GOTO);
2496   gcc_assert (is_gimple_operand (dest));
2497   gimple_set_op (gs, 0, dest);
2498 }
2499
2500
2501 /* Return the variables declared in the GIMPLE_BIND statement GS.  */
2502
2503 static inline tree
2504 gimple_bind_vars (const_gimple gs)
2505 {
2506   GIMPLE_CHECK (gs, GIMPLE_BIND);
2507   return gs->gimple_bind.vars;
2508 }
2509
2510
2511 /* Set VARS to be the set of variables declared in the GIMPLE_BIND
2512    statement GS.  */
2513
2514 static inline void
2515 gimple_bind_set_vars (gimple gs, tree vars)
2516 {
2517   GIMPLE_CHECK (gs, GIMPLE_BIND);
2518   gs->gimple_bind.vars = vars;
2519 }
2520
2521
2522 /* Append VARS to the set of variables declared in the GIMPLE_BIND
2523    statement GS.  */
2524
2525 static inline void
2526 gimple_bind_append_vars (gimple gs, tree vars)
2527 {
2528   GIMPLE_CHECK (gs, GIMPLE_BIND);
2529   gs->gimple_bind.vars = chainon (gs->gimple_bind.vars, vars);
2530 }
2531
2532
2533 /* Return the GIMPLE sequence contained in the GIMPLE_BIND statement GS.  */
2534
2535 static inline gimple_seq
2536 gimple_bind_body (gimple gs)
2537 {
2538   GIMPLE_CHECK (gs, GIMPLE_BIND);
2539   return gs->gimple_bind.body;
2540 }
2541
2542
2543 /* Set SEQ to be the GIMPLE sequence contained in the GIMPLE_BIND
2544    statement GS.  */
2545
2546 static inline void
2547 gimple_bind_set_body (gimple gs, gimple_seq seq)
2548 {
2549   GIMPLE_CHECK (gs, GIMPLE_BIND);
2550   gs->gimple_bind.body = seq;
2551 }
2552
2553
2554 /* Append a statement to the end of a GIMPLE_BIND's body.  */
2555
2556 static inline void
2557 gimple_bind_add_stmt (gimple gs, gimple stmt)
2558 {
2559   GIMPLE_CHECK (gs, GIMPLE_BIND);
2560   gimple_seq_add_stmt (&gs->gimple_bind.body, stmt);
2561 }
2562
2563
2564 /* Append a sequence of statements to the end of a GIMPLE_BIND's body.  */
2565
2566 static inline void
2567 gimple_bind_add_seq (gimple gs, gimple_seq seq)
2568 {
2569   GIMPLE_CHECK (gs, GIMPLE_BIND);
2570   gimple_seq_add_seq (&gs->gimple_bind.body, seq);
2571 }
2572
2573
2574 /* Return the TREE_BLOCK node associated with GIMPLE_BIND statement
2575    GS.  This is analogous to the BIND_EXPR_BLOCK field in trees.  */
2576
2577 static inline tree
2578 gimple_bind_block (const_gimple gs)
2579 {
2580   GIMPLE_CHECK (gs, GIMPLE_BIND);
2581   return gs->gimple_bind.block;
2582 }
2583
2584
2585 /* Set BLOCK to be the TREE_BLOCK node associated with GIMPLE_BIND
2586    statement GS.  */
2587
2588 static inline void
2589 gimple_bind_set_block (gimple gs, tree block)
2590 {
2591   GIMPLE_CHECK (gs, GIMPLE_BIND);
2592   gcc_assert (block == NULL_TREE || TREE_CODE (block) == BLOCK);
2593   gs->gimple_bind.block = block;
2594 }
2595
2596
2597 /* Return the number of input operands for GIMPLE_ASM GS.  */
2598
2599 static inline unsigned
2600 gimple_asm_ninputs (const_gimple gs)
2601 {
2602   GIMPLE_CHECK (gs, GIMPLE_ASM);
2603   return gs->gimple_asm.ni;
2604 }
2605
2606
2607 /* Return the number of output operands for GIMPLE_ASM GS.  */
2608
2609 static inline unsigned
2610 gimple_asm_noutputs (const_gimple gs)
2611 {
2612   GIMPLE_CHECK (gs, GIMPLE_ASM);
2613   return gs->gimple_asm.no;
2614 }
2615
2616
2617 /* Return the number of clobber operands for GIMPLE_ASM GS.  */
2618
2619 static inline unsigned
2620 gimple_asm_nclobbers (const_gimple gs)
2621 {
2622   GIMPLE_CHECK (gs, GIMPLE_ASM);
2623   return gs->gimple_asm.nc;
2624 }
2625
2626 /* Return the number of label operands for GIMPLE_ASM GS.  */
2627
2628 static inline unsigned
2629 gimple_asm_nlabels (const_gimple gs)
2630 {
2631   GIMPLE_CHECK (gs, GIMPLE_ASM);
2632   return gs->gimple_asm.nl;
2633 }
2634
2635 /* Return input operand INDEX of GIMPLE_ASM GS.  */
2636
2637 static inline tree
2638 gimple_asm_input_op (const_gimple gs, unsigned index)
2639 {
2640   GIMPLE_CHECK (gs, GIMPLE_ASM);
2641   gcc_assert (index <= gs->gimple_asm.ni);
2642   return gimple_op (gs, index);
2643 }
2644
2645 /* Return a pointer to input operand INDEX of GIMPLE_ASM GS.  */
2646
2647 static inline tree *
2648 gimple_asm_input_op_ptr (const_gimple gs, unsigned index)
2649 {
2650   GIMPLE_CHECK (gs, GIMPLE_ASM);
2651   gcc_assert (index <= gs->gimple_asm.ni);
2652   return gimple_op_ptr (gs, index);
2653 }
2654
2655
2656 /* Set IN_OP to be input operand INDEX in GIMPLE_ASM GS.  */
2657
2658 static inline void
2659 gimple_asm_set_input_op (gimple gs, unsigned index, tree in_op)
2660 {
2661   GIMPLE_CHECK (gs, GIMPLE_ASM);
2662   gcc_assert (index <= gs->gimple_asm.ni);
2663   gcc_assert (TREE_CODE (in_op) == TREE_LIST);
2664   gimple_set_op (gs, index, in_op);
2665 }
2666
2667
2668 /* Return output operand INDEX of GIMPLE_ASM GS.  */
2669
2670 static inline tree
2671 gimple_asm_output_op (const_gimple gs, unsigned index)
2672 {
2673   GIMPLE_CHECK (gs, GIMPLE_ASM);
2674   gcc_assert (index <= gs->gimple_asm.no);
2675   return gimple_op (gs, index + gs->gimple_asm.ni);
2676 }
2677
2678 /* Return a pointer to output operand INDEX of GIMPLE_ASM GS.  */
2679
2680 static inline tree *
2681 gimple_asm_output_op_ptr (const_gimple gs, unsigned index)
2682 {
2683   GIMPLE_CHECK (gs, GIMPLE_ASM);
2684   gcc_assert (index <= gs->gimple_asm.no);
2685   return gimple_op_ptr (gs, index + gs->gimple_asm.ni);
2686 }
2687
2688
2689 /* Set OUT_OP to be output operand INDEX in GIMPLE_ASM GS.  */
2690
2691 static inline void
2692 gimple_asm_set_output_op (gimple gs, unsigned index, tree out_op)
2693 {
2694   GIMPLE_CHECK (gs, GIMPLE_ASM);
2695   gcc_assert (index <= gs->gimple_asm.no);
2696   gcc_assert (TREE_CODE (out_op) == TREE_LIST);
2697   gimple_set_op (gs, index + gs->gimple_asm.ni, out_op);
2698 }
2699
2700
2701 /* Return clobber operand INDEX of GIMPLE_ASM GS.  */
2702
2703 static inline tree
2704 gimple_asm_clobber_op (const_gimple gs, unsigned index)
2705 {
2706   GIMPLE_CHECK (gs, GIMPLE_ASM);
2707   gcc_assert (index <= gs->gimple_asm.nc);
2708   return gimple_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.no);
2709 }
2710
2711
2712 /* Set CLOBBER_OP to be clobber operand INDEX in GIMPLE_ASM GS.  */
2713
2714 static inline void
2715 gimple_asm_set_clobber_op (gimple gs, unsigned index, tree clobber_op)
2716 {
2717   GIMPLE_CHECK (gs, GIMPLE_ASM);
2718   gcc_assert (index <= gs->gimple_asm.nc);
2719   gcc_assert (TREE_CODE (clobber_op) == TREE_LIST);
2720   gimple_set_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.no, clobber_op);
2721 }
2722
2723 /* Return label operand INDEX of GIMPLE_ASM GS.  */
2724
2725 static inline tree
2726 gimple_asm_label_op (const_gimple gs, unsigned index)
2727 {
2728   GIMPLE_CHECK (gs, GIMPLE_ASM);
2729   gcc_assert (index <= gs->gimple_asm.nl);
2730   return gimple_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.nc);
2731 }
2732
2733 /* Set LABEL_OP to be label operand INDEX in GIMPLE_ASM GS.  */
2734
2735 static inline void
2736 gimple_asm_set_label_op (gimple gs, unsigned index, tree label_op)
2737 {
2738   GIMPLE_CHECK (gs, GIMPLE_ASM);
2739   gcc_assert (index <= gs->gimple_asm.nl);
2740   gcc_assert (TREE_CODE (label_op) == TREE_LIST);
2741   gimple_set_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.nc, label_op);
2742 }
2743
2744 /* Return the string representing the assembly instruction in
2745    GIMPLE_ASM GS.  */
2746
2747 static inline const char *
2748 gimple_asm_string (const_gimple gs)
2749 {
2750   GIMPLE_CHECK (gs, GIMPLE_ASM);
2751   return gs->gimple_asm.string;
2752 }
2753
2754
2755 /* Return true if GS is an asm statement marked volatile.  */
2756
2757 static inline bool
2758 gimple_asm_volatile_p (const_gimple gs)
2759 {
2760   GIMPLE_CHECK (gs, GIMPLE_ASM);
2761   return (gs->gsbase.subcode & GF_ASM_VOLATILE) != 0;
2762 }
2763
2764
2765 /* If VOLATLE_P is true, mark asm statement GS as volatile.  */
2766
2767 static inline void
2768 gimple_asm_set_volatile (gimple gs, bool volatile_p)
2769 {
2770   GIMPLE_CHECK (gs, GIMPLE_ASM);
2771   if (volatile_p)
2772     gs->gsbase.subcode |= GF_ASM_VOLATILE;
2773   else
2774     gs->gsbase.subcode &= ~GF_ASM_VOLATILE;
2775 }
2776
2777
2778 /* If INPUT_P is true, mark asm GS as an ASM_INPUT.  */
2779
2780 static inline void
2781 gimple_asm_set_input (gimple gs, bool input_p)
2782 {
2783   GIMPLE_CHECK (gs, GIMPLE_ASM);
2784   if (input_p)
2785     gs->gsbase.subcode |= GF_ASM_INPUT;
2786   else
2787     gs->gsbase.subcode &= ~GF_ASM_INPUT;
2788 }
2789
2790
2791 /* Return true if asm GS is an ASM_INPUT.  */
2792
2793 static inline bool
2794 gimple_asm_input_p (const_gimple gs)
2795 {
2796   GIMPLE_CHECK (gs, GIMPLE_ASM);
2797   return (gs->gsbase.subcode & GF_ASM_INPUT) != 0;
2798 }
2799
2800
2801 /* Return the types handled by GIMPLE_CATCH statement GS.  */
2802
2803 static inline tree
2804 gimple_catch_types (const_gimple gs)
2805 {
2806   GIMPLE_CHECK (gs, GIMPLE_CATCH);
2807   return gs->gimple_catch.types;
2808 }
2809
2810
2811 /* Return a pointer to the types handled by GIMPLE_CATCH statement GS.  */
2812
2813 static inline tree *
2814 gimple_catch_types_ptr (gimple gs)
2815 {
2816   GIMPLE_CHECK (gs, GIMPLE_CATCH);
2817   return &gs->gimple_catch.types;
2818 }
2819
2820
2821 /* Return the GIMPLE sequence representing the body of the handler of
2822    GIMPLE_CATCH statement GS.  */
2823
2824 static inline gimple_seq
2825 gimple_catch_handler (gimple gs)
2826 {
2827   GIMPLE_CHECK (gs, GIMPLE_CATCH);
2828   return gs->gimple_catch.handler;
2829 }
2830
2831
2832 /* Return a pointer to the GIMPLE sequence representing the body of
2833    the handler of GIMPLE_CATCH statement GS.  */
2834
2835 static inline gimple_seq *
2836 gimple_catch_handler_ptr (gimple gs)
2837 {
2838   GIMPLE_CHECK (gs, GIMPLE_CATCH);
2839   return &gs->gimple_catch.handler;
2840 }
2841
2842
2843 /* Set T to be the set of types handled by GIMPLE_CATCH GS.  */
2844
2845 static inline void
2846 gimple_catch_set_types (gimple gs, tree t)
2847 {
2848   GIMPLE_CHECK (gs, GIMPLE_CATCH);
2849   gs->gimple_catch.types = t;
2850 }
2851
2852
2853 /* Set HANDLER to be the body of GIMPLE_CATCH GS.  */
2854
2855 static inline void
2856 gimple_catch_set_handler (gimple gs, gimple_seq handler)
2857 {
2858   GIMPLE_CHECK (gs, GIMPLE_CATCH);
2859   gs->gimple_catch.handler = handler;
2860 }
2861
2862
2863 /* Return the types handled by GIMPLE_EH_FILTER statement GS.  */
2864
2865 static inline tree
2866 gimple_eh_filter_types (const_gimple gs)
2867 {
2868   GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
2869   return gs->gimple_eh_filter.types;
2870 }
2871
2872
2873 /* Return a pointer to the types handled by GIMPLE_EH_FILTER statement
2874    GS.  */
2875
2876 static inline tree *
2877 gimple_eh_filter_types_ptr (gimple gs)
2878 {
2879   GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
2880   return &gs->gimple_eh_filter.types;
2881 }
2882
2883
2884 /* Return the sequence of statement to execute when GIMPLE_EH_FILTER
2885    statement fails.  */
2886
2887 static inline gimple_seq
2888 gimple_eh_filter_failure (gimple gs)
2889 {
2890   GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
2891   return gs->gimple_eh_filter.failure;
2892 }
2893
2894
2895 /* Set TYPES to be the set of types handled by GIMPLE_EH_FILTER GS.  */
2896
2897 static inline void
2898 gimple_eh_filter_set_types (gimple gs, tree types)
2899 {
2900   GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
2901   gs->gimple_eh_filter.types = types;
2902 }
2903
2904
2905 /* Set FAILURE to be the sequence of statements to execute on failure
2906    for GIMPLE_EH_FILTER GS.  */
2907
2908 static inline void
2909 gimple_eh_filter_set_failure (gimple gs, gimple_seq failure)
2910 {
2911   GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
2912   gs->gimple_eh_filter.failure = failure;
2913 }
2914
2915 /* Get the function decl to be called by the MUST_NOT_THROW region.  */
2916
2917 static inline tree
2918 gimple_eh_must_not_throw_fndecl (gimple gs)
2919 {
2920   GIMPLE_CHECK (gs, GIMPLE_EH_MUST_NOT_THROW);
2921   return gs->gimple_eh_mnt.fndecl;
2922 }
2923
2924 /* Set the function decl to be called by GS to DECL.  */
2925
2926 static inline void
2927 gimple_eh_must_not_throw_set_fndecl (gimple gs, tree decl)
2928 {
2929   GIMPLE_CHECK (gs, GIMPLE_EH_MUST_NOT_THROW);
2930   gs->gimple_eh_mnt.fndecl = decl;
2931 }
2932
2933
2934 /* GIMPLE_TRY accessors. */
2935
2936 /* Return the kind of try block represented by GIMPLE_TRY GS.  This is
2937    either GIMPLE_TRY_CATCH or GIMPLE_TRY_FINALLY.  */
2938
2939 static inline enum gimple_try_flags
2940 gimple_try_kind (const_gimple gs)
2941 {
2942   GIMPLE_CHECK (gs, GIMPLE_TRY);
2943   return (enum gimple_try_flags) (gs->gsbase.subcode & GIMPLE_TRY_KIND);
2944 }
2945
2946
2947 /* Set the kind of try block represented by GIMPLE_TRY GS.  */
2948
2949 static inline void
2950 gimple_try_set_kind (gimple gs, enum gimple_try_flags kind)
2951 {
2952   GIMPLE_CHECK (gs, GIMPLE_TRY);
2953   gcc_assert (kind == GIMPLE_TRY_CATCH || kind == GIMPLE_TRY_FINALLY);
2954   if (gimple_try_kind (gs) != kind)
2955     gs->gsbase.subcode = (unsigned int) kind;
2956 }
2957
2958
2959 /* Return the GIMPLE_TRY_CATCH_IS_CLEANUP flag.  */
2960
2961 static inline bool
2962 gimple_try_catch_is_cleanup (const_gimple gs)
2963 {
2964   gcc_assert (gimple_try_kind (gs) == GIMPLE_TRY_CATCH);
2965   return (gs->gsbase.subcode & GIMPLE_TRY_CATCH_IS_CLEANUP) != 0;
2966 }
2967
2968
2969 /* Return the sequence of statements used as the body for GIMPLE_TRY GS.  */
2970
2971 static inline gimple_seq
2972 gimple_try_eval (gimple gs)
2973 {
2974   GIMPLE_CHECK (gs, GIMPLE_TRY);
2975   return gs->gimple_try.eval;
2976 }
2977
2978
2979 /* Return the sequence of statements used as the cleanup body for
2980    GIMPLE_TRY GS.  */
2981
2982 static inline gimple_seq
2983 gimple_try_cleanup (gimple gs)
2984 {
2985   GIMPLE_CHECK (gs, GIMPLE_TRY);
2986   return gs->gimple_try.cleanup;
2987 }
2988
2989
2990 /* Set the GIMPLE_TRY_CATCH_IS_CLEANUP flag.  */
2991
2992 static inline void
2993 gimple_try_set_catch_is_cleanup (gimple g, bool catch_is_cleanup)
2994 {
2995   gcc_assert (gimple_try_kind (g) == GIMPLE_TRY_CATCH);
2996   if (catch_is_cleanup)
2997     g->gsbase.subcode |= GIMPLE_TRY_CATCH_IS_CLEANUP;
2998   else
2999     g->gsbase.subcode &= ~GIMPLE_TRY_CATCH_IS_CLEANUP;
3000 }
3001
3002
3003 /* Set EVAL to be the sequence of statements to use as the body for
3004    GIMPLE_TRY GS.  */
3005
3006 static inline void
3007 gimple_try_set_eval (gimple gs, gimple_seq eval)
3008 {
3009   GIMPLE_CHECK (gs, GIMPLE_TRY);
3010   gs->gimple_try.eval = eval;
3011 }
3012
3013
3014 /* Set CLEANUP to be the sequence of statements to use as the cleanup
3015    body for GIMPLE_TRY GS.  */
3016
3017 static inline void
3018 gimple_try_set_cleanup (gimple gs, gimple_seq cleanup)
3019 {
3020   GIMPLE_CHECK (gs, GIMPLE_TRY);
3021   gs->gimple_try.cleanup = cleanup;
3022 }
3023
3024
3025 /* Return the cleanup sequence for cleanup statement GS.  */
3026
3027 static inline gimple_seq
3028 gimple_wce_cleanup (gimple gs)
3029 {
3030   GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
3031   return gs->gimple_wce.cleanup;
3032 }
3033
3034
3035 /* Set CLEANUP to be the cleanup sequence for GS.  */
3036
3037 static inline void
3038 gimple_wce_set_cleanup (gimple gs, gimple_seq cleanup)
3039 {
3040   GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
3041   gs->gimple_wce.cleanup = cleanup;
3042 }
3043
3044
3045 /* Return the CLEANUP_EH_ONLY flag for a WCE tuple.  */
3046
3047 static inline bool
3048 gimple_wce_cleanup_eh_only (const_gimple gs)
3049 {
3050   GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
3051   return gs->gsbase.subcode != 0;
3052 }
3053
3054
3055 /* Set the CLEANUP_EH_ONLY flag for a WCE tuple.  */
3056
3057 static inline void
3058 gimple_wce_set_cleanup_eh_only (gimple gs, bool eh_only_p)
3059 {
3060   GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
3061   gs->gsbase.subcode = (unsigned int) eh_only_p;
3062 }
3063
3064
3065 /* Return the maximum number of arguments supported by GIMPLE_PHI GS.  */
3066
3067 static inline unsigned
3068 gimple_phi_capacity (const_gimple gs)
3069 {
3070   GIMPLE_CHECK (gs, GIMPLE_PHI);
3071   return gs->gimple_phi.capacity;
3072 }
3073
3074
3075 /* Return the number of arguments in GIMPLE_PHI GS.  This must always
3076    be exactly the number of incoming edges for the basic block holding
3077    GS.  */
3078
3079 static inline unsigned
3080 gimple_phi_num_args (const_gimple gs)
3081 {
3082   GIMPLE_CHECK (gs, GIMPLE_PHI);
3083   return gs->gimple_phi.nargs;
3084 }
3085
3086
3087 /* Return the SSA name created by GIMPLE_PHI GS.  */
3088
3089 static inline tree
3090 gimple_phi_result (const_gimple gs)
3091 {
3092   GIMPLE_CHECK (gs, GIMPLE_PHI);
3093   return gs->gimple_phi.result;
3094 }
3095
3096 /* Return a pointer to the SSA name created by GIMPLE_PHI GS.  */
3097
3098 static inline tree *
3099 gimple_phi_result_ptr (gimple gs)
3100 {
3101   GIMPLE_CHECK (gs, GIMPLE_PHI);
3102   return &gs->gimple_phi.result;
3103 }
3104
3105 /* Set RESULT to be the SSA name created by GIMPLE_PHI GS.  */
3106
3107 static inline void
3108 gimple_phi_set_result (gimple gs, tree result)
3109 {
3110   GIMPLE_CHECK (gs, GIMPLE_PHI);
3111   gs->gimple_phi.result = result;
3112 }
3113
3114
3115 /* Return the PHI argument corresponding to incoming edge INDEX for
3116    GIMPLE_PHI GS.  */
3117
3118 static inline struct phi_arg_d *
3119 gimple_phi_arg (gimple gs, unsigned index)
3120 {
3121   GIMPLE_CHECK (gs, GIMPLE_PHI);
3122   gcc_assert (index <= gs->gimple_phi.capacity);
3123   return &(gs->gimple_phi.args[index]);
3124 }
3125
3126 /* Set PHIARG to be the argument corresponding to incoming edge INDEX
3127    for GIMPLE_PHI GS.  */
3128
3129 static inline void
3130 gimple_phi_set_arg (gimple gs, unsigned index, struct phi_arg_d * phiarg)
3131 {
3132   GIMPLE_CHECK (gs, GIMPLE_PHI);
3133   gcc_assert (index <= gs->gimple_phi.nargs);
3134   memcpy (gs->gimple_phi.args + index, phiarg, sizeof (struct phi_arg_d));
3135 }
3136
3137 /* Return the region number for GIMPLE_RESX GS.  */
3138
3139 static inline int
3140 gimple_resx_region (const_gimple gs)
3141 {
3142   GIMPLE_CHECK (gs, GIMPLE_RESX);
3143   return gs->gimple_eh_ctrl.region;
3144 }
3145
3146 /* Set REGION to be the region number for GIMPLE_RESX GS.  */
3147
3148 static inline void
3149 gimple_resx_set_region (gimple gs, int region)
3150 {
3151   GIMPLE_CHECK (gs, GIMPLE_RESX);
3152   gs->gimple_eh_ctrl.region = region;
3153 }
3154
3155 /* Return the region number for GIMPLE_EH_DISPATCH GS.  */
3156
3157 static inline int
3158 gimple_eh_dispatch_region (const_gimple gs)
3159 {
3160   GIMPLE_CHECK (gs, GIMPLE_EH_DISPATCH);
3161   return gs->gimple_eh_ctrl.region;
3162 }
3163
3164 /* Set REGION to be the region number for GIMPLE_EH_DISPATCH GS.  */
3165
3166 static inline void
3167 gimple_eh_dispatch_set_region (gimple gs, int region)
3168 {
3169   GIMPLE_CHECK (gs, GIMPLE_EH_DISPATCH);
3170   gs->gimple_eh_ctrl.region = region;
3171 }
3172
3173 /* Return the number of labels associated with the switch statement GS.  */
3174
3175 static inline unsigned
3176 gimple_switch_num_labels (const_gimple gs)
3177 {
3178   unsigned num_ops;
3179   GIMPLE_CHECK (gs, GIMPLE_SWITCH);
3180   num_ops = gimple_num_ops (gs);
3181   gcc_assert (num_ops > 1);
3182   return num_ops - 1;
3183 }
3184
3185
3186 /* Set NLABELS to be the number of labels for the switch statement GS.  */
3187
3188 static inline void
3189 gimple_switch_set_num_labels (gimple g, unsigned nlabels)
3190 {
3191   GIMPLE_CHECK (g, GIMPLE_SWITCH);
3192   gimple_set_num_ops (g, nlabels + 1);
3193 }
3194
3195
3196 /* Return the index variable used by the switch statement GS.  */
3197
3198 static inline tree
3199 gimple_switch_index (const_gimple gs)
3200 {
3201   GIMPLE_CHECK (gs, GIMPLE_SWITCH);
3202   return gimple_op (gs, 0);
3203 }
3204
3205
3206 /* Return a pointer to the index variable for the switch statement GS.  */
3207
3208 static inline tree *
3209 gimple_switch_index_ptr (const_gimple gs)
3210 {
3211   GIMPLE_CHECK (gs, GIMPLE_SWITCH);
3212   return gimple_op_ptr (gs, 0);
3213 }
3214
3215
3216 /* Set INDEX to be the index variable for switch statement GS.  */
3217
3218 static inline void
3219 gimple_switch_set_index (gimple gs, tree index)
3220 {
3221   GIMPLE_CHECK (gs, GIMPLE_SWITCH);
3222   gcc_assert (SSA_VAR_P (index) || CONSTANT_CLASS_P (index));
3223   gimple_set_op (gs, 0, index);
3224 }
3225
3226
3227 /* Return the label numbered INDEX.  The default label is 0, followed by any
3228    labels in a switch statement.  */
3229
3230 static inline tree
3231 gimple_switch_label (const_gimple gs, unsigned index)
3232 {
3233   GIMPLE_CHECK (gs, GIMPLE_SWITCH);
3234   gcc_assert (gimple_num_ops (gs) > index + 1);
3235   return gimple_op (gs, index + 1);
3236 }
3237
3238 /* Set the label number INDEX to LABEL.  0 is always the default label.  */
3239
3240 static inline void
3241 gimple_switch_set_label (gimple gs, unsigned index, tree label)
3242 {
3243   GIMPLE_CHECK (gs, GIMPLE_SWITCH);
3244   gcc_assert (gimple_num_ops (gs) > index + 1);
3245   gcc_assert (label == NULL_TREE || TREE_CODE (label) == CASE_LABEL_EXPR);
3246   gimple_set_op (gs, index + 1, label);
3247 }
3248
3249 /* Return the default label for a switch statement.  */
3250
3251 static inline tree
3252 gimple_switch_default_label (const_gimple gs)
3253 {
3254   return gimple_switch_label (gs, 0);
3255 }
3256
3257 /* Set the default label for a switch statement.  */
3258
3259 static inline void
3260 gimple_switch_set_default_label (gimple gs, tree label)
3261 {
3262   gimple_switch_set_label (gs, 0, label);
3263 }
3264
3265 /* Return true if GS is a GIMPLE_DEBUG statement.  */
3266
3267 static inline bool
3268 is_gimple_debug (const_gimple gs)
3269 {
3270   return gimple_code (gs) == GIMPLE_DEBUG;
3271 }
3272
3273 /* Return true if S is a GIMPLE_DEBUG BIND statement.  */
3274
3275 static inline bool
3276 gimple_debug_bind_p (const_gimple s)
3277 {
3278   if (is_gimple_debug (s))
3279     return s->gsbase.subcode == GIMPLE_DEBUG_BIND;
3280
3281   return false;
3282 }
3283
3284 /* Return the variable bound in a GIMPLE_DEBUG bind statement.  */
3285
3286 static inline tree
3287 gimple_debug_bind_get_var (gimple dbg)
3288 {
3289   GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
3290   gcc_assert (gimple_debug_bind_p (dbg));
3291   return gimple_op (dbg, 0);
3292 }
3293
3294 /* Return the value bound to the variable in a GIMPLE_DEBUG bind
3295    statement.  */
3296
3297 static inline tree
3298 gimple_debug_bind_get_value (gimple dbg)
3299 {
3300   GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
3301   gcc_assert (gimple_debug_bind_p (dbg));
3302   return gimple_op (dbg, 1);
3303 }
3304
3305 /* Return a pointer to the value bound to the variable in a
3306    GIMPLE_DEBUG bind statement.  */
3307
3308 static inline tree *
3309 gimple_debug_bind_get_value_ptr (gimple dbg)
3310 {
3311   GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
3312   gcc_assert (gimple_debug_bind_p (dbg));
3313   return gimple_op_ptr (dbg, 1);
3314 }
3315
3316 /* Set the variable bound in a GIMPLE_DEBUG bind statement.  */
3317
3318 static inline void
3319 gimple_debug_bind_set_var (gimple dbg, tree var)
3320 {
3321   GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
3322   gcc_assert (gimple_debug_bind_p (dbg));
3323   gimple_set_op (dbg, 0, var);
3324 }
3325
3326 /* Set the value bound to the variable in a GIMPLE_DEBUG bind
3327    statement.  */
3328
3329 static inline void
3330 gimple_debug_bind_set_value (gimple dbg, tree value)
3331 {
3332   GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
3333   gcc_assert (gimple_debug_bind_p (dbg));
3334   gimple_set_op (dbg, 1, value);
3335 }
3336
3337 /* The second operand of a GIMPLE_DEBUG_BIND, when the value was
3338    optimized away.  */
3339 #define GIMPLE_DEBUG_BIND_NOVALUE NULL_TREE /* error_mark_node */
3340
3341 /* Remove the value bound to the variable in a GIMPLE_DEBUG bind
3342    statement.  */
3343
3344 static inline void
3345 gimple_debug_bind_reset_value (gimple dbg)
3346 {
3347   GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
3348   gcc_assert (gimple_debug_bind_p (dbg));
3349   gimple_set_op (dbg, 1, GIMPLE_DEBUG_BIND_NOVALUE);
3350 }
3351
3352 /* Return true if the GIMPLE_DEBUG bind statement is bound to a
3353    value.  */
3354
3355 static inline bool
3356 gimple_debug_bind_has_value_p (gimple dbg)
3357 {
3358   GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
3359   gcc_assert (gimple_debug_bind_p (dbg));
3360   return gimple_op (dbg, 1) != GIMPLE_DEBUG_BIND_NOVALUE;
3361 }
3362
3363 #undef GIMPLE_DEBUG_BIND_NOVALUE
3364
3365 /* Return the body for the OMP statement GS.  */
3366
3367 static inline gimple_seq 
3368 gimple_omp_body (gimple gs)
3369 {
3370   return gs->omp.body;
3371 }
3372
3373 /* Set BODY to be the body for the OMP statement GS.  */
3374
3375 static inline void
3376 gimple_omp_set_body (gimple gs, gimple_seq body)
3377 {
3378   gs->omp.body = body;
3379 }
3380
3381
3382 /* Return the name associated with OMP_CRITICAL statement GS.  */
3383
3384 static inline tree
3385 gimple_omp_critical_name (const_gimple gs)
3386 {
3387   GIMPLE_CHECK (gs, GIMPLE_OMP_CRITICAL);
3388   return gs->gimple_omp_critical.name;
3389 }
3390
3391
3392 /* Return a pointer to the name associated with OMP critical statement GS.  */
3393
3394 static inline tree *
3395 gimple_omp_critical_name_ptr (gimple gs)
3396 {
3397   GIMPLE_CHECK (gs, GIMPLE_OMP_CRITICAL);
3398   return &gs->gimple_omp_critical.name;
3399 }
3400
3401
3402 /* Set NAME to be the name associated with OMP critical statement GS.  */
3403
3404 static inline void
3405 gimple_omp_critical_set_name (gimple gs, tree name)
3406 {
3407   GIMPLE_CHECK (gs, GIMPLE_OMP_CRITICAL);
3408   gs->gimple_omp_critical.name = name;
3409 }
3410
3411
3412 /* Return the clauses associated with OMP_FOR GS.  */
3413
3414 static inline tree
3415 gimple_omp_for_clauses (const_gimple gs)
3416 {
3417   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
3418   return gs->gimple_omp_for.clauses;
3419 }
3420
3421
3422 /* Return a pointer to the OMP_FOR GS.  */
3423
3424 static inline tree *
3425 gimple_omp_for_clauses_ptr (gimple gs)
3426 {
3427   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
3428   return &gs->gimple_omp_for.clauses;
3429 }
3430
3431
3432 /* Set CLAUSES to be the list of clauses associated with OMP_FOR GS.  */
3433
3434 static inline void
3435 gimple_omp_for_set_clauses (gimple gs, tree clauses)
3436 {
3437   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
3438   gs->gimple_omp_for.clauses = clauses;
3439 }
3440
3441
3442 /* Get the collapse count of OMP_FOR GS.  */
3443
3444 static inline size_t
3445 gimple_omp_for_collapse (gimple gs)
3446 {
3447   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
3448   return gs->gimple_omp_for.collapse;
3449 }
3450
3451
3452 /* Return the index variable for OMP_FOR GS.  */
3453
3454 static inline tree
3455 gimple_omp_for_index (const_gimple gs, size_t i)
3456 {
3457   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
3458   gcc_assert (i < gs->gimple_omp_for.collapse);
3459   return gs->gimple_omp_for.iter[i].index;
3460 }
3461
3462
3463 /* Return a pointer to the index variable for OMP_FOR GS.  */
3464
3465 static inline tree *
3466 gimple_omp_for_index_ptr (gimple gs, size_t i)
3467 {
3468   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
3469   gcc_assert (i < gs->gimple_omp_for.collapse);
3470   return &gs->gimple_omp_for.iter[i].index;
3471 }
3472
3473
3474 /* Set INDEX to be the index variable for OMP_FOR GS.  */
3475
3476 static inline void
3477 gimple_omp_for_set_index (gimple gs, size_t i, tree index)
3478 {
3479   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
3480   gcc_assert (i < gs->gimple_omp_for.collapse);
3481   gs->gimple_omp_for.iter[i].index = index;
3482 }
3483
3484
3485 /* Return the initial value for OMP_FOR GS.  */
3486
3487 static inline tree
3488 gimple_omp_for_initial (const_gimple gs, size_t i)
3489 {
3490   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
3491   gcc_assert (i < gs->gimple_omp_for.collapse);
3492   return gs->gimple_omp_for.iter[i].initial;
3493 }
3494
3495
3496 /* Return a pointer to the initial value for OMP_FOR GS.  */
3497
3498 static inline tree *
3499 gimple_omp_for_initial_ptr (gimple gs, size_t i)
3500 {
3501   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
3502   gcc_assert (i < gs->gimple_omp_for.collapse);
3503   return &gs->gimple_omp_for.iter[i].initial;
3504 }
3505
3506
3507 /* Set INITIAL to be the initial value for OMP_FOR GS.  */
3508
3509 static inline void
3510 gimple_omp_for_set_initial (gimple gs, size_t i, tree initial)
3511 {
3512   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
3513   gcc_assert (i < gs->gimple_omp_for.collapse);
3514   gs->gimple_omp_for.iter[i].initial = initial;
3515 }
3516
3517
3518 /* Return the final value for OMP_FOR GS.  */
3519
3520 static inline tree
3521 gimple_omp_for_final (const_gimple gs, size_t i)
3522 {
3523   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
3524   gcc_assert (i < gs->gimple_omp_for.collapse);
3525   return gs->gimple_omp_for.iter[i].final;
3526 }
3527
3528
3529 /* Return a pointer to the final value for OMP_FOR GS.  */
3530
3531 static inline tree *
3532 gimple_omp_for_final_ptr (gimple gs, size_t i)
3533 {
3534   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
3535   gcc_assert (i < gs->gimple_omp_for.collapse);
3536   return &gs->gimple_omp_for.iter[i].final;
3537 }
3538
3539
3540 /* Set FINAL to be the final value for OMP_FOR GS.  */
3541
3542 static inline void
3543 gimple_omp_for_set_final (gimple gs, size_t i, tree final)
3544 {
3545   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
3546   gcc_assert (i < gs->gimple_omp_for.collapse);
3547   gs->gimple_omp_for.iter[i].final = final;
3548 }
3549
3550
3551 /* Return the increment value for OMP_FOR GS.  */
3552
3553 static inline tree
3554 gimple_omp_for_incr (const_gimple gs, size_t i)
3555 {
3556   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
3557   gcc_assert (i < gs->gimple_omp_for.collapse);
3558   return gs->gimple_omp_for.iter[i].incr;
3559 }
3560
3561
3562 /* Return a pointer to the increment value for OMP_FOR GS.  */
3563
3564 static inline tree *
3565 gimple_omp_for_incr_ptr (gimple gs, size_t i)
3566 {
3567   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
3568   gcc_assert (i < gs->gimple_omp_for.collapse);
3569   return &gs->gimple_omp_for.iter[i].incr;
3570 }
3571
3572
3573 /* Set INCR to be the increment value for OMP_FOR GS.  */
3574
3575 static inline void
3576 gimple_omp_for_set_incr (gimple gs, size_t i, tree incr)
3577 {
3578   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
3579   gcc_assert (i < gs->gimple_omp_for.collapse);
3580   gs->gimple_omp_for.iter[i].incr = incr;
3581 }
3582
3583
3584 /* Return the sequence of statements to execute before the OMP_FOR
3585    statement GS starts.  */
3586
3587 static inline gimple_seq
3588 gimple_omp_for_pre_body (gimple gs)
3589 {
3590   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
3591   return gs->gimple_omp_for.pre_body;
3592 }
3593
3594
3595 /* Set PRE_BODY to be the sequence of statements to execute before the
3596    OMP_FOR statement GS starts.  */
3597
3598 static inline void
3599 gimple_omp_for_set_pre_body (gimple gs, gimple_seq pre_body)
3600 {
3601   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
3602   gs->gimple_omp_for.pre_body = pre_body;
3603 }
3604
3605
3606 /* Return the clauses associated with OMP_PARALLEL GS.  */
3607
3608 static inline tree
3609 gimple_omp_parallel_clauses (const_gimple gs)
3610 {
3611   GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
3612   return gs->gimple_omp_parallel.clauses;
3613 }
3614
3615
3616 /* Return a pointer to the clauses associated with OMP_PARALLEL GS.  */
3617
3618 static inline tree *
3619 gimple_omp_parallel_clauses_ptr (gimple gs)
3620 {
3621   GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
3622   return &gs->gimple_omp_parallel.clauses;
3623 }
3624
3625
3626 /* Set CLAUSES to be the list of clauses associated with OMP_PARALLEL
3627    GS.  */
3628
3629 static inline void
3630 gimple_omp_parallel_set_clauses (gimple gs, tree clauses)
3631 {
3632   GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
3633   gs->gimple_omp_parallel.clauses = clauses;
3634 }
3635
3636
3637 /* Return the child function used to hold the body of OMP_PARALLEL GS.  */
3638
3639 static inline tree
3640 gimple_omp_parallel_child_fn (const_gimple gs)
3641 {
3642   GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
3643   return gs->gimple_omp_parallel.child_fn;
3644 }
3645
3646 /* Return a pointer to the child function used to hold the body of
3647    OMP_PARALLEL GS.  */
3648
3649 static inline tree *
3650 gimple_omp_parallel_child_fn_ptr (gimple gs)
3651 {
3652   GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
3653   return &gs->gimple_omp_parallel.child_fn;
3654 }
3655
3656
3657 /* Set CHILD_FN to be the child function for OMP_PARALLEL GS.  */
3658
3659 static inline void
3660 gimple_omp_parallel_set_child_fn (gimple gs, tree child_fn)
3661 {
3662   GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
3663   gs->gimple_omp_parallel.child_fn = child_fn;
3664 }
3665
3666
3667 /* Return the artificial argument used to send variables and values
3668    from the parent to the children threads in OMP_PARALLEL GS.  */
3669
3670 static inline tree
3671 gimple_omp_parallel_data_arg (const_gimple gs)
3672 {
3673   GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
3674   return gs->gimple_omp_parallel.data_arg;
3675 }
3676
3677
3678 /* Return a pointer to the data argument for OMP_PARALLEL GS.  */
3679
3680 static inline tree *
3681 gimple_omp_parallel_data_arg_ptr (gimple gs)
3682 {
3683   GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
3684   return &gs->gimple_omp_parallel.data_arg;
3685 }
3686
3687
3688 /* Set DATA_ARG to be the data argument for OMP_PARALLEL GS.  */
3689
3690 static inline void
3691 gimple_omp_parallel_set_data_arg (gimple gs, tree data_arg)
3692 {
3693   GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
3694   gs->gimple_omp_parallel.data_arg = data_arg;
3695 }
3696
3697
3698 /* Return the clauses associated with OMP_TASK GS.  */
3699
3700 static inline tree
3701 gimple_omp_task_clauses (const_gimple gs)
3702 {
3703   GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3704   return gs->gimple_omp_parallel.clauses;
3705 }
3706
3707
3708 /* Return a pointer to the clauses associated with OMP_TASK GS.  */
3709
3710 static inline tree *
3711 gimple_omp_task_clauses_ptr (gimple gs)
3712 {
3713   GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3714   return &gs->gimple_omp_parallel.clauses;
3715 }
3716
3717
3718 /* Set CLAUSES to be the list of clauses associated with OMP_TASK
3719    GS.  */
3720
3721 static inline void
3722 gimple_omp_task_set_clauses (gimple gs, tree clauses)
3723 {
3724   GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3725   gs->gimple_omp_parallel.clauses = clauses;
3726 }
3727
3728
3729 /* Return the child function used to hold the body of OMP_TASK GS.  */
3730
3731 static inline tree
3732 gimple_omp_task_child_fn (const_gimple gs)
3733 {
3734   GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3735   return gs->gimple_omp_parallel.child_fn;
3736 }
3737
3738 /* Return a pointer to the child function used to hold the body of
3739    OMP_TASK GS.  */
3740
3741 static inline tree *
3742 gimple_omp_task_child_fn_ptr (gimple gs)
3743 {
3744   GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3745   return &gs->gimple_omp_parallel.child_fn;
3746 }
3747
3748
3749 /* Set CHILD_FN to be the child function for OMP_TASK GS.  */
3750
3751 static inline void
3752 gimple_omp_task_set_child_fn (gimple gs, tree child_fn)
3753 {
3754   GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3755   gs->gimple_omp_parallel.child_fn = child_fn;
3756 }
3757
3758
3759 /* Return the artificial argument used to send variables and values
3760    from the parent to the children threads in OMP_TASK GS.  */
3761
3762 static inline tree
3763 gimple_omp_task_data_arg (const_gimple gs)
3764 {
3765   GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3766   return gs->gimple_omp_parallel.data_arg;
3767 }
3768
3769
3770 /* Return a pointer to the data argument for OMP_TASK GS.  */
3771
3772 static inline tree *
3773 gimple_omp_task_data_arg_ptr (gimple gs)
3774 {
3775   GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3776   return &gs->gimple_omp_parallel.data_arg;
3777 }
3778
3779
3780 /* Set DATA_ARG to be the data argument for OMP_TASK GS.  */
3781
3782 static inline void
3783 gimple_omp_task_set_data_arg (gimple gs, tree data_arg)
3784 {
3785   GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3786   gs->gimple_omp_parallel.data_arg = data_arg;
3787 }
3788
3789
3790 /* Return the clauses associated with OMP_TASK GS.  */
3791
3792 static inline tree
3793 gimple_omp_taskreg_clauses (const_gimple gs)
3794 {
3795   if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
3796     GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3797   return gs->gimple_omp_parallel.clauses;
3798 }
3799
3800
3801 /* Return a pointer to the clauses associated with OMP_TASK GS.  */
3802
3803 static inline tree *
3804 gimple_omp_taskreg_clauses_ptr (gimple gs)
3805 {
3806   if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
3807     GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3808   return &gs->gimple_omp_parallel.clauses;
3809 }
3810
3811
3812 /* Set CLAUSES to be the list of clauses associated with OMP_TASK
3813    GS.  */
3814
3815 static inline void
3816 gimple_omp_taskreg_set_clauses (gimple gs, tree clauses)
3817 {
3818   if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
3819     GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3820   gs->gimple_omp_parallel.clauses = clauses;
3821 }
3822
3823
3824 /* Return the child function used to hold the body of OMP_TASK GS.  */
3825
3826 static inline tree
3827 gimple_omp_taskreg_child_fn (const_gimple gs)
3828 {
3829   if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
3830     GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3831   return gs->gimple_omp_parallel.child_fn;
3832 }
3833
3834 /* Return a pointer to the child function used to hold the body of
3835    OMP_TASK GS.  */
3836
3837 static inline tree *
3838 gimple_omp_taskreg_child_fn_ptr (gimple gs)
3839 {
3840   if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
3841     GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3842   return &gs->gimple_omp_parallel.child_fn;
3843 }
3844
3845
3846 /* Set CHILD_FN to be the child function for OMP_TASK GS.  */
3847
3848 static inline void
3849 gimple_omp_taskreg_set_child_fn (gimple gs, tree child_fn)
3850 {
3851   if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
3852     GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3853   gs->gimple_omp_parallel.child_fn = child_fn;
3854 }
3855
3856
3857 /* Return the artificial argument used to send variables and values
3858    from the parent to the children threads in OMP_TASK GS.  */
3859
3860 static inline tree
3861 gimple_omp_taskreg_data_arg (const_gimple gs)
3862 {
3863   if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
3864     GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3865   return gs->gimple_omp_parallel.data_arg;
3866 }
3867
3868
3869 /* Return a pointer to the data argument for OMP_TASK GS.  */
3870
3871 static inline tree *
3872 gimple_omp_taskreg_data_arg_ptr (gimple gs)
3873 {
3874   if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
3875     GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3876   return &gs->gimple_omp_parallel.data_arg;
3877 }
3878
3879
3880 /* Set DATA_ARG to be the data argument for OMP_TASK GS.  */
3881
3882 static inline void
3883 gimple_omp_taskreg_set_data_arg (gimple gs, tree data_arg)
3884 {
3885   if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
3886     GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3887   gs->gimple_omp_parallel.data_arg = data_arg;
3888 }
3889
3890
3891 /* Return the copy function used to hold the body of OMP_TASK GS.  */
3892
3893 static inline tree
3894 gimple_omp_task_copy_fn (const_gimple gs)
3895 {
3896   GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3897   return gs->gimple_omp_task.copy_fn;
3898 }
3899
3900 /* Return a pointer to the copy function used to hold the body of
3901    OMP_TASK GS.  */
3902
3903 static inline tree *
3904 gimple_omp_task_copy_fn_ptr (gimple gs)
3905 {
3906   GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3907   return &gs->gimple_omp_task.copy_fn;
3908 }
3909
3910
3911 /* Set CHILD_FN to be the copy function for OMP_TASK GS.  */
3912
3913 static inline void
3914 gimple_omp_task_set_copy_fn (gimple gs, tree copy_fn)
3915 {
3916   GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3917   gs->gimple_omp_task.copy_fn = copy_fn;
3918 }
3919
3920
3921 /* Return size of the data block in bytes in OMP_TASK GS.  */
3922
3923 static inline tree
3924 gimple_omp_task_arg_size (const_gimple gs)
3925 {
3926   GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3927   return gs->gimple_omp_task.arg_size;
3928 }
3929
3930
3931 /* Return a pointer to the data block size for OMP_TASK GS.  */
3932
3933 static inline tree *
3934 gimple_omp_task_arg_size_ptr (gimple gs)
3935 {
3936   GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3937   return &gs->gimple_omp_task.arg_size;
3938 }
3939
3940
3941 /* Set ARG_SIZE to be the data block size for OMP_TASK GS.  */
3942
3943 static inline void
3944 gimple_omp_task_set_arg_size (gimple gs, tree arg_size)
3945 {
3946   GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3947   gs->gimple_omp_task.arg_size = arg_size;
3948 }
3949
3950
3951 /* Return align of the data block in bytes in OMP_TASK GS.  */
3952
3953 static inline tree
3954 gimple_omp_task_arg_align (const_gimple gs)
3955 {
3956   GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3957   return gs->gimple_omp_task.arg_align;
3958 }
3959
3960
3961 /* Return a pointer to the data block align for OMP_TASK GS.  */
3962
3963 static inline tree *
3964 gimple_omp_task_arg_align_ptr (gimple gs)
3965 {
3966   GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3967   return &gs->gimple_omp_task.arg_align;
3968 }
3969
3970
3971 /* Set ARG_SIZE to be the data block align for OMP_TASK GS.  */
3972
3973 static inline void
3974 gimple_omp_task_set_arg_align (gimple gs, tree arg_align)
3975 {
3976   GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
3977   gs->gimple_omp_task.arg_align = arg_align;
3978 }
3979
3980
3981 /* Return the clauses associated with OMP_SINGLE GS.  */
3982
3983 static inline tree
3984 gimple_omp_single_clauses (const_gimple gs)
3985 {
3986   GIMPLE_CHECK (gs, GIMPLE_OMP_SINGLE);
3987   return gs->gimple_omp_single.clauses;
3988 }
3989
3990
3991 /* Return a pointer to the clauses associated with OMP_SINGLE GS.  */
3992
3993 static inline tree *
3994 gimple_omp_single_clauses_ptr (gimple gs)
3995 {
3996   GIMPLE_CHECK (gs, GIMPLE_OMP_SINGLE);
3997   return &gs->gimple_omp_single.clauses;
3998 }
3999
4000
4001 /* Set CLAUSES to be the clauses associated with OMP_SINGLE GS.  */
4002
4003 static inline void
4004 gimple_omp_single_set_clauses (gimple gs, tree clauses)
4005 {
4006   GIMPLE_CHECK (gs, GIMPLE_OMP_SINGLE);
4007   gs->gimple_omp_single.clauses = clauses;
4008 }
4009
4010
4011 /* Return the clauses associated with OMP_SECTIONS GS.  */
4012
4013 static inline tree
4014 gimple_omp_sections_clauses (const_gimple gs)
4015 {
4016   GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
4017   return gs->gimple_omp_sections.clauses;
4018 }
4019
4020
4021 /* Return a pointer to the clauses associated with OMP_SECTIONS GS.  */
4022
4023 static inline tree *
4024 gimple_omp_sections_clauses_ptr (gimple gs)
4025 {
4026   GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
4027   return &gs->gimple_omp_sections.clauses;
4028 }
4029
4030
4031 /* Set CLAUSES to be the set of clauses associated with OMP_SECTIONS
4032    GS.  */
4033
4034 static inline void
4035 gimple_omp_sections_set_clauses (gimple gs, tree clauses)
4036 {
4037   GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
4038   gs->gimple_omp_sections.clauses = clauses;
4039 }
4040
4041
4042 /* Return the control variable associated with the GIMPLE_OMP_SECTIONS
4043    in GS.  */
4044
4045 static inline tree
4046 gimple_omp_sections_control (const_gimple gs)
4047 {
4048   GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
4049   return gs->gimple_omp_sections.control;
4050 }
4051
4052
4053 /* Return a pointer to the clauses associated with the GIMPLE_OMP_SECTIONS
4054    GS.  */
4055
4056 static inline tree *
4057 gimple_omp_sections_control_ptr (gimple gs)
4058 {
4059   GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
4060   return &gs->gimple_omp_sections.control;
4061 }
4062
4063
4064 /* Set CONTROL to be the set of clauses associated with the
4065    GIMPLE_OMP_SECTIONS in GS.  */
4066
4067 static inline void
4068 gimple_omp_sections_set_control (gimple gs, tree control)
4069 {
4070   GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
4071   gs->gimple_omp_sections.control = control;
4072 }
4073
4074
4075 /* Set COND to be the condition code for OMP_FOR GS.  */
4076
4077 static inline void
4078 gimple_omp_for_set_cond (gimple gs, size_t i, enum tree_code cond)
4079 {
4080   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
4081   gcc_assert (TREE_CODE_CLASS (cond) == tcc_comparison);
4082   gcc_assert (i < gs->gimple_omp_for.collapse);
4083   gs->gimple_omp_for.iter[i].cond = cond;
4084 }
4085
4086
4087 /* Return the condition code associated with OMP_FOR GS.  */
4088
4089 static inline enum tree_code
4090 gimple_omp_for_cond (const_gimple gs, size_t i)
4091 {
4092   GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
4093   gcc_assert (i < gs->gimple_omp_for.collapse);
4094   return gs->gimple_omp_for.iter[i].cond;
4095 }
4096
4097
4098 /* Set the value being stored in an atomic store.  */
4099
4100 static inline void
4101 gimple_omp_atomic_store_set_val (gimple g, tree val)
4102 {
4103   GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
4104   g->gimple_omp_atomic_store.val = val;
4105 }
4106
4107
4108 /* Return the value being stored in an atomic store.  */
4109
4110 static inline tree
4111 gimple_omp_atomic_store_val (const_gimple g)
4112 {
4113   GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
4114   return g->gimple_omp_atomic_store.val;
4115 }
4116
4117
4118 /* Return a pointer to the value being stored in an atomic store.  */
4119
4120 static inline tree *
4121 gimple_omp_atomic_store_val_ptr (gimple g)
4122 {
4123   GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
4124   return &g->gimple_omp_atomic_store.val;
4125 }
4126
4127
4128 /* Set the LHS of an atomic load.  */
4129
4130 static inline void
4131 gimple_omp_atomic_load_set_lhs (gimple g, tree lhs)
4132 {
4133   GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
4134   g->gimple_omp_atomic_load.lhs = lhs;
4135 }
4136
4137
4138 /* Get the LHS of an atomic load.  */
4139
4140 static inline tree
4141 gimple_omp_atomic_load_lhs (const_gimple g)
4142 {
4143   GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
4144   return g->gimple_omp_atomic_load.lhs;
4145 }
4146
4147
4148 /* Return a pointer to the LHS of an atomic load.  */
4149
4150 static inline tree *
4151 gimple_omp_atomic_load_lhs_ptr (gimple g)
4152 {
4153   GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
4154   return &g->gimple_omp_atomic_load.lhs;
4155 }
4156
4157
4158 /* Set the RHS of an atomic load.  */
4159
4160 static inline void
4161 gimple_omp_atomic_load_set_rhs (gimple g, tree rhs)
4162 {
4163   GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
4164   g->gimple_omp_atomic_load.rhs = rhs;
4165 }
4166
4167
4168 /* Get the RHS of an atomic load.  */
4169
4170 static inline tree
4171 gimple_omp_atomic_load_rhs (const_gimple g)
4172 {
4173   GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
4174   return g->gimple_omp_atomic_load.rhs;
4175 }
4176
4177
4178 /* Return a pointer to the RHS of an atomic load.  */
4179
4180 static inline tree *
4181 gimple_omp_atomic_load_rhs_ptr (gimple g)
4182 {
4183   GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
4184   return &g->gimple_omp_atomic_load.rhs;
4185 }
4186
4187
4188 /* Get the definition of the control variable in a GIMPLE_OMP_CONTINUE.  */
4189
4190 static inline tree
4191 gimple_omp_continue_control_def (const_gimple g)
4192 {
4193   GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
4194   return g->gimple_omp_continue.control_def;
4195 }
4196
4197 /* The same as above, but return the address.  */
4198
4199 static inline tree *
4200 gimple_omp_continue_control_def_ptr (gimple g)
4201 {
4202   GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
4203   return &g->gimple_omp_continue.control_def;
4204 }
4205
4206 /* Set the definition of the control variable in a GIMPLE_OMP_CONTINUE.  */
4207
4208 static inline void
4209 gimple_omp_continue_set_control_def (gimple g, tree def)
4210 {
4211   GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
4212   g->gimple_omp_continue.control_def = def;
4213 }
4214
4215
4216 /* Get the use of the control variable in a GIMPLE_OMP_CONTINUE.  */
4217
4218 static inline tree
4219 gimple_omp_continue_control_use (const_gimple g)
4220 {
4221   GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
4222   return g->gimple_omp_continue.control_use;
4223 }
4224
4225
4226 /* The same as above, but return the address.  */
4227
4228 static inline tree *
4229 gimple_omp_continue_control_use_ptr (gimple g)
4230 {
4231   GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
4232   return &g->gimple_omp_continue.control_use;
4233 }
4234
4235
4236 /* Set the use of the control variable in a GIMPLE_OMP_CONTINUE.  */
4237
4238 static inline void
4239 gimple_omp_continue_set_control_use (gimple g, tree use)
4240 {
4241   GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
4242   g->gimple_omp_continue.control_use = use;
4243 }
4244
4245
4246 /* Return a pointer to the return value for GIMPLE_RETURN GS.  */
4247
4248 static inline tree *
4249 gimple_return_retval_ptr (const_gimple gs)
4250 {
4251   GIMPLE_CHECK (gs, GIMPLE_RETURN);
4252   gcc_assert (gimple_num_ops (gs) == 1);
4253   return gimple_op_ptr (gs, 0);
4254 }
4255
4256 /* Return the return value for GIMPLE_RETURN GS.  */
4257
4258 static inline tree
4259 gimple_return_retval (const_gimple gs)
4260 {
4261   GIMPLE_CHECK (gs, GIMPLE_RETURN);
4262   gcc_assert (gimple_num_ops (gs) == 1);
4263   return gimple_op (gs, 0);
4264 }
4265
4266
4267 /* Set RETVAL to be the return value for GIMPLE_RETURN GS.  */
4268
4269 static inline void
4270 gimple_return_set_retval (gimple gs, tree retval)
4271 {
4272   GIMPLE_CHECK (gs, GIMPLE_RETURN);
4273   gcc_assert (gimple_num_ops (gs) == 1);
4274   gcc_assert (retval == NULL_TREE
4275               || TREE_CODE (retval) == RESULT_DECL
4276               || is_gimple_val (retval));
4277   gimple_set_op (gs, 0, retval);
4278 }
4279
4280
4281 /* Returns true when the gimple statment STMT is any of the OpenMP types.  */
4282
4283 #define CASE_GIMPLE_OMP                         \
4284     case GIMPLE_OMP_PARALLEL:                   \
4285     case GIMPLE_OMP_TASK:                       \
4286     case GIMPLE_OMP_FOR:                        \
4287     case GIMPLE_OMP_SECTIONS:                   \
4288     case GIMPLE_OMP_SECTIONS_SWITCH:            \
4289     case GIMPLE_OMP_SINGLE:                     \
4290     case GIMPLE_OMP_SECTION:                    \
4291     case GIMPLE_OMP_MASTER:                     \
4292     case GIMPLE_OMP_ORDERED:                    \
4293     case GIMPLE_OMP_CRITICAL:                   \
4294     case GIMPLE_OMP_RETURN:                     \
4295     case GIMPLE_OMP_ATOMIC_LOAD:                \
4296     case GIMPLE_OMP_ATOMIC_STORE:               \
4297     case GIMPLE_OMP_CONTINUE
4298
4299 static inline bool
4300 is_gimple_omp (const_gimple stmt)
4301 {
4302   switch (gimple_code (stmt))
4303     {
4304     CASE_GIMPLE_OMP:
4305       return true;
4306     default:
4307       return false;
4308     }
4309 }
4310
4311
4312 /* Returns TRUE if statement G is a GIMPLE_NOP.  */
4313
4314 static inline bool
4315 gimple_nop_p (const_gimple g)
4316 {
4317   return gimple_code (g) == GIMPLE_NOP;
4318 }
4319
4320
4321 /* Return true if GS is a GIMPLE_RESX.  */
4322
4323 static inline bool
4324 is_gimple_resx (const_gimple gs)
4325 {
4326   return gimple_code (gs) == GIMPLE_RESX;
4327 }
4328
4329 /* Return the predictor of GIMPLE_PREDICT statement GS.  */
4330
4331 static inline enum br_predictor
4332 gimple_predict_predictor (gimple gs)
4333 {
4334   GIMPLE_CHECK (gs, GIMPLE_PREDICT);
4335   return (enum br_predictor) (gs->gsbase.subcode & ~GF_PREDICT_TAKEN);
4336 }
4337
4338
4339 /* Set the predictor of GIMPLE_PREDICT statement GS to PREDICT.  */
4340
4341 static inline void
4342 gimple_predict_set_predictor (gimple gs, enum br_predictor predictor)
4343 {
4344   GIMPLE_CHECK (gs, GIMPLE_PREDICT);
4345   gs->gsbase.subcode = (gs->gsbase.subcode & GF_PREDICT_TAKEN)
4346                        | (unsigned) predictor;
4347 }
4348
4349
4350 /* Return the outcome of GIMPLE_PREDICT statement GS.  */
4351
4352 static inline enum prediction
4353 gimple_predict_outcome (gimple gs)
4354 {
4355   GIMPLE_CHECK (gs, GIMPLE_PREDICT);
4356   return (gs->gsbase.subcode & GF_PREDICT_TAKEN) ? TAKEN : NOT_TAKEN;
4357 }
4358
4359
4360 /* Set the outcome of GIMPLE_PREDICT statement GS to OUTCOME.  */
4361
4362 static inline void
4363 gimple_predict_set_outcome (gimple gs, enum prediction outcome)
4364 {
4365   GIMPLE_CHECK (gs, GIMPLE_PREDICT);
4366   if (outcome == TAKEN)
4367     gs->gsbase.subcode |= GF_PREDICT_TAKEN;
4368   else
4369     gs->gsbase.subcode &= ~GF_PREDICT_TAKEN;
4370 }
4371
4372
4373 /* Return the type of the main expression computed by STMT.  Return
4374    void_type_node if the statement computes nothing.  */
4375
4376 static inline tree
4377 gimple_expr_type (const_gimple stmt)
4378 {
4379   enum gimple_code code = gimple_code (stmt);
4380
4381   if (code == GIMPLE_ASSIGN || code == GIMPLE_CALL)
4382     {
4383       tree type;
4384       /* In general we want to pass out a type that can be substituted
4385          for both the RHS and the LHS types if there is a possibly
4386          useless conversion involved.  That means returning the
4387          original RHS type as far as we can reconstruct it.  */
4388       if (code == GIMPLE_CALL)
4389         type = gimple_call_return_type (stmt);
4390       else
4391         switch (gimple_assign_rhs_code (stmt))
4392           {
4393           case POINTER_PLUS_EXPR:
4394             type = TREE_TYPE (gimple_assign_rhs1 (stmt));
4395             break;
4396
4397           default:
4398             /* As fallback use the type of the LHS.  */
4399             type = TREE_TYPE (gimple_get_lhs (stmt));
4400             break;
4401           }
4402       return type;
4403     }
4404   else if (code == GIMPLE_COND)
4405     return boolean_type_node;
4406   else
4407     return void_type_node;
4408 }
4409
4410
4411 /* Return a new iterator pointing to GIMPLE_SEQ's first statement.  */
4412
4413 static inline gimple_stmt_iterator
4414 gsi_start (gimple_seq seq)
4415 {
4416   gimple_stmt_iterator i;
4417
4418   i.ptr = gimple_seq_first (seq);
4419   i.seq = seq;
4420   i.bb = (i.ptr && i.ptr->stmt) ? gimple_bb (i.ptr->stmt) : NULL;
4421
4422   return i;
4423 }
4424
4425
4426 /* Return a new iterator pointing to the first statement in basic block BB.  */
4427
4428 static inline gimple_stmt_iterator
4429 gsi_start_bb (basic_block bb)
4430 {
4431   gimple_stmt_iterator i;
4432   gimple_seq seq;
4433   
4434   seq = bb_seq (bb);
4435   i.ptr = gimple_seq_first (seq);
4436   i.seq = seq;
4437   i.bb = bb;
4438
4439   return i;
4440 }
4441
4442
4443 /* Return a new iterator initially pointing to GIMPLE_SEQ's last statement.  */
4444
4445 static inline gimple_stmt_iterator
4446 gsi_last (gimple_seq seq)
4447 {
4448   gimple_stmt_iterator i;
4449
4450   i.ptr = gimple_seq_last (seq);
4451   i.seq = seq;
4452   i.bb = (i.ptr && i.ptr->stmt) ? gimple_bb (i.ptr->stmt) : NULL;
4453
4454   return i;
4455 }
4456
4457
4458 /* Return a new iterator pointing to the last statement in basic block BB.  */
4459
4460 static inline gimple_stmt_iterator
4461 gsi_last_bb (basic_block bb)
4462 {
4463   gimple_stmt_iterator i;
4464   gimple_seq seq;
4465
4466   seq = bb_seq (bb);
4467   i.ptr = gimple_seq_last (seq);
4468   i.seq = seq;
4469   i.bb = bb;
4470
4471   return i;
4472 }
4473
4474
4475 /* Return true if I is at the end of its sequence.  */
4476
4477 static inline bool
4478 gsi_end_p (gimple_stmt_iterator i)
4479 {
4480   return i.ptr == NULL;
4481 }
4482
4483
4484 /* Return true if I is one statement before the end of its sequence.  */
4485
4486 static inline bool
4487 gsi_one_before_end_p (gimple_stmt_iterator i)
4488 {
4489   return i.ptr != NULL && i.ptr->next == NULL;
4490 }
4491
4492
4493 /* Advance the iterator to the next gimple statement.  */
4494
4495 static inline void
4496 gsi_next (gimple_stmt_iterator *i)
4497 {
4498   i->ptr = i->ptr->next;
4499 }
4500
4501 /* Advance the iterator to the previous gimple statement.  */
4502
4503 static inline void
4504 gsi_prev (gimple_stmt_iterator *i)
4505 {
4506   i->ptr = i->ptr->prev;
4507 }
4508
4509 /* Return the current stmt.  */
4510
4511 static inline gimple
4512 gsi_stmt (gimple_stmt_iterator i)
4513 {
4514   return i.ptr->stmt;
4515 }
4516
4517 /* Return a block statement iterator that points to the first non-label
4518    statement in block BB.  */
4519
4520 static inline gimple_stmt_iterator
4521 gsi_after_labels (basic_block bb)
4522 {
4523   gimple_stmt_iterator gsi = gsi_start_bb (bb);
4524
4525   while (!gsi_end_p (gsi) && gimple_code (gsi_stmt (gsi)) == GIMPLE_LABEL)
4526     gsi_next (&gsi);
4527
4528   return gsi;
4529 }
4530
4531 /* Advance the iterator to the next non-debug gimple statement.  */
4532
4533 static inline void
4534 gsi_next_nondebug (gimple_stmt_iterator *i)
4535 {
4536   do
4537     {
4538       gsi_next (i);
4539     }
4540   while (!gsi_end_p (*i) && is_gimple_debug (gsi_stmt (*i)));
4541 }
4542
4543 /* Advance the iterator to the next non-debug gimple statement.  */
4544
4545 static inline void
4546 gsi_prev_nondebug (gimple_stmt_iterator *i)
4547 {
4548   do
4549     {
4550       gsi_prev (i);
4551     }
4552   while (!gsi_end_p (*i) && is_gimple_debug (gsi_stmt (*i)));
4553 }
4554
4555 /* Return a new iterator pointing to the first non-debug statement in
4556    basic block BB.  */
4557
4558 static inline gimple_stmt_iterator
4559 gsi_start_nondebug_bb (basic_block bb)
4560 {
4561   gimple_stmt_iterator i = gsi_start_bb (bb);
4562
4563   if (!gsi_end_p (i) && is_gimple_debug (gsi_stmt (i)))
4564     gsi_next_nondebug (&i);
4565
4566   return i;
4567 }
4568
4569 /* Return a new iterator pointing to the last non-debug statement in
4570    basic block BB.  */
4571
4572 static inline gimple_stmt_iterator
4573 gsi_last_nondebug_bb (basic_block bb)
4574 {
4575   gimple_stmt_iterator i = gsi_last_bb (bb);
4576
4577   if (!gsi_end_p (i) && is_gimple_debug (gsi_stmt (i)))
4578     gsi_prev_nondebug (&i);
4579
4580   return i;
4581 }
4582
4583 /* Return a pointer to the current stmt.
4584    
4585   NOTE: You may want to use gsi_replace on the iterator itself,
4586   as this performs additional bookkeeping that will not be done
4587   if you simply assign through a pointer returned by gsi_stmt_ptr.  */
4588
4589 static inline gimple *
4590 gsi_stmt_ptr (gimple_stmt_iterator *i)
4591 {
4592   return &i->ptr->stmt;
4593 }
4594
4595
4596 /* Return the basic block associated with this iterator.  */
4597
4598 static inline basic_block
4599 gsi_bb (gimple_stmt_iterator i)
4600 {
4601   return i.bb;
4602 }
4603
4604
4605 /* Return the sequence associated with this iterator.  */
4606
4607 static inline gimple_seq
4608 gsi_seq (gimple_stmt_iterator i)
4609 {
4610   return i.seq;
4611 }
4612
4613
4614 enum gsi_iterator_update
4615 {
4616   GSI_NEW_STMT,         /* Only valid when single statement is added, move
4617                            iterator to it.  */
4618   GSI_SAME_STMT,        /* Leave the iterator at the same statement.  */
4619   GSI_CONTINUE_LINKING  /* Move iterator to whatever position is suitable
4620                            for linking other statements in the same
4621                            direction.  */
4622 };
4623
4624 /* In gimple-iterator.c  */
4625 gimple_stmt_iterator gsi_start_phis (basic_block);
4626 gimple_seq gsi_split_seq_after (gimple_stmt_iterator);
4627 gimple_seq gsi_split_seq_before (gimple_stmt_iterator *);
4628 void gsi_replace (gimple_stmt_iterator *, gimple, bool);
4629 void gsi_insert_before (gimple_stmt_iterator *, gimple,
4630                         enum gsi_iterator_update);
4631 void gsi_insert_before_without_update (gimple_stmt_iterator *, gimple,
4632                                        enum gsi_iterator_update);
4633 void gsi_insert_seq_before (gimple_stmt_iterator *, gimple_seq,
4634                             enum gsi_iterator_update);
4635 void gsi_insert_seq_before_without_update (gimple_stmt_iterator *, gimple_seq,
4636                                            enum gsi_iterator_update);
4637 void gsi_insert_after (gimple_stmt_iterator *, gimple,
4638                        enum gsi_iterator_update);
4639 void gsi_insert_after_without_update (gimple_stmt_iterator *, gimple,
4640                                       enum gsi_iterator_update);
4641 void gsi_insert_seq_after (gimple_stmt_iterator *, gimple_seq,
4642                            enum gsi_iterator_update);
4643 void gsi_insert_seq_after_without_update (gimple_stmt_iterator *, gimple_seq,
4644                                           enum gsi_iterator_update);
4645 void gsi_remove (gimple_stmt_iterator *, bool);
4646 gimple_stmt_iterator gsi_for_stmt (gimple);
4647 void gsi_move_after (gimple_stmt_iterator *, gimple_stmt_iterator *);
4648 void gsi_move_before (gimple_stmt_iterator *, gimple_stmt_iterator *);
4649 void gsi_move_to_bb_end (gimple_stmt_iterator *, struct basic_block_def *);
4650 void gsi_insert_on_edge (edge, gimple);
4651 void gsi_insert_seq_on_edge (edge, gimple_seq);
4652 basic_block gsi_insert_on_edge_immediate (edge, gimple);
4653 basic_block gsi_insert_seq_on_edge_immediate (edge, gimple_seq);
4654 void gsi_commit_one_edge_insert (edge, basic_block *);
4655 void gsi_commit_edge_inserts (void);
4656 gimple gimple_call_copy_skip_args (gimple, bitmap);
4657
4658
4659 /* Convenience routines to walk all statements of a gimple function.
4660    Note that this is useful exclusively before the code is converted
4661    into SSA form.  Once the program is in SSA form, the standard
4662    operand interface should be used to analyze/modify statements.  */
4663 struct walk_stmt_info
4664 {
4665   /* Points to the current statement being walked.  */
4666   gimple_stmt_iterator gsi;
4667
4668   /* Additional data that the callback functions may want to carry
4669      through the recursion.  */
4670   void *info;
4671
4672   /* Pointer map used to mark visited tree nodes when calling
4673      walk_tree on each operand.  If set to NULL, duplicate tree nodes
4674      will be visited more than once.  */
4675   struct pointer_set_t *pset;
4676
4677   /* Indicates whether the operand being examined may be replaced
4678      with something that matches is_gimple_val (if true) or something
4679      slightly more complicated (if false).  "Something" technically
4680      means the common subset of is_gimple_lvalue and is_gimple_rhs,
4681      but we never try to form anything more complicated than that, so
4682      we don't bother checking.
4683
4684      Also note that CALLBACK should update this flag while walking the
4685      sub-expressions of a statement.  For instance, when walking the
4686      statement 'foo (&var)', the flag VAL_ONLY will initially be set
4687      to true, however, when walking &var, the operand of that
4688      ADDR_EXPR does not need to be a GIMPLE value.  */
4689   bool val_only;
4690
4691   /* True if we are currently walking the LHS of an assignment.  */
4692   bool is_lhs;
4693
4694   /* Optional.  Set to true by the callback functions if they made any
4695      changes.  */
4696   bool changed;
4697
4698   /* True if we're interested in location information.  */
4699   bool want_locations;
4700
4701   /* Operand returned by the callbacks.  This is set when calling
4702      walk_gimple_seq.  If the walk_stmt_fn or walk_tree_fn callback
4703      returns non-NULL, this field will contain the tree returned by
4704      the last callback.  */
4705   tree callback_result;
4706 };
4707
4708 /* Callback for walk_gimple_stmt.  Called for every statement found
4709    during traversal.  The first argument points to the statement to
4710    walk.  The second argument is a flag that the callback sets to
4711    'true' if it the callback handled all the operands and
4712    sub-statements of the statement (the default value of this flag is
4713    'false').  The third argument is an anonymous pointer to data
4714    to be used by the callback.  */
4715 typedef tree (*walk_stmt_fn) (gimple_stmt_iterator *, bool *,
4716                               struct walk_stmt_info *);
4717
4718 gimple walk_gimple_seq (gimple_seq, walk_stmt_fn, walk_tree_fn,
4719                         struct walk_stmt_info *);
4720 tree walk_gimple_stmt (gimple_stmt_iterator *, walk_stmt_fn, walk_tree_fn,
4721                        struct walk_stmt_info *);
4722 tree walk_gimple_op (gimple, walk_tree_fn, struct walk_stmt_info *);
4723
4724 #ifdef GATHER_STATISTICS
4725 /* Enum and arrays used for allocation stats.  Keep in sync with
4726    gimple.c:gimple_alloc_kind_names.  */
4727 enum gimple_alloc_kind
4728 {
4729   gimple_alloc_kind_assign,     /* Assignments.  */
4730   gimple_alloc_kind_phi,        /* PHI nodes.  */
4731   gimple_alloc_kind_cond,       /* Conditionals.  */
4732   gimple_alloc_kind_seq,        /* Sequences.  */
4733   gimple_alloc_kind_rest,       /* Everything else.  */
4734   gimple_alloc_kind_all
4735 };
4736
4737 extern int gimple_alloc_counts[];
4738 extern int gimple_alloc_sizes[];
4739
4740 /* Return the allocation kind for a given stmt CODE.  */
4741 static inline enum gimple_alloc_kind
4742 gimple_alloc_kind (enum gimple_code code)
4743 {
4744   switch (code)
4745     {
4746       case GIMPLE_ASSIGN:
4747         return gimple_alloc_kind_assign;
4748       case GIMPLE_PHI:
4749         return gimple_alloc_kind_phi;
4750       case GIMPLE_COND:
4751         return gimple_alloc_kind_cond;
4752       default:
4753         return gimple_alloc_kind_rest;
4754     }
4755 }
4756 #endif /* GATHER_STATISTICS */
4757
4758 extern void dump_gimple_statistics (void);
4759
4760 #endif  /* GCC_GIMPLE_H */