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