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