@@ -67,7 +67,7 @@ update_bb_for_stmts (gimple_seq_node first, gimple_seq_node last,
{
gimple_seq_node n;
- for (n = first; n; n = n->gsbase.next)
+ for (n = first; n; n = n->next)
{
gimple_set_bb (n, bb);
if (n == last)
@@ -85,7 +85,7 @@ update_call_edge_frequencies (gimple_seq_node first, basic_block bb)
int bb_freq = 0;
gimple_seq_node n;
- for (n = first; n ; n = n->gsbase.next)
+ for (n = first; n ; n = n->next)
if (is_gimple_call (n))
{
struct cgraph_edge *e;
@@ -123,7 +123,7 @@ gsi_insert_seq_nodes_before (gimple_stmt_iterator *i,
basic_block bb;
gimple_seq_node cur = i->ptr;
- gcc_assert (!cur || cur->gsbase.prev);
+ gcc_assert (!cur || cur->prev);
if ((bb = gsi_bb (*i)) != NULL)
update_bb_for_stmts (first, last, bb);
@@ -131,13 +131,13 @@ gsi_insert_seq_nodes_before (gimple_stmt_iterator *i,
/* Link SEQ before CUR in the sequence. */
if (cur)
{
- first->gsbase.prev = cur->gsbase.prev;
- if (first->gsbase.prev->gsbase.next)
- first->gsbase.prev->gsbase.next = first;
+ first->prev = cur->prev;
+ if (first->prev->next)
+ first->prev->next = first;
else
gimple_seq_set_first (i->seq, first);
- last->gsbase.next = cur;
- cur->gsbase.prev = last;
+ last->next = cur;
+ cur->prev = last;
}
else
{
@@ -148,11 +148,11 @@ gsi_insert_seq_nodes_before (gimple_stmt_iterator *i,
labels, so it returns an iterator after the end of the block, and
we need to insert before it; it might be cleaner to add a flag to the
iterator saying whether we are at the start or end of the list). */
- last->gsbase.next = NULL;
+ last->next = NULL;
if (itlast)
{
- first->gsbase.prev = itlast;
- itlast->gsbase.next = first;
+ first->prev = itlast;
+ itlast->next = first;
}
else
gimple_seq_set_first (i->seq, first);
@@ -241,7 +241,7 @@ gsi_insert_seq_nodes_after (gimple_stmt_iterator *i,
basic_block bb;
gimple_seq_node cur = i->ptr;
- gcc_assert (!cur || cur->gsbase.prev);
+ gcc_assert (!cur || cur->prev);
/* If the iterator is inside a basic block, we need to update the
basic block information for all the nodes between FIRST and LAST. */
@@ -251,20 +251,20 @@ gsi_insert_seq_nodes_after (gimple_stmt_iterator *i,
/* Link SEQ after CUR. */
if (cur)
{
- last->gsbase.next = cur->gsbase.next;
- if (last->gsbase.next)
+ last->next = cur->next;
+ if (last->next)
{
- last->gsbase.next->gsbase.prev = last;
+ last->next->prev = last;
}
else
gimple_seq_set_last (i->seq, last);
- first->gsbase.prev = cur;
- cur->gsbase.next = first;
+ first->prev = cur;
+ cur->next = first;
}
else
{
gcc_assert (!gimple_seq_last (*i->seq));
- last->gsbase.next = NULL;
+ last->next = NULL;
gimple_seq_set_first (i->seq, first);
gimple_seq_set_last (i->seq, last);
}
@@ -346,15 +346,15 @@ gsi_split_seq_after (gimple_stmt_iterator i)
cur = i.ptr;
/* How can we possibly split after the end, or before the beginning? */
- gcc_assert (cur && cur->gsbase.next);
- next = cur->gsbase.next;
+ gcc_assert (cur && cur->next);
+ next = cur->next;
pold_seq = i.seq;
gimple_seq_set_first (&new_seq, next);
gimple_seq_set_last (&new_seq, gimple_seq_last (*pold_seq));
gimple_seq_set_last (pold_seq, cur);
- cur->gsbase.next = NULL;
+ cur->next = NULL;
return new_seq;
}
@@ -370,17 +370,17 @@ gsi_set_stmt (gimple_stmt_iterator *gsi, gimple stmt)
gimple orig_stmt = gsi_stmt (*gsi);
gimple prev, next;
- stmt->gsbase.next = next = orig_stmt->gsbase.next;
- stmt->gsbase.prev = prev = orig_stmt->gsbase.prev;
+ stmt->next = next = orig_stmt->next;
+ stmt->prev = prev = orig_stmt->prev;
/* Note how we don't clear next/prev of orig_stmt. This is so that
copies of *GSI our callers might still hold (to orig_stmt)
can be advanced as if they too were replaced. */
- if (prev->gsbase.next)
- prev->gsbase.next = stmt;
+ if (prev->next)
+ prev->next = stmt;
else
gimple_seq_set_first (gsi->seq, stmt);
if (next)
- next->gsbase.prev = stmt;
+ next->prev = stmt;
else
gimple_seq_set_last (gsi->seq, stmt);
@@ -401,10 +401,10 @@ gsi_split_seq_before (gimple_stmt_iterator *i, gimple_seq *pnew_seq)
/* How can we possibly split after the end? */
gcc_assert (cur);
- prev = cur->gsbase.prev;
+ prev = cur->prev;
old_seq = *i->seq;
- if (!prev->gsbase.next)
+ if (!prev->next)
*i->seq = NULL;
i->seq = pnew_seq;
@@ -414,8 +414,8 @@ gsi_split_seq_before (gimple_stmt_iterator *i, gimple_seq *pnew_seq)
/* Cut OLD_SEQ before I. */
gimple_seq_set_last (&old_seq, prev);
- if (prev->gsbase.next)
- prev->gsbase.next = NULL;
+ if (prev->next)
+ prev->next = NULL;
}
@@ -575,20 +575,20 @@ gsi_remove (gimple_stmt_iterator *i, bool remove_permanently)
/* Update the iterator and re-wire the links in I->SEQ. */
cur = i->ptr;
- next = cur->gsbase.next;
- prev = cur->gsbase.prev;
+ next = cur->next;
+ prev = cur->prev;
/* See gsi_set_stmt for why we don't reset prev/next of STMT. */
if (next)
/* Cur is not last. */
- next->gsbase.prev = prev;
- else if (prev->gsbase.next)
+ next->prev = prev;
+ else if (prev->next)
/* Cur is last but not first. */
gimple_seq_set_last (i->seq, prev);
- if (prev->gsbase.next)
+ if (prev->next)
/* Cur is not first. */
- prev->gsbase.next = next;
+ prev->next = next;
else
/* Cur is first. */
*i->seq = next;
@@ -1061,7 +1061,7 @@ dump_gimple_eh_dispatch (pretty_printer *buffer, gimple gs, int spc, int flags)
static void
dump_gimple_debug (pretty_printer *buffer, gimple gs, int spc, int flags)
{
- switch (gs->gsbase.subcode)
+ switch (gs->subcode)
{
case GIMPLE_DEBUG_BIND:
if (flags & TDF_RAW)
@@ -108,11 +108,13 @@ static inline use_operand_p
gimple_vuse_op (const_gimple g)
{
struct use_optype_d *ops;
- if (!gimple_has_mem_ops (g))
+ const gimple_statement_with_memory_ops *mem_ops_stmt =
+ dyn_cast <const gimple_statement_with_memory_ops> (g);
+ if (!mem_ops_stmt)
return NULL_USE_OPERAND_P;
- ops = g->gsops.opbase.use_ops;
+ ops = mem_ops_stmt->use_ops;
if (ops
- && USE_OP_PTR (ops)->use == &g->gsmembase.vuse)
+ && USE_OP_PTR (ops)->use == &mem_ops_stmt->vuse)
return USE_OP_PTR (ops);
return NULL_USE_OPERAND_P;
}
@@ -122,10 +124,12 @@ gimple_vuse_op (const_gimple g)
static inline def_operand_p
gimple_vdef_op (gimple g)
{
- if (!gimple_has_mem_ops (g))
+ gimple_statement_with_memory_ops *mem_ops_stmt =
+ dyn_cast <gimple_statement_with_memory_ops> (g);
+ if (!mem_ops_stmt)
return NULL_DEF_OPERAND_P;
- if (g->gsmembase.vdef)
- return &g->gsmembase.vdef;
+ if (mem_ops_stmt->vdef)
+ return &mem_ops_stmt->vdef;
return NULL_DEF_OPERAND_P;
}
@@ -98,12 +98,12 @@ input_gimple_stmt (struct lto_input_block *ib, struct data_in *data_in,
bp = streamer_read_bitpack (ib);
num_ops = bp_unpack_var_len_unsigned (&bp);
stmt = gimple_alloc (code, num_ops);
- stmt->gsbase.no_warning = bp_unpack_value (&bp, 1);
+ stmt->no_warning = bp_unpack_value (&bp, 1);
if (is_gimple_assign (stmt))
- stmt->gsbase.nontemporal_move = bp_unpack_value (&bp, 1);
- stmt->gsbase.has_volatile_ops = bp_unpack_value (&bp, 1);
+ stmt->nontemporal_move = bp_unpack_value (&bp, 1);
+ stmt->has_volatile_ops = bp_unpack_value (&bp, 1);
has_hist = bp_unpack_value (&bp, 1);
- stmt->gsbase.subcode = bp_unpack_var_len_unsigned (&bp);
+ stmt->subcode = bp_unpack_var_len_unsigned (&bp);
/* Read location information. */
gimple_set_location (stmt, stream_input_location (&bp, data_in));
@@ -77,7 +77,7 @@ output_gimple_stmt (struct output_block *ob, gimple stmt)
bp_pack_value (&bp, gimple_has_volatile_ops (stmt), 1);
hist = gimple_histogram_value (cfun, stmt);
bp_pack_value (&bp, hist != NULL, 1);
- bp_pack_var_len_unsigned (&bp, stmt->gsbase.subcode);
+ bp_pack_var_len_unsigned (&bp, stmt->subcode);
/* Emit location information for the statement. */
stream_output_location (ob, &bp, LOCATION_LOCUS (gimple_location (stmt)));
@@ -94,7 +94,7 @@ extern void gimple_set_loaded_syms (gimple, bitmap, bitmap_obstack *);
static inline void
gimple_set_code (gimple g, enum gimple_code code)
{
- g->gsbase.code = code;
+ g->code = code;
}
/* Return the number of bytes needed to hold a GIMPLE statement with
@@ -132,7 +132,7 @@ gimple_alloc_stat (enum gimple_code code, unsigned num_ops MEM_STAT_DECL)
/* Do not call gimple_set_modified here as it has other side
effects and this tuple is still not completely built. */
- stmt->gsbase.modified = 1;
+ stmt->modified = 1;
gimple_init_singleton (stmt);
return stmt;
@@ -146,7 +146,7 @@ gimple_set_subcode (gimple g, unsigned subcode)
/* We only have 16 bits for the RHS code. Assert that we are not
overflowing it. */
gcc_assert (subcode < (1 << 16));
- g->gsbase.subcode = subcode;
+ g->subcode = subcode;
}
@@ -281,7 +281,7 @@ static inline gimple
gimple_build_call_internal_1 (enum internal_fn fn, unsigned nargs)
{
gimple s = gimple_build_with_ops (GIMPLE_CALL, ERROR_MARK, nargs + 3);
- s->gsbase.subcode |= GF_CALL_INTERNAL;
+ s->subcode |= GF_CALL_INTERNAL;
gimple_call_set_internal_fn (s, fn);
gimple_call_reset_alias_info (s);
return s;
@@ -1222,8 +1222,8 @@ gimple_check_failed (const_gimple gs, const char *file, int line,
gimple_code_name[code],
get_tree_code_name (subcode),
gimple_code_name[gimple_code (gs)],
- gs->gsbase.subcode > 0
- ? get_tree_code_name ((enum tree_code) gs->gsbase.subcode)
+ gs->subcode > 0
+ ? get_tree_code_name ((enum tree_code) gs->subcode)
: "",
function, trim_filename (file), line);
}
@@ -1975,7 +1975,7 @@ gimple_call_flags (const_gimple stmt)
else
flags = flags_from_decl_or_type (gimple_call_fntype (stmt));
- if (stmt->gsbase.subcode & GF_CALL_NOTHROW)
+ if (stmt->subcode & GF_CALL_NOTHROW)
flags |= ECF_NOTHROW;
return flags;
@@ -2116,7 +2116,7 @@ gimple_assign_unary_nop_p (gimple gs)
void
gimple_set_bb (gimple stmt, basic_block bb)
{
- stmt->gsbase.bb = bb;
+ stmt->bb = bb;
/* If the statement is a label, add the label to block-to-labels map
so that we can speed up edge creation for GIMPLE_GOTOs. */
@@ -719,6 +719,310 @@ enum gimple_statement_structure_enum {
};
#undef DEFGSSTRUCT
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_asm>::test (gimple gs)
+{
+ return gs->code == GIMPLE_ASM;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_bind>::test (gimple gs)
+{
+ return gs->code == GIMPLE_BIND;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_call>::test (gimple gs)
+{
+ return gs->code == GIMPLE_CALL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_catch>::test (gimple gs)
+{
+ return gs->code == GIMPLE_CATCH;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_eh_ctrl>::test (gimple gs)
+{
+ return gs->code == GIMPLE_RESX || gs->code == GIMPLE_EH_DISPATCH;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_eh_else>::test (gimple gs)
+{
+ return gs->code == GIMPLE_EH_ELSE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_eh_filter>::test (gimple gs)
+{
+ return gs->code == GIMPLE_EH_FILTER;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_eh_mnt>::test (gimple gs)
+{
+ return gs->code == GIMPLE_EH_MUST_NOT_THROW;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_atomic_load>::test (gimple gs)
+{
+ return gs->code == GIMPLE_OMP_ATOMIC_LOAD;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_atomic_store>::test (gimple gs)
+{
+ return gs->code == GIMPLE_OMP_ATOMIC_STORE || gs->code == GIMPLE_OMP_RETURN;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_continue>::test (gimple gs)
+{
+ return gs->code == GIMPLE_OMP_CONTINUE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_critical>::test (gimple gs)
+{
+ return gs->code == GIMPLE_OMP_CRITICAL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_for>::test (gimple gs)
+{
+ return gs->code == GIMPLE_OMP_FOR;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_parallel>::test (gimple gs)
+{
+ return gs->code == GIMPLE_OMP_PARALLEL || gs->code == GIMPLE_OMP_TASK || gs->code == GIMPLE_OMP_TARGET;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_sections>::test (gimple gs)
+{
+ return gs->code == GIMPLE_OMP_SECTIONS;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_single>::test (gimple gs)
+{
+ return gs->code == GIMPLE_OMP_SINGLE || gs->code == GIMPLE_OMP_TEAMS;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_task>::test (gimple gs)
+{
+ return gs->code == GIMPLE_OMP_TASK;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_phi>::test (gimple gs)
+{
+ return gs->code == GIMPLE_PHI;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_transaction>::test (gimple gs)
+{
+ return gs->code == GIMPLE_TRANSACTION;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_try>::test (gimple gs)
+{
+ return gs->code == GIMPLE_TRY;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_wce>::test (gimple gs)
+{
+ return gs->code == GIMPLE_WITH_CLEANUP_EXPR;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_asm>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_ASM;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_bind>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_BIND;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_call>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_CALL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_catch>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_CATCH;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_eh_ctrl>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_RESX || gs->code == GIMPLE_EH_DISPATCH;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_eh_filter>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_EH_FILTER;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_atomic_load>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_OMP_ATOMIC_LOAD;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_atomic_store>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_OMP_ATOMIC_STORE || gs->code == GIMPLE_OMP_RETURN;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_continue>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_OMP_CONTINUE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_critical>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_OMP_CRITICAL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_for>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_OMP_FOR;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_parallel>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_OMP_PARALLEL || gs->code == GIMPLE_OMP_TASK || gs->code == GIMPLE_OMP_TARGET;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_sections>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_OMP_SECTIONS;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_single>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_OMP_SINGLE || gs->code == GIMPLE_OMP_TEAMS;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_task>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_OMP_TASK;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_phi>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_PHI;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_transaction>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_TRANSACTION;
+}
+
/* Offset in bytes to the location of the operand vector.
Zero if there is no operand vector for this tuple structure. */
extern size_t const gimple_ops_offset_[];
@@ -1121,7 +1425,7 @@ gimple_seq_first_stmt (gimple_seq s)
static inline gimple_seq_node
gimple_seq_last (gimple_seq s)
{
- return s ? s->gsbase.prev : NULL;
+ return s ? s->prev : NULL;
}
@@ -1140,7 +1444,7 @@ gimple_seq_last_stmt (gimple_seq s)
static inline void
gimple_seq_set_last (gimple_seq *ps, gimple_seq_node last)
{
- (*ps)->gsbase.prev = last;
+ (*ps)->prev = last;
}
@@ -1210,7 +1514,7 @@ set_bb_seq (basic_block bb, gimple_seq seq)
static inline enum gimple_code
gimple_code (const_gimple g)
{
- return g->gsbase.code;
+ return g->code;
}
@@ -1273,7 +1577,7 @@ gimple_has_substatements (gimple g)
static inline basic_block
gimple_bb (const_gimple g)
{
- return g->gsbase.bb;
+ return g->bb;
}
@@ -1282,7 +1586,7 @@ gimple_bb (const_gimple g)
static inline tree
gimple_block (const_gimple g)
{
- return LOCATION_BLOCK (g->gsbase.location);
+ return LOCATION_BLOCK (g->location);
}
@@ -1292,10 +1596,10 @@ static inline void
gimple_set_block (gimple g, tree block)
{
if (block)
- g->gsbase.location =
- COMBINE_LOCATION_DATA (line_table, g->gsbase.location, block);
+ g->location =
+ COMBINE_LOCATION_DATA (line_table, g->location, block);
else
- g->gsbase.location = LOCATION_LOCUS (g->gsbase.location);
+ g->location = LOCATION_LOCUS (g->location);
}
@@ -1304,7 +1608,7 @@ gimple_set_block (gimple g, tree block)
static inline location_t
gimple_location (const_gimple g)
{
- return g->gsbase.location;
+ return g->location;
}
/* Return pointer to location information for statement G. */
@@ -1312,7 +1616,7 @@ gimple_location (const_gimple g)
static inline const location_t *
gimple_location_ptr (const_gimple g)
{
- return &g->gsbase.location;
+ return &g->location;
}
@@ -1321,7 +1625,7 @@ gimple_location_ptr (const_gimple g)
static inline void
gimple_set_location (gimple g, location_t location)
{
- g->gsbase.location = location;
+ g->location = location;
}
@@ -1366,7 +1670,7 @@ gimple_seq_singleton_p (gimple_seq seq)
static inline bool
gimple_no_warning_p (const_gimple stmt)
{
- return stmt->gsbase.no_warning;
+ return stmt->no_warning;
}
/* Set the no_warning flag of STMT to NO_WARNING. */
@@ -1374,7 +1678,7 @@ gimple_no_warning_p (const_gimple stmt)
static inline void
gimple_set_no_warning (gimple stmt, bool no_warning)
{
- stmt->gsbase.no_warning = (unsigned) no_warning;
+ stmt->no_warning = (unsigned) no_warning;
}
/* Set the visited status on statement STMT to VISITED_P. */
@@ -1382,7 +1686,7 @@ gimple_set_no_warning (gimple stmt, bool no_warning)
static inline void
gimple_set_visited (gimple stmt, bool visited_p)
{
- stmt->gsbase.visited = (unsigned) visited_p;
+ stmt->visited = (unsigned) visited_p;
}
@@ -1391,7 +1695,7 @@ gimple_set_visited (gimple stmt, bool visited_p)
static inline bool
gimple_visited_p (gimple stmt)
{
- return stmt->gsbase.visited;
+ return stmt->visited;
}
@@ -1401,9 +1705,9 @@ static inline void
gimple_set_plf (gimple stmt, enum plf_mask plf, bool val_p)
{
if (val_p)
- stmt->gsbase.plf |= (unsigned int) plf;
+ stmt->plf |= (unsigned int) plf;
else
- stmt->gsbase.plf &= ~((unsigned int) plf);
+ stmt->plf &= ~((unsigned int) plf);
}
@@ -1412,7 +1716,7 @@ gimple_set_plf (gimple stmt, enum plf_mask plf, bool val_p)
static inline unsigned int
gimple_plf (gimple stmt, enum plf_mask plf)
{
- return stmt->gsbase.plf & ((unsigned int) plf);
+ return stmt->plf & ((unsigned int) plf);
}
@@ -1421,7 +1725,7 @@ gimple_plf (gimple stmt, enum plf_mask plf)
static inline void
gimple_set_uid (gimple g, unsigned uid)
{
- g->gsbase.uid = uid;
+ g->uid = uid;
}
@@ -1430,7 +1734,7 @@ gimple_set_uid (gimple g, unsigned uid)
static inline unsigned
gimple_uid (const_gimple g)
{
- return g->gsbase.uid;
+ return g->uid;
}
@@ -1439,8 +1743,8 @@ gimple_uid (const_gimple g)
static inline void
gimple_init_singleton (gimple g)
{
- g->gsbase.next = NULL;
- g->gsbase.prev = g;
+ g->next = NULL;
+ g->prev = g;
}
@@ -1491,9 +1795,11 @@ gimple_set_use_ops (gimple g, struct use_optype_d *use)
static inline tree
gimple_vuse (const_gimple g)
{
- if (!gimple_has_mem_ops (g))
+ const gimple_statement_with_memory_ops *mem_ops_stmt =
+ dyn_cast <const gimple_statement_with_memory_ops> (g);
+ if (!mem_ops_stmt)
return NULL_TREE;
- return g->gsmembase.vuse;
+ return mem_ops_stmt->vuse;
}
/* Return the single VDEF operand of the statement G. */
@@ -1501,9 +1807,11 @@ gimple_vuse (const_gimple g)
static inline tree
gimple_vdef (const_gimple g)
{
- if (!gimple_has_mem_ops (g))
+ const gimple_statement_with_memory_ops *mem_ops_stmt =
+ dyn_cast <const gimple_statement_with_memory_ops> (g);
+ if (!mem_ops_stmt)
return NULL_TREE;
- return g->gsmembase.vdef;
+ return mem_ops_stmt->vdef;
}
/* Return the single VUSE operand of the statement G. */
@@ -1511,9 +1819,11 @@ gimple_vdef (const_gimple g)
static inline tree *
gimple_vuse_ptr (gimple g)
{
- if (!gimple_has_mem_ops (g))
+ gimple_statement_with_memory_ops *mem_ops_stmt =
+ dyn_cast <gimple_statement_with_memory_ops> (g);
+ if (!mem_ops_stmt)
return NULL;
- return &g->gsmembase.vuse;
+ return &mem_ops_stmt->vuse;
}
/* Return the single VDEF operand of the statement G. */
@@ -1521,9 +1831,11 @@ gimple_vuse_ptr (gimple g)
static inline tree *
gimple_vdef_ptr (gimple g)
{
- if (!gimple_has_mem_ops (g))
+ gimple_statement_with_memory_ops *mem_ops_stmt =
+ dyn_cast <gimple_statement_with_memory_ops> (g);
+ if (!mem_ops_stmt)
return NULL;
- return &g->gsmembase.vdef;
+ return &mem_ops_stmt->vdef;
}
/* Set the single VUSE operand of the statement G. */
@@ -1553,7 +1865,7 @@ gimple_set_vdef (gimple g, tree vdef)
static inline bool
gimple_modified_p (const_gimple g)
{
- return (gimple_has_ops (g)) ? (bool) g->gsbase.modified : false;
+ return (gimple_has_ops (g)) ? (bool) g->modified : false;
}
@@ -1564,7 +1876,7 @@ static inline void
gimple_set_modified (gimple s, bool modifiedp)
{
if (gimple_has_ops (s))
- s->gsbase.modified = (unsigned) modifiedp;
+ s->modified = (unsigned) modifiedp;
}
@@ -1579,7 +1891,7 @@ gimple_expr_code (const_gimple stmt)
{
enum gimple_code code = gimple_code (stmt);
if (code == GIMPLE_ASSIGN || code == GIMPLE_COND)
- return (enum tree_code) stmt->gsbase.subcode;
+ return (enum tree_code) stmt->subcode;
else
{
gcc_gimple_checking_assert (code == GIMPLE_CALL);
@@ -1594,7 +1906,7 @@ static inline bool
gimple_has_volatile_ops (const_gimple stmt)
{
if (gimple_has_mem_ops (stmt))
- return stmt->gsbase.has_volatile_ops;
+ return stmt->has_volatile_ops;
else
return false;
}
@@ -1606,7 +1918,7 @@ static inline void
gimple_set_has_volatile_ops (gimple stmt, bool volatilep)
{
if (gimple_has_mem_ops (stmt))
- stmt->gsbase.has_volatile_ops = (unsigned) volatilep;
+ stmt->has_volatile_ops = (unsigned) volatilep;
}
/* Return true if BB is in a transaction. */
@@ -1641,7 +1953,7 @@ gimple_omp_subcode (const_gimple s)
{
gcc_gimple_checking_assert (gimple_code (s) >= GIMPLE_OMP_ATOMIC_LOAD
&& gimple_code (s) <= GIMPLE_OMP_TEAMS);
- return s->gsbase.subcode;
+ return s->subcode;
}
/* Set the subcode for OMP statement S to SUBCODE. */
@@ -1652,7 +1964,7 @@ gimple_omp_set_subcode (gimple s, unsigned int subcode)
/* We only have 16 bits for the subcode. Assert that we are not
overflowing it. */
gcc_gimple_checking_assert (subcode < (1 << 16));
- s->gsbase.subcode = subcode;
+ s->subcode = subcode;
}
/* Set the nowait flag on OMP_RETURN statement S. */
@@ -1661,7 +1973,7 @@ static inline void
gimple_omp_return_set_nowait (gimple s)
{
GIMPLE_CHECK (s, GIMPLE_OMP_RETURN);
- s->gsbase.subcode |= GF_OMP_RETURN_NOWAIT;
+ s->subcode |= GF_OMP_RETURN_NOWAIT;
}
@@ -1681,8 +1993,9 @@ gimple_omp_return_nowait_p (const_gimple g)
static inline void
gimple_omp_return_set_lhs (gimple g, tree lhs)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_RETURN);
- g->gimple_omp_atomic_store.val = lhs;
+ gimple_statement_omp_atomic_store *omp_atomic_store_stmt =
+ as_a <gimple_statement_omp_atomic_store> (g);
+ omp_atomic_store_stmt->val = lhs;
}
@@ -1691,8 +2004,9 @@ gimple_omp_return_set_lhs (gimple g, tree lhs)
static inline tree
gimple_omp_return_lhs (const_gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_RETURN);
- return g->gimple_omp_atomic_store.val;
+ const gimple_statement_omp_atomic_store *omp_atomic_store_stmt =
+ as_a <const gimple_statement_omp_atomic_store> (g);
+ return omp_atomic_store_stmt->val;
}
@@ -1701,8 +2015,9 @@ gimple_omp_return_lhs (const_gimple g)
static inline tree *
gimple_omp_return_lhs_ptr (gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_RETURN);
- return &g->gimple_omp_atomic_store.val;
+ gimple_statement_omp_atomic_store *omp_atomic_store_stmt =
+ as_a <gimple_statement_omp_atomic_store> (g);
+ return &omp_atomic_store_stmt->val;
}
@@ -1723,7 +2038,7 @@ static inline void
gimple_omp_section_set_last (gimple g)
{
GIMPLE_CHECK (g, GIMPLE_OMP_SECTION);
- g->gsbase.subcode |= GF_OMP_SECTION_LAST;
+ g->subcode |= GF_OMP_SECTION_LAST;
}
@@ -1746,9 +2061,9 @@ gimple_omp_parallel_set_combined_p (gimple g, bool combined_p)
{
GIMPLE_CHECK (g, GIMPLE_OMP_PARALLEL);
if (combined_p)
- g->gsbase.subcode |= GF_OMP_PARALLEL_COMBINED;
+ g->subcode |= GF_OMP_PARALLEL_COMBINED;
else
- g->gsbase.subcode &= ~GF_OMP_PARALLEL_COMBINED;
+ g->subcode &= ~GF_OMP_PARALLEL_COMBINED;
}
@@ -1771,7 +2086,7 @@ gimple_omp_atomic_set_need_value (gimple g)
{
if (gimple_code (g) != GIMPLE_OMP_ATOMIC_LOAD)
GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
- g->gsbase.subcode |= GF_OMP_ATOMIC_NEED_VALUE;
+ g->subcode |= GF_OMP_ATOMIC_NEED_VALUE;
}
@@ -1794,7 +2109,7 @@ gimple_omp_atomic_set_seq_cst (gimple g)
{
if (gimple_code (g) != GIMPLE_OMP_ATOMIC_LOAD)
GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
- g->gsbase.subcode |= GF_OMP_ATOMIC_SEQ_CST;
+ g->subcode |= GF_OMP_ATOMIC_SEQ_CST;
}
@@ -1803,7 +2118,7 @@ gimple_omp_atomic_set_seq_cst (gimple g)
static inline unsigned
gimple_num_ops (const_gimple gs)
{
- return gs->gsbase.num_ops;
+ return gs->num_ops;
}
@@ -1812,7 +2127,7 @@ gimple_num_ops (const_gimple gs)
static inline void
gimple_set_num_ops (gimple gs, unsigned num_ops)
{
- gs->gsbase.num_ops = num_ops;
+ gs->num_ops = num_ops;
}
@@ -2055,7 +2370,7 @@ static inline bool
gimple_assign_nontemporal_move_p (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
- return gs->gsbase.nontemporal_move;
+ return gs->nontemporal_move;
}
/* Sets nontemporal move flag of GS to NONTEMPORAL. */
@@ -2064,7 +2379,7 @@ static inline void
gimple_assign_set_nontemporal_move (gimple gs, bool nontemporal)
{
GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
- gs->gsbase.nontemporal_move = nontemporal;
+ gs->nontemporal_move = nontemporal;
}
@@ -2078,7 +2393,7 @@ gimple_assign_rhs_code (const_gimple gs)
enum tree_code code;
GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
- code = (enum tree_code) gs->gsbase.subcode;
+ code = (enum tree_code) gs->subcode;
/* While we initially set subcode to the TREE_CODE of the rhs for
GIMPLE_SINGLE_RHS assigns we do not update that subcode to stay
in sync when we rewrite stmts into SSA form or do SSA propagations. */
@@ -2096,7 +2411,7 @@ static inline void
gimple_assign_set_rhs_code (gimple s, enum tree_code code)
{
GIMPLE_CHECK (s, GIMPLE_ASSIGN);
- s->gsbase.subcode = code;
+ s->subcode = code;
}
@@ -2221,7 +2536,7 @@ static inline bool
gimple_call_internal_p (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_CALL);
- return (gs->gsbase.subcode & GF_CALL_INTERNAL) != 0;
+ return (gs->subcode & GF_CALL_INTERNAL) != 0;
}
@@ -2240,10 +2555,11 @@ gimple_call_internal_fn (const_gimple gs)
static inline tree
gimple_call_fntype (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_CALL);
+ const gimple_statement_call *call_stmt =
+ as_a <const gimple_statement_call> (gs);
if (gimple_call_internal_p (gs))
return NULL_TREE;
- return gs->gimple_call.u.fntype;
+ return call_stmt->u.fntype;
}
/* Set the type of the function called by GS to FNTYPE. */
@@ -2251,9 +2567,9 @@ gimple_call_fntype (const_gimple gs)
static inline void
gimple_call_set_fntype (gimple gs, tree fntype)
{
- GIMPLE_CHECK (gs, GIMPLE_CALL);
+ gimple_statement_call *call_stmt = as_a <gimple_statement_call> (gs);
gcc_gimple_checking_assert (!gimple_call_internal_p (gs));
- gs->gimple_call.u.fntype = fntype;
+ call_stmt->u.fntype = fntype;
}
@@ -2305,9 +2621,9 @@ gimple_call_set_fndecl (gimple gs, tree decl)
static inline void
gimple_call_set_internal_fn (gimple gs, enum internal_fn fn)
{
- GIMPLE_CHECK (gs, GIMPLE_CALL);
+ gimple_statement_call *call_stmt = as_a <gimple_statement_call> (gs);
gcc_gimple_checking_assert (gimple_call_internal_p (gs));
- gs->gimple_call.u.internal_fn = fn;
+ call_stmt->u.internal_fn = fn;
}
@@ -2465,9 +2781,9 @@ gimple_call_set_tail (gimple s, bool tail_p)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
if (tail_p)
- s->gsbase.subcode |= GF_CALL_TAILCALL;
+ s->subcode |= GF_CALL_TAILCALL;
else
- s->gsbase.subcode &= ~GF_CALL_TAILCALL;
+ s->subcode &= ~GF_CALL_TAILCALL;
}
@@ -2477,7 +2793,7 @@ static inline bool
gimple_call_tail_p (gimple s)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
- return (s->gsbase.subcode & GF_CALL_TAILCALL) != 0;
+ return (s->subcode & GF_CALL_TAILCALL) != 0;
}
@@ -2490,9 +2806,9 @@ gimple_call_set_return_slot_opt (gimple s, bool return_slot_opt_p)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
if (return_slot_opt_p)
- s->gsbase.subcode |= GF_CALL_RETURN_SLOT_OPT;
+ s->subcode |= GF_CALL_RETURN_SLOT_OPT;
else
- s->gsbase.subcode &= ~GF_CALL_RETURN_SLOT_OPT;
+ s->subcode &= ~GF_CALL_RETURN_SLOT_OPT;
}
@@ -2502,7 +2818,7 @@ static inline bool
gimple_call_return_slot_opt_p (gimple s)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
- return (s->gsbase.subcode & GF_CALL_RETURN_SLOT_OPT) != 0;
+ return (s->subcode & GF_CALL_RETURN_SLOT_OPT) != 0;
}
@@ -2514,9 +2830,9 @@ gimple_call_set_from_thunk (gimple s, bool from_thunk_p)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
if (from_thunk_p)
- s->gsbase.subcode |= GF_CALL_FROM_THUNK;
+ s->subcode |= GF_CALL_FROM_THUNK;
else
- s->gsbase.subcode &= ~GF_CALL_FROM_THUNK;
+ s->subcode &= ~GF_CALL_FROM_THUNK;
}
@@ -2526,7 +2842,7 @@ static inline bool
gimple_call_from_thunk_p (gimple s)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
- return (s->gsbase.subcode & GF_CALL_FROM_THUNK) != 0;
+ return (s->subcode & GF_CALL_FROM_THUNK) != 0;
}
@@ -2538,9 +2854,9 @@ gimple_call_set_va_arg_pack (gimple s, bool pass_arg_pack_p)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
if (pass_arg_pack_p)
- s->gsbase.subcode |= GF_CALL_VA_ARG_PACK;
+ s->subcode |= GF_CALL_VA_ARG_PACK;
else
- s->gsbase.subcode &= ~GF_CALL_VA_ARG_PACK;
+ s->subcode &= ~GF_CALL_VA_ARG_PACK;
}
@@ -2551,7 +2867,7 @@ static inline bool
gimple_call_va_arg_pack_p (gimple s)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
- return (s->gsbase.subcode & GF_CALL_VA_ARG_PACK) != 0;
+ return (s->subcode & GF_CALL_VA_ARG_PACK) != 0;
}
@@ -2573,9 +2889,9 @@ gimple_call_set_nothrow (gimple s, bool nothrow_p)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
if (nothrow_p)
- s->gsbase.subcode |= GF_CALL_NOTHROW;
+ s->subcode |= GF_CALL_NOTHROW;
else
- s->gsbase.subcode &= ~GF_CALL_NOTHROW;
+ s->subcode &= ~GF_CALL_NOTHROW;
}
/* Return true if S is a nothrow call. */
@@ -2597,9 +2913,9 @@ gimple_call_set_alloca_for_var (gimple s, bool for_var)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
if (for_var)
- s->gsbase.subcode |= GF_CALL_ALLOCA_FOR_VAR;
+ s->subcode |= GF_CALL_ALLOCA_FOR_VAR;
else
- s->gsbase.subcode &= ~GF_CALL_ALLOCA_FOR_VAR;
+ s->subcode &= ~GF_CALL_ALLOCA_FOR_VAR;
}
/* Return true of S is a call to builtin_alloca emitted for VLA objects. */
@@ -2608,7 +2924,7 @@ static inline bool
gimple_call_alloca_for_var_p (gimple s)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
- return (s->gsbase.subcode & GF_CALL_ALLOCA_FOR_VAR) != 0;
+ return (s->subcode & GF_CALL_ALLOCA_FOR_VAR) != 0;
}
/* Copy all the GF_CALL_* flags from ORIG_CALL to DEST_CALL. */
@@ -2618,7 +2934,7 @@ gimple_call_copy_flags (gimple dest_call, gimple orig_call)
{
GIMPLE_CHECK (dest_call, GIMPLE_CALL);
GIMPLE_CHECK (orig_call, GIMPLE_CALL);
- dest_call->gsbase.subcode = orig_call->gsbase.subcode;
+ dest_call->subcode = orig_call->subcode;
}
@@ -2628,8 +2944,8 @@ gimple_call_copy_flags (gimple dest_call, gimple orig_call)
static inline struct pt_solution *
gimple_call_use_set (gimple call)
{
- GIMPLE_CHECK (call, GIMPLE_CALL);
- return &call->gimple_call.call_used;
+ gimple_statement_call *call_stmt = as_a <gimple_statement_call> (call);
+ return &call_stmt->call_used;
}
@@ -2639,8 +2955,8 @@ gimple_call_use_set (gimple call)
static inline struct pt_solution *
gimple_call_clobber_set (gimple call)
{
- GIMPLE_CHECK (call, GIMPLE_CALL);
- return &call->gimple_call.call_clobbered;
+ gimple_statement_call *call_stmt = as_a <gimple_statement_call> (call);
+ return &call_stmt->call_clobbered;
}
@@ -2662,7 +2978,7 @@ static inline enum tree_code
gimple_cond_code (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_COND);
- return (enum tree_code) gs->gsbase.subcode;
+ return (enum tree_code) gs->subcode;
}
@@ -2672,7 +2988,7 @@ static inline void
gimple_cond_set_code (gimple gs, enum tree_code code)
{
GIMPLE_CHECK (gs, GIMPLE_COND);
- gs->gsbase.subcode = code;
+ gs->subcode = code;
}
@@ -2788,7 +3104,7 @@ gimple_cond_make_false (gimple gs)
{
gimple_cond_set_lhs (gs, boolean_true_node);
gimple_cond_set_rhs (gs, boolean_false_node);
- gs->gsbase.subcode = EQ_EXPR;
+ gs->subcode = EQ_EXPR;
}
@@ -2799,7 +3115,7 @@ gimple_cond_make_true (gimple gs)
{
gimple_cond_set_lhs (gs, boolean_true_node);
gimple_cond_set_rhs (gs, boolean_true_node);
- gs->gsbase.subcode = EQ_EXPR;
+ gs->subcode = EQ_EXPR;
}
/* Check if conditional statemente GS is of the form 'if (1 == 1)',
@@ -2908,8 +3224,9 @@ gimple_goto_set_dest (gimple gs, tree dest)
static inline tree
gimple_bind_vars (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_BIND);
- return gs->gimple_bind.vars;
+ const gimple_statement_bind *bind_stmt =
+ as_a <const gimple_statement_bind> (gs);
+ return bind_stmt->vars;
}
@@ -2919,8 +3236,8 @@ gimple_bind_vars (const_gimple gs)
static inline void
gimple_bind_set_vars (gimple gs, tree vars)
{
- GIMPLE_CHECK (gs, GIMPLE_BIND);
- gs->gimple_bind.vars = vars;
+ gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
+ bind_stmt->vars = vars;
}
@@ -2930,16 +3247,16 @@ gimple_bind_set_vars (gimple gs, tree vars)
static inline void
gimple_bind_append_vars (gimple gs, tree vars)
{
- GIMPLE_CHECK (gs, GIMPLE_BIND);
- gs->gimple_bind.vars = chainon (gs->gimple_bind.vars, vars);
+ gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
+ bind_stmt->vars = chainon (bind_stmt->vars, vars);
}
static inline gimple_seq *
gimple_bind_body_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_BIND);
- return &gs->gimple_bind.body;
+ gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
+ return &bind_stmt->body;
}
/* Return the GIMPLE sequence contained in the GIMPLE_BIND statement GS. */
@@ -2957,8 +3274,8 @@ gimple_bind_body (gimple gs)
static inline void
gimple_bind_set_body (gimple gs, gimple_seq seq)
{
- GIMPLE_CHECK (gs, GIMPLE_BIND);
- gs->gimple_bind.body = seq;
+ gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
+ bind_stmt->body = seq;
}
@@ -2967,8 +3284,8 @@ gimple_bind_set_body (gimple gs, gimple_seq seq)
static inline void
gimple_bind_add_stmt (gimple gs, gimple stmt)
{
- GIMPLE_CHECK (gs, GIMPLE_BIND);
- gimple_seq_add_stmt (&gs->gimple_bind.body, stmt);
+ gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
+ gimple_seq_add_stmt (&bind_stmt->body, stmt);
}
@@ -2977,8 +3294,8 @@ gimple_bind_add_stmt (gimple gs, gimple stmt)
static inline void
gimple_bind_add_seq (gimple gs, gimple_seq seq)
{
- GIMPLE_CHECK (gs, GIMPLE_BIND);
- gimple_seq_add_seq (&gs->gimple_bind.body, seq);
+ gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
+ gimple_seq_add_seq (&bind_stmt->body, seq);
}
@@ -2988,8 +3305,9 @@ gimple_bind_add_seq (gimple gs, gimple_seq seq)
static inline tree
gimple_bind_block (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_BIND);
- return gs->gimple_bind.block;
+ const gimple_statement_bind *bind_stmt =
+ as_a <const gimple_statement_bind> (gs);
+ return bind_stmt->block;
}
@@ -2999,10 +3317,10 @@ gimple_bind_block (const_gimple gs)
static inline void
gimple_bind_set_block (gimple gs, tree block)
{
- GIMPLE_CHECK (gs, GIMPLE_BIND);
+ gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
gcc_gimple_checking_assert (block == NULL_TREE
|| TREE_CODE (block) == BLOCK);
- gs->gimple_bind.block = block;
+ bind_stmt->block = block;
}
@@ -3011,8 +3329,9 @@ gimple_bind_set_block (gimple gs, tree block)
static inline unsigned
gimple_asm_ninputs (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- return gs->gimple_asm.ni;
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ return asm_stmt->ni;
}
@@ -3021,8 +3340,9 @@ gimple_asm_ninputs (const_gimple gs)
static inline unsigned
gimple_asm_noutputs (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- return gs->gimple_asm.no;
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ return asm_stmt->no;
}
@@ -3031,8 +3351,9 @@ gimple_asm_noutputs (const_gimple gs)
static inline unsigned
gimple_asm_nclobbers (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- return gs->gimple_asm.nc;
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ return asm_stmt->nc;
}
/* Return the number of label operands for GIMPLE_ASM GS. */
@@ -3040,8 +3361,9 @@ gimple_asm_nclobbers (const_gimple gs)
static inline unsigned
gimple_asm_nlabels (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- return gs->gimple_asm.nl;
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ return asm_stmt->nl;
}
/* Return input operand INDEX of GIMPLE_ASM GS. */
@@ -3049,9 +3371,10 @@ gimple_asm_nlabels (const_gimple gs)
static inline tree
gimple_asm_input_op (const_gimple gs, unsigned index)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.ni);
- return gimple_op (gs, index + gs->gimple_asm.no);
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->ni);
+ return gimple_op (gs, index + asm_stmt->no);
}
/* Return a pointer to input operand INDEX of GIMPLE_ASM GS. */
@@ -3059,9 +3382,10 @@ gimple_asm_input_op (const_gimple gs, unsigned index)
static inline tree *
gimple_asm_input_op_ptr (const_gimple gs, unsigned index)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.ni);
- return gimple_op_ptr (gs, index + gs->gimple_asm.no);
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->ni);
+ return gimple_op_ptr (gs, index + asm_stmt->no);
}
@@ -3070,10 +3394,10 @@ gimple_asm_input_op_ptr (const_gimple gs, unsigned index)
static inline void
gimple_asm_set_input_op (gimple gs, unsigned index, tree in_op)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.ni
+ gimple_statement_asm *asm_stmt = as_a <gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->ni
&& TREE_CODE (in_op) == TREE_LIST);
- gimple_set_op (gs, index + gs->gimple_asm.no, in_op);
+ gimple_set_op (gs, index + asm_stmt->no, in_op);
}
@@ -3082,8 +3406,9 @@ gimple_asm_set_input_op (gimple gs, unsigned index, tree in_op)
static inline tree
gimple_asm_output_op (const_gimple gs, unsigned index)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.no);
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->no);
return gimple_op (gs, index);
}
@@ -3092,8 +3417,9 @@ gimple_asm_output_op (const_gimple gs, unsigned index)
static inline tree *
gimple_asm_output_op_ptr (const_gimple gs, unsigned index)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.no);
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->no);
return gimple_op_ptr (gs, index);
}
@@ -3103,8 +3429,8 @@ gimple_asm_output_op_ptr (const_gimple gs, unsigned index)
static inline void
gimple_asm_set_output_op (gimple gs, unsigned index, tree out_op)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.no
+ gimple_statement_asm *asm_stmt = as_a <gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->no
&& TREE_CODE (out_op) == TREE_LIST);
gimple_set_op (gs, index, out_op);
}
@@ -3115,9 +3441,10 @@ gimple_asm_set_output_op (gimple gs, unsigned index, tree out_op)
static inline tree
gimple_asm_clobber_op (const_gimple gs, unsigned index)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.nc);
- return gimple_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.no);
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->nc);
+ return gimple_op (gs, index + asm_stmt->ni + asm_stmt->no);
}
@@ -3126,10 +3453,10 @@ gimple_asm_clobber_op (const_gimple gs, unsigned index)
static inline void
gimple_asm_set_clobber_op (gimple gs, unsigned index, tree clobber_op)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.nc
+ gimple_statement_asm *asm_stmt = as_a <gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->nc
&& TREE_CODE (clobber_op) == TREE_LIST);
- gimple_set_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.no, clobber_op);
+ gimple_set_op (gs, index + asm_stmt->ni + asm_stmt->no, clobber_op);
}
/* Return label operand INDEX of GIMPLE_ASM GS. */
@@ -3137,9 +3464,10 @@ gimple_asm_set_clobber_op (gimple gs, unsigned index, tree clobber_op)
static inline tree
gimple_asm_label_op (const_gimple gs, unsigned index)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.nl);
- return gimple_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.nc);
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->nl);
+ return gimple_op (gs, index + asm_stmt->ni + asm_stmt->nc);
}
/* Set LABEL_OP to be label operand INDEX in GIMPLE_ASM GS. */
@@ -3147,10 +3475,10 @@ gimple_asm_label_op (const_gimple gs, unsigned index)
static inline void
gimple_asm_set_label_op (gimple gs, unsigned index, tree label_op)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.nl
+ gimple_statement_asm *asm_stmt = as_a <gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->nl
&& TREE_CODE (label_op) == TREE_LIST);
- gimple_set_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.nc, label_op);
+ gimple_set_op (gs, index + asm_stmt->ni + asm_stmt->nc, label_op);
}
/* Return the string representing the assembly instruction in
@@ -3159,8 +3487,9 @@ gimple_asm_set_label_op (gimple gs, unsigned index, tree label_op)
static inline const char *
gimple_asm_string (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- return gs->gimple_asm.string;
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ return asm_stmt->string;
}
@@ -3170,7 +3499,7 @@ static inline bool
gimple_asm_volatile_p (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_ASM);
- return (gs->gsbase.subcode & GF_ASM_VOLATILE) != 0;
+ return (gs->subcode & GF_ASM_VOLATILE) != 0;
}
@@ -3181,9 +3510,9 @@ gimple_asm_set_volatile (gimple gs, bool volatile_p)
{
GIMPLE_CHECK (gs, GIMPLE_ASM);
if (volatile_p)
- gs->gsbase.subcode |= GF_ASM_VOLATILE;
+ gs->subcode |= GF_ASM_VOLATILE;
else
- gs->gsbase.subcode &= ~GF_ASM_VOLATILE;
+ gs->subcode &= ~GF_ASM_VOLATILE;
}
@@ -3194,9 +3523,9 @@ gimple_asm_set_input (gimple gs, bool input_p)
{
GIMPLE_CHECK (gs, GIMPLE_ASM);
if (input_p)
- gs->gsbase.subcode |= GF_ASM_INPUT;
+ gs->subcode |= GF_ASM_INPUT;
else
- gs->gsbase.subcode &= ~GF_ASM_INPUT;
+ gs->subcode &= ~GF_ASM_INPUT;
}
@@ -3206,7 +3535,7 @@ static inline bool
gimple_asm_input_p (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_ASM);
- return (gs->gsbase.subcode & GF_ASM_INPUT) != 0;
+ return (gs->subcode & GF_ASM_INPUT) != 0;
}
@@ -3215,8 +3544,9 @@ gimple_asm_input_p (const_gimple gs)
static inline tree
gimple_catch_types (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_CATCH);
- return gs->gimple_catch.types;
+ const gimple_statement_catch *catch_stmt =
+ as_a <const gimple_statement_catch> (gs);
+ return catch_stmt->types;
}
@@ -3225,8 +3555,8 @@ gimple_catch_types (const_gimple gs)
static inline tree *
gimple_catch_types_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_CATCH);
- return &gs->gimple_catch.types;
+ gimple_statement_catch *catch_stmt = as_a <gimple_statement_catch> (gs);
+ return &catch_stmt->types;
}
@@ -3236,8 +3566,8 @@ gimple_catch_types_ptr (gimple gs)
static inline gimple_seq *
gimple_catch_handler_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_CATCH);
- return &gs->gimple_catch.handler;
+ gimple_statement_catch *catch_stmt = as_a <gimple_statement_catch> (gs);
+ return &catch_stmt->handler;
}
@@ -3256,8 +3586,8 @@ gimple_catch_handler (gimple gs)
static inline void
gimple_catch_set_types (gimple gs, tree t)
{
- GIMPLE_CHECK (gs, GIMPLE_CATCH);
- gs->gimple_catch.types = t;
+ gimple_statement_catch *catch_stmt = as_a <gimple_statement_catch> (gs);
+ catch_stmt->types = t;
}
@@ -3266,8 +3596,8 @@ gimple_catch_set_types (gimple gs, tree t)
static inline void
gimple_catch_set_handler (gimple gs, gimple_seq handler)
{
- GIMPLE_CHECK (gs, GIMPLE_CATCH);
- gs->gimple_catch.handler = handler;
+ gimple_statement_catch *catch_stmt = as_a <gimple_statement_catch> (gs);
+ catch_stmt->handler = handler;
}
@@ -3276,8 +3606,9 @@ gimple_catch_set_handler (gimple gs, gimple_seq handler)
static inline tree
gimple_eh_filter_types (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
- return gs->gimple_eh_filter.types;
+ const gimple_statement_eh_filter *eh_filter_stmt =
+ as_a <const gimple_statement_eh_filter> (gs);
+ return eh_filter_stmt->types;
}
@@ -3287,8 +3618,9 @@ gimple_eh_filter_types (const_gimple gs)
static inline tree *
gimple_eh_filter_types_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
- return &gs->gimple_eh_filter.types;
+ gimple_statement_eh_filter *eh_filter_stmt =
+ as_a <gimple_statement_eh_filter> (gs);
+ return &eh_filter_stmt->types;
}
@@ -3298,8 +3630,9 @@ gimple_eh_filter_types_ptr (gimple gs)
static inline gimple_seq *
gimple_eh_filter_failure_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
- return &gs->gimple_eh_filter.failure;
+ gimple_statement_eh_filter *eh_filter_stmt =
+ as_a <gimple_statement_eh_filter> (gs);
+ return &eh_filter_stmt->failure;
}
@@ -3318,8 +3651,9 @@ gimple_eh_filter_failure (gimple gs)
static inline void
gimple_eh_filter_set_types (gimple gs, tree types)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
- gs->gimple_eh_filter.types = types;
+ gimple_statement_eh_filter *eh_filter_stmt =
+ as_a <gimple_statement_eh_filter> (gs);
+ eh_filter_stmt->types = types;
}
@@ -3329,8 +3663,9 @@ gimple_eh_filter_set_types (gimple gs, tree types)
static inline void
gimple_eh_filter_set_failure (gimple gs, gimple_seq failure)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
- gs->gimple_eh_filter.failure = failure;
+ gimple_statement_eh_filter *eh_filter_stmt =
+ as_a <gimple_statement_eh_filter> (gs);
+ eh_filter_stmt->failure = failure;
}
/* Get the function decl to be called by the MUST_NOT_THROW region. */
@@ -3338,8 +3673,8 @@ gimple_eh_filter_set_failure (gimple gs, gimple_seq failure)
static inline tree
gimple_eh_must_not_throw_fndecl (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_MUST_NOT_THROW);
- return gs->gimple_eh_mnt.fndecl;
+ gimple_statement_eh_mnt *eh_mnt_stmt = as_a <gimple_statement_eh_mnt> (gs);
+ return eh_mnt_stmt->fndecl;
}
/* Set the function decl to be called by GS to DECL. */
@@ -3347,8 +3682,8 @@ gimple_eh_must_not_throw_fndecl (gimple gs)
static inline void
gimple_eh_must_not_throw_set_fndecl (gimple gs, tree decl)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_MUST_NOT_THROW);
- gs->gimple_eh_mnt.fndecl = decl;
+ gimple_statement_eh_mnt *eh_mnt_stmt = as_a <gimple_statement_eh_mnt> (gs);
+ eh_mnt_stmt->fndecl = decl;
}
/* GIMPLE_EH_ELSE accessors. */
@@ -3356,8 +3691,9 @@ gimple_eh_must_not_throw_set_fndecl (gimple gs, tree decl)
static inline gimple_seq *
gimple_eh_else_n_body_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_ELSE);
- return &gs->gimple_eh_else.n_body;
+ gimple_statement_eh_else *eh_else_stmt =
+ as_a <gimple_statement_eh_else> (gs);
+ return &eh_else_stmt->n_body;
}
static inline gimple_seq
@@ -3369,8 +3705,9 @@ gimple_eh_else_n_body (gimple gs)
static inline gimple_seq *
gimple_eh_else_e_body_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_ELSE);
- return &gs->gimple_eh_else.e_body;
+ gimple_statement_eh_else *eh_else_stmt =
+ as_a <gimple_statement_eh_else> (gs);
+ return &eh_else_stmt->e_body;
}
static inline gimple_seq
@@ -3382,15 +3719,17 @@ gimple_eh_else_e_body (gimple gs)
static inline void
gimple_eh_else_set_n_body (gimple gs, gimple_seq seq)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_ELSE);
- gs->gimple_eh_else.n_body = seq;
+ gimple_statement_eh_else *eh_else_stmt =
+ as_a <gimple_statement_eh_else> (gs);
+ eh_else_stmt->n_body = seq;
}
static inline void
gimple_eh_else_set_e_body (gimple gs, gimple_seq seq)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_ELSE);
- gs->gimple_eh_else.e_body = seq;
+ gimple_statement_eh_else *eh_else_stmt =
+ as_a <gimple_statement_eh_else> (gs);
+ eh_else_stmt->e_body = seq;
}
/* GIMPLE_TRY accessors. */
@@ -3402,7 +3741,7 @@ static inline enum gimple_try_flags
gimple_try_kind (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_TRY);
- return (enum gimple_try_flags) (gs->gsbase.subcode & GIMPLE_TRY_KIND);
+ return (enum gimple_try_flags) (gs->subcode & GIMPLE_TRY_KIND);
}
@@ -3415,7 +3754,7 @@ gimple_try_set_kind (gimple gs, enum gimple_try_flags kind)
gcc_gimple_checking_assert (kind == GIMPLE_TRY_CATCH
|| kind == GIMPLE_TRY_FINALLY);
if (gimple_try_kind (gs) != kind)
- gs->gsbase.subcode = (unsigned int) kind;
+ gs->subcode = (unsigned int) kind;
}
@@ -3425,7 +3764,7 @@ static inline bool
gimple_try_catch_is_cleanup (const_gimple gs)
{
gcc_gimple_checking_assert (gimple_try_kind (gs) == GIMPLE_TRY_CATCH);
- return (gs->gsbase.subcode & GIMPLE_TRY_CATCH_IS_CLEANUP) != 0;
+ return (gs->subcode & GIMPLE_TRY_CATCH_IS_CLEANUP) != 0;
}
@@ -3435,8 +3774,8 @@ gimple_try_catch_is_cleanup (const_gimple gs)
static inline gimple_seq *
gimple_try_eval_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_TRY);
- return &gs->gimple_try.eval;
+ gimple_statement_try *try_stmt = as_a <gimple_statement_try> (gs);
+ return &try_stmt->eval;
}
@@ -3455,8 +3794,8 @@ gimple_try_eval (gimple gs)
static inline gimple_seq *
gimple_try_cleanup_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_TRY);
- return &gs->gimple_try.cleanup;
+ gimple_statement_try *try_stmt = as_a <gimple_statement_try> (gs);
+ return &try_stmt->cleanup;
}
@@ -3477,9 +3816,9 @@ gimple_try_set_catch_is_cleanup (gimple g, bool catch_is_cleanup)
{
gcc_gimple_checking_assert (gimple_try_kind (g) == GIMPLE_TRY_CATCH);
if (catch_is_cleanup)
- g->gsbase.subcode |= GIMPLE_TRY_CATCH_IS_CLEANUP;
+ g->subcode |= GIMPLE_TRY_CATCH_IS_CLEANUP;
else
- g->gsbase.subcode &= ~GIMPLE_TRY_CATCH_IS_CLEANUP;
+ g->subcode &= ~GIMPLE_TRY_CATCH_IS_CLEANUP;
}
@@ -3489,8 +3828,8 @@ gimple_try_set_catch_is_cleanup (gimple g, bool catch_is_cleanup)
static inline void
gimple_try_set_eval (gimple gs, gimple_seq eval)
{
- GIMPLE_CHECK (gs, GIMPLE_TRY);
- gs->gimple_try.eval = eval;
+ gimple_statement_try *try_stmt = as_a <gimple_statement_try> (gs);
+ try_stmt->eval = eval;
}
@@ -3500,8 +3839,8 @@ gimple_try_set_eval (gimple gs, gimple_seq eval)
static inline void
gimple_try_set_cleanup (gimple gs, gimple_seq cleanup)
{
- GIMPLE_CHECK (gs, GIMPLE_TRY);
- gs->gimple_try.cleanup = cleanup;
+ gimple_statement_try *try_stmt = as_a <gimple_statement_try> (gs);
+ try_stmt->cleanup = cleanup;
}
@@ -3510,8 +3849,8 @@ gimple_try_set_cleanup (gimple gs, gimple_seq cleanup)
static inline gimple_seq *
gimple_wce_cleanup_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
- return &gs->gimple_wce.cleanup;
+ gimple_statement_wce *wce_stmt = as_a <gimple_statement_wce> (gs);
+ return &wce_stmt->cleanup;
}
@@ -3529,8 +3868,8 @@ gimple_wce_cleanup (gimple gs)
static inline void
gimple_wce_set_cleanup (gimple gs, gimple_seq cleanup)
{
- GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
- gs->gimple_wce.cleanup = cleanup;
+ gimple_statement_wce *wce_stmt = as_a <gimple_statement_wce> (gs);
+ wce_stmt->cleanup = cleanup;
}
@@ -3540,7 +3879,7 @@ static inline bool
gimple_wce_cleanup_eh_only (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
- return gs->gsbase.subcode != 0;
+ return gs->subcode != 0;
}
@@ -3550,7 +3889,7 @@ static inline void
gimple_wce_set_cleanup_eh_only (gimple gs, bool eh_only_p)
{
GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
- gs->gsbase.subcode = (unsigned int) eh_only_p;
+ gs->subcode = (unsigned int) eh_only_p;
}
@@ -3559,8 +3898,9 @@ gimple_wce_set_cleanup_eh_only (gimple gs, bool eh_only_p)
static inline unsigned
gimple_phi_capacity (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_PHI);
- return gs->gimple_phi.capacity;
+ const gimple_statement_phi *phi_stmt =
+ as_a <const gimple_statement_phi> (gs);
+ return phi_stmt->capacity;
}
@@ -3571,8 +3911,9 @@ gimple_phi_capacity (const_gimple gs)
static inline unsigned
gimple_phi_num_args (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_PHI);
- return gs->gimple_phi.nargs;
+ const gimple_statement_phi *phi_stmt =
+ as_a <const gimple_statement_phi> (gs);
+ return phi_stmt->nargs;
}
@@ -3581,8 +3922,9 @@ gimple_phi_num_args (const_gimple gs)
static inline tree
gimple_phi_result (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_PHI);
- return gs->gimple_phi.result;
+ const gimple_statement_phi *phi_stmt =
+ as_a <const gimple_statement_phi> (gs);
+ return phi_stmt->result;
}
/* Return a pointer to the SSA name created by GIMPLE_PHI GS. */
@@ -3590,8 +3932,8 @@ gimple_phi_result (const_gimple gs)
static inline tree *
gimple_phi_result_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_PHI);
- return &gs->gimple_phi.result;
+ gimple_statement_phi *phi_stmt = as_a <gimple_statement_phi> (gs);
+ return &phi_stmt->result;
}
/* Set RESULT to be the SSA name created by GIMPLE_PHI GS. */
@@ -3599,8 +3941,8 @@ gimple_phi_result_ptr (gimple gs)
static inline void
gimple_phi_set_result (gimple gs, tree result)
{
- GIMPLE_CHECK (gs, GIMPLE_PHI);
- gs->gimple_phi.result = result;
+ gimple_statement_phi *phi_stmt = as_a <gimple_statement_phi> (gs);
+ phi_stmt->result = result;
if (result && TREE_CODE (result) == SSA_NAME)
SSA_NAME_DEF_STMT (result) = gs;
}
@@ -3612,9 +3954,9 @@ gimple_phi_set_result (gimple gs, tree result)
static inline struct phi_arg_d *
gimple_phi_arg (gimple gs, unsigned index)
{
- GIMPLE_CHECK (gs, GIMPLE_PHI);
- gcc_gimple_checking_assert (index <= gs->gimple_phi.capacity);
- return &(gs->gimple_phi.args[index]);
+ gimple_statement_phi *phi_stmt = as_a <gimple_statement_phi> (gs);
+ gcc_gimple_checking_assert (index <= phi_stmt->capacity);
+ return &(phi_stmt->args[index]);
}
/* Set PHIARG to be the argument corresponding to incoming edge INDEX
@@ -3623,9 +3965,9 @@ gimple_phi_arg (gimple gs, unsigned index)
static inline void
gimple_phi_set_arg (gimple gs, unsigned index, struct phi_arg_d * phiarg)
{
- GIMPLE_CHECK (gs, GIMPLE_PHI);
- gcc_gimple_checking_assert (index <= gs->gimple_phi.nargs);
- gs->gimple_phi.args[index] = *phiarg;
+ gimple_statement_phi *phi_stmt = as_a <gimple_statement_phi> (gs);
+ gcc_gimple_checking_assert (index <= phi_stmt->nargs);
+ phi_stmt->args[index] = *phiarg;
}
/* PHI nodes should contain only ssa_names and invariants. A test
@@ -3723,8 +4065,9 @@ gimple_phi_arg_has_location (gimple gs, size_t i)
static inline int
gimple_resx_region (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_RESX);
- return gs->gimple_eh_ctrl.region;
+ const gimple_statement_eh_ctrl *eh_ctrl_stmt =
+ as_a <const gimple_statement_eh_ctrl> (gs);
+ return eh_ctrl_stmt->region;
}
/* Set REGION to be the region number for GIMPLE_RESX GS. */
@@ -3732,8 +4075,9 @@ gimple_resx_region (const_gimple gs)
static inline void
gimple_resx_set_region (gimple gs, int region)
{
- GIMPLE_CHECK (gs, GIMPLE_RESX);
- gs->gimple_eh_ctrl.region = region;
+ gimple_statement_eh_ctrl *eh_ctrl_stmt =
+ as_a <gimple_statement_eh_ctrl> (gs);
+ eh_ctrl_stmt->region = region;
}
/* Return the region number for GIMPLE_EH_DISPATCH GS. */
@@ -3741,8 +4085,9 @@ gimple_resx_set_region (gimple gs, int region)
static inline int
gimple_eh_dispatch_region (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_DISPATCH);
- return gs->gimple_eh_ctrl.region;
+ const gimple_statement_eh_ctrl *eh_ctrl_stmt =
+ as_a <const gimple_statement_eh_ctrl> (gs);
+ return eh_ctrl_stmt->region;
}
/* Set REGION to be the region number for GIMPLE_EH_DISPATCH GS. */
@@ -3750,8 +4095,9 @@ gimple_eh_dispatch_region (const_gimple gs)
static inline void
gimple_eh_dispatch_set_region (gimple gs, int region)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_DISPATCH);
- gs->gimple_eh_ctrl.region = region;
+ gimple_statement_eh_ctrl *eh_ctrl_stmt =
+ as_a <gimple_statement_eh_ctrl> (gs);
+ eh_ctrl_stmt->region = region;
}
/* Return the number of labels associated with the switch statement GS. */
@@ -3864,7 +4210,7 @@ static inline bool
gimple_debug_bind_p (const_gimple s)
{
if (is_gimple_debug (s))
- return s->gsbase.subcode == GIMPLE_DEBUG_BIND;
+ return s->subcode == GIMPLE_DEBUG_BIND;
return false;
}
@@ -3956,7 +4302,7 @@ static inline bool
gimple_debug_source_bind_p (const_gimple s)
{
if (is_gimple_debug (s))
- return s->gsbase.subcode == GIMPLE_DEBUG_SOURCE_BIND;
+ return s->subcode == GIMPLE_DEBUG_SOURCE_BIND;
return false;
}
@@ -4061,8 +4407,9 @@ gimple_omp_set_body (gimple gs, gimple_seq body)
static inline tree
gimple_omp_critical_name (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_CRITICAL);
- return gs->gimple_omp_critical.name;
+ const gimple_statement_omp_critical *omp_critical_stmt =
+ as_a <const gimple_statement_omp_critical> (gs);
+ return omp_critical_stmt->name;
}
@@ -4071,8 +4418,9 @@ gimple_omp_critical_name (const_gimple gs)
static inline tree *
gimple_omp_critical_name_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_CRITICAL);
- return &gs->gimple_omp_critical.name;
+ gimple_statement_omp_critical *omp_critical_stmt =
+ as_a <gimple_statement_omp_critical> (gs);
+ return &omp_critical_stmt->name;
}
@@ -4081,8 +4429,9 @@ gimple_omp_critical_name_ptr (gimple gs)
static inline void
gimple_omp_critical_set_name (gimple gs, tree name)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_CRITICAL);
- gs->gimple_omp_critical.name = name;
+ gimple_statement_omp_critical *omp_critical_stmt =
+ as_a <gimple_statement_omp_critical> (gs);
+ omp_critical_stmt->name = name;
}
@@ -4102,7 +4451,7 @@ static inline void
gimple_omp_for_set_kind (gimple g, int kind)
{
GIMPLE_CHECK (g, GIMPLE_OMP_FOR);
- g->gsbase.subcode = (g->gsbase.subcode & ~GF_OMP_FOR_KIND_MASK)
+ g->subcode = (g->subcode & ~GF_OMP_FOR_KIND_MASK)
| (kind & GF_OMP_FOR_KIND_MASK);
}
@@ -4126,9 +4475,9 @@ gimple_omp_for_set_combined_p (gimple g, bool combined_p)
{
GIMPLE_CHECK (g, GIMPLE_OMP_FOR);
if (combined_p)
- g->gsbase.subcode |= GF_OMP_FOR_COMBINED;
+ g->subcode |= GF_OMP_FOR_COMBINED;
else
- g->gsbase.subcode &= ~GF_OMP_FOR_COMBINED;
+ g->subcode &= ~GF_OMP_FOR_COMBINED;
}
@@ -4151,9 +4500,9 @@ gimple_omp_for_set_combined_into_p (gimple g, bool combined_p)
{
GIMPLE_CHECK (g, GIMPLE_OMP_FOR);
if (combined_p)
- g->gsbase.subcode |= GF_OMP_FOR_COMBINED_INTO;
+ g->subcode |= GF_OMP_FOR_COMBINED_INTO;
else
- g->gsbase.subcode &= ~GF_OMP_FOR_COMBINED_INTO;
+ g->subcode &= ~GF_OMP_FOR_COMBINED_INTO;
}
@@ -4162,8 +4511,9 @@ gimple_omp_for_set_combined_into_p (gimple g, bool combined_p)
static inline tree
gimple_omp_for_clauses (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- return gs->gimple_omp_for.clauses;
+ const gimple_statement_omp_for *omp_for_stmt =
+ as_a <const gimple_statement_omp_for> (gs);
+ return omp_for_stmt->clauses;
}
@@ -4172,8 +4522,9 @@ gimple_omp_for_clauses (const_gimple gs)
static inline tree *
gimple_omp_for_clauses_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- return &gs->gimple_omp_for.clauses;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ return &omp_for_stmt->clauses;
}
@@ -4182,8 +4533,9 @@ gimple_omp_for_clauses_ptr (gimple gs)
static inline void
gimple_omp_for_set_clauses (gimple gs, tree clauses)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gs->gimple_omp_for.clauses = clauses;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ omp_for_stmt->clauses = clauses;
}
@@ -4192,8 +4544,9 @@ gimple_omp_for_set_clauses (gimple gs, tree clauses)
static inline size_t
gimple_omp_for_collapse (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- return gs->gimple_omp_for.collapse;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ return omp_for_stmt->collapse;
}
@@ -4202,9 +4555,10 @@ gimple_omp_for_collapse (gimple gs)
static inline tree
gimple_omp_for_index (const_gimple gs, size_t i)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- return gs->gimple_omp_for.iter[i].index;
+ const gimple_statement_omp_for *omp_for_stmt =
+ as_a <const gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ return omp_for_stmt->iter[i].index;
}
@@ -4213,9 +4567,10 @@ gimple_omp_for_index (const_gimple gs, size_t i)
static inline tree *
gimple_omp_for_index_ptr (gimple gs, size_t i)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- return &gs->gimple_omp_for.iter[i].index;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ return &omp_for_stmt->iter[i].index;
}
@@ -4224,9 +4579,10 @@ gimple_omp_for_index_ptr (gimple gs, size_t i)
static inline void
gimple_omp_for_set_index (gimple gs, size_t i, tree index)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- gs->gimple_omp_for.iter[i].index = index;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ omp_for_stmt->iter[i].index = index;
}
@@ -4235,9 +4591,10 @@ gimple_omp_for_set_index (gimple gs, size_t i, tree index)
static inline tree
gimple_omp_for_initial (const_gimple gs, size_t i)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- return gs->gimple_omp_for.iter[i].initial;
+ const gimple_statement_omp_for *omp_for_stmt =
+ as_a <const gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ return omp_for_stmt->iter[i].initial;
}
@@ -4246,9 +4603,10 @@ gimple_omp_for_initial (const_gimple gs, size_t i)
static inline tree *
gimple_omp_for_initial_ptr (gimple gs, size_t i)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- return &gs->gimple_omp_for.iter[i].initial;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ return &omp_for_stmt->iter[i].initial;
}
@@ -4257,9 +4615,10 @@ gimple_omp_for_initial_ptr (gimple gs, size_t i)
static inline void
gimple_omp_for_set_initial (gimple gs, size_t i, tree initial)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- gs->gimple_omp_for.iter[i].initial = initial;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ omp_for_stmt->iter[i].initial = initial;
}
@@ -4268,9 +4627,10 @@ gimple_omp_for_set_initial (gimple gs, size_t i, tree initial)
static inline tree
gimple_omp_for_final (const_gimple gs, size_t i)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- return gs->gimple_omp_for.iter[i].final;
+ const gimple_statement_omp_for *omp_for_stmt =
+ as_a <const gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ return omp_for_stmt->iter[i].final;
}
@@ -4279,9 +4639,10 @@ gimple_omp_for_final (const_gimple gs, size_t i)
static inline tree *
gimple_omp_for_final_ptr (gimple gs, size_t i)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- return &gs->gimple_omp_for.iter[i].final;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ return &omp_for_stmt->iter[i].final;
}
@@ -4290,9 +4651,10 @@ gimple_omp_for_final_ptr (gimple gs, size_t i)
static inline void
gimple_omp_for_set_final (gimple gs, size_t i, tree final)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- gs->gimple_omp_for.iter[i].final = final;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ omp_for_stmt->iter[i].final = final;
}
@@ -4301,9 +4663,10 @@ gimple_omp_for_set_final (gimple gs, size_t i, tree final)
static inline tree
gimple_omp_for_incr (const_gimple gs, size_t i)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- return gs->gimple_omp_for.iter[i].incr;
+ const gimple_statement_omp_for *omp_for_stmt =
+ as_a <const gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ return omp_for_stmt->iter[i].incr;
}
@@ -4312,9 +4675,10 @@ gimple_omp_for_incr (const_gimple gs, size_t i)
static inline tree *
gimple_omp_for_incr_ptr (gimple gs, size_t i)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- return &gs->gimple_omp_for.iter[i].incr;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ return &omp_for_stmt->iter[i].incr;
}
@@ -4323,9 +4687,10 @@ gimple_omp_for_incr_ptr (gimple gs, size_t i)
static inline void
gimple_omp_for_set_incr (gimple gs, size_t i, tree incr)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- gs->gimple_omp_for.iter[i].incr = incr;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ omp_for_stmt->iter[i].incr = incr;
}
@@ -4335,8 +4700,9 @@ gimple_omp_for_set_incr (gimple gs, size_t i, tree incr)
static inline gimple_seq *
gimple_omp_for_pre_body_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- return &gs->gimple_omp_for.pre_body;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ return &omp_for_stmt->pre_body;
}
@@ -4356,8 +4722,9 @@ gimple_omp_for_pre_body (gimple gs)
static inline void
gimple_omp_for_set_pre_body (gimple gs, gimple_seq pre_body)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gs->gimple_omp_for.pre_body = pre_body;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ omp_for_stmt->pre_body = pre_body;
}
@@ -4366,8 +4733,9 @@ gimple_omp_for_set_pre_body (gimple gs, gimple_seq pre_body)
static inline tree
gimple_omp_parallel_clauses (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
- return gs->gimple_omp_parallel.clauses;
+ const gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <const gimple_statement_omp_parallel> (gs);
+ return omp_parallel_stmt->clauses;
}
@@ -4376,8 +4744,9 @@ gimple_omp_parallel_clauses (const_gimple gs)
static inline tree *
gimple_omp_parallel_clauses_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
- return &gs->gimple_omp_parallel.clauses;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ return &omp_parallel_stmt->clauses;
}
@@ -4387,8 +4756,9 @@ gimple_omp_parallel_clauses_ptr (gimple gs)
static inline void
gimple_omp_parallel_set_clauses (gimple gs, tree clauses)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
- gs->gimple_omp_parallel.clauses = clauses;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ omp_parallel_stmt->clauses = clauses;
}
@@ -4397,8 +4767,9 @@ gimple_omp_parallel_set_clauses (gimple gs, tree clauses)
static inline tree
gimple_omp_parallel_child_fn (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
- return gs->gimple_omp_parallel.child_fn;
+ const gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <const gimple_statement_omp_parallel> (gs);
+ return omp_parallel_stmt->child_fn;
}
/* Return a pointer to the child function used to hold the body of
@@ -4407,8 +4778,9 @@ gimple_omp_parallel_child_fn (const_gimple gs)
static inline tree *
gimple_omp_parallel_child_fn_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
- return &gs->gimple_omp_parallel.child_fn;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ return &omp_parallel_stmt->child_fn;
}
@@ -4417,8 +4789,9 @@ gimple_omp_parallel_child_fn_ptr (gimple gs)
static inline void
gimple_omp_parallel_set_child_fn (gimple gs, tree child_fn)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
- gs->gimple_omp_parallel.child_fn = child_fn;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ omp_parallel_stmt->child_fn = child_fn;
}
@@ -4428,8 +4801,9 @@ gimple_omp_parallel_set_child_fn (gimple gs, tree child_fn)
static inline tree
gimple_omp_parallel_data_arg (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
- return gs->gimple_omp_parallel.data_arg;
+ const gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <const gimple_statement_omp_parallel> (gs);
+ return omp_parallel_stmt->data_arg;
}
@@ -4438,8 +4812,9 @@ gimple_omp_parallel_data_arg (const_gimple gs)
static inline tree *
gimple_omp_parallel_data_arg_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
- return &gs->gimple_omp_parallel.data_arg;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ return &omp_parallel_stmt->data_arg;
}
@@ -4448,8 +4823,9 @@ gimple_omp_parallel_data_arg_ptr (gimple gs)
static inline void
gimple_omp_parallel_set_data_arg (gimple gs, tree data_arg)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
- gs->gimple_omp_parallel.data_arg = data_arg;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ omp_parallel_stmt->data_arg = data_arg;
}
@@ -4458,8 +4834,9 @@ gimple_omp_parallel_set_data_arg (gimple gs, tree data_arg)
static inline tree
gimple_omp_task_clauses (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return gs->gimple_omp_parallel.clauses;
+ const gimple_statement_omp_task *omp_task_stmt =
+ as_a <const gimple_statement_omp_task> (gs);
+ return omp_task_stmt->clauses;
}
@@ -4468,8 +4845,9 @@ gimple_omp_task_clauses (const_gimple gs)
static inline tree *
gimple_omp_task_clauses_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return &gs->gimple_omp_parallel.clauses;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ return &omp_task_stmt->clauses;
}
@@ -4479,8 +4857,9 @@ gimple_omp_task_clauses_ptr (gimple gs)
static inline void
gimple_omp_task_set_clauses (gimple gs, tree clauses)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- gs->gimple_omp_parallel.clauses = clauses;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ omp_task_stmt->clauses = clauses;
}
@@ -4489,8 +4868,9 @@ gimple_omp_task_set_clauses (gimple gs, tree clauses)
static inline tree
gimple_omp_task_child_fn (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return gs->gimple_omp_parallel.child_fn;
+ const gimple_statement_omp_task *omp_task_stmt =
+ as_a <const gimple_statement_omp_task> (gs);
+ return omp_task_stmt->child_fn;
}
/* Return a pointer to the child function used to hold the body of
@@ -4499,8 +4879,9 @@ gimple_omp_task_child_fn (const_gimple gs)
static inline tree *
gimple_omp_task_child_fn_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return &gs->gimple_omp_parallel.child_fn;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ return &omp_task_stmt->child_fn;
}
@@ -4509,8 +4890,9 @@ gimple_omp_task_child_fn_ptr (gimple gs)
static inline void
gimple_omp_task_set_child_fn (gimple gs, tree child_fn)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- gs->gimple_omp_parallel.child_fn = child_fn;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ omp_task_stmt->child_fn = child_fn;
}
@@ -4520,8 +4902,9 @@ gimple_omp_task_set_child_fn (gimple gs, tree child_fn)
static inline tree
gimple_omp_task_data_arg (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return gs->gimple_omp_parallel.data_arg;
+ const gimple_statement_omp_task *omp_task_stmt =
+ as_a <const gimple_statement_omp_task> (gs);
+ return omp_task_stmt->data_arg;
}
@@ -4530,8 +4913,9 @@ gimple_omp_task_data_arg (const_gimple gs)
static inline tree *
gimple_omp_task_data_arg_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return &gs->gimple_omp_parallel.data_arg;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ return &omp_task_stmt->data_arg;
}
@@ -4540,8 +4924,9 @@ gimple_omp_task_data_arg_ptr (gimple gs)
static inline void
gimple_omp_task_set_data_arg (gimple gs, tree data_arg)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- gs->gimple_omp_parallel.data_arg = data_arg;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ omp_task_stmt->data_arg = data_arg;
}
@@ -4550,9 +4935,9 @@ gimple_omp_task_set_data_arg (gimple gs, tree data_arg)
static inline tree
gimple_omp_taskreg_clauses (const_gimple gs)
{
- if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return gs->gimple_omp_parallel.clauses;
+ const gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <const gimple_statement_omp_parallel> (gs);
+ return omp_parallel_stmt->clauses;
}
@@ -4561,9 +4946,9 @@ gimple_omp_taskreg_clauses (const_gimple gs)
static inline tree *
gimple_omp_taskreg_clauses_ptr (gimple gs)
{
- if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return &gs->gimple_omp_parallel.clauses;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ return &omp_parallel_stmt->clauses;
}
@@ -4573,9 +4958,9 @@ gimple_omp_taskreg_clauses_ptr (gimple gs)
static inline void
gimple_omp_taskreg_set_clauses (gimple gs, tree clauses)
{
- if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- gs->gimple_omp_parallel.clauses = clauses;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ omp_parallel_stmt->clauses = clauses;
}
@@ -4584,9 +4969,9 @@ gimple_omp_taskreg_set_clauses (gimple gs, tree clauses)
static inline tree
gimple_omp_taskreg_child_fn (const_gimple gs)
{
- if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return gs->gimple_omp_parallel.child_fn;
+ const gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <const gimple_statement_omp_parallel> (gs);
+ return omp_parallel_stmt->child_fn;
}
/* Return a pointer to the child function used to hold the body of
@@ -4595,9 +4980,9 @@ gimple_omp_taskreg_child_fn (const_gimple gs)
static inline tree *
gimple_omp_taskreg_child_fn_ptr (gimple gs)
{
- if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return &gs->gimple_omp_parallel.child_fn;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ return &omp_parallel_stmt->child_fn;
}
@@ -4606,9 +4991,9 @@ gimple_omp_taskreg_child_fn_ptr (gimple gs)
static inline void
gimple_omp_taskreg_set_child_fn (gimple gs, tree child_fn)
{
- if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- gs->gimple_omp_parallel.child_fn = child_fn;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ omp_parallel_stmt->child_fn = child_fn;
}
@@ -4618,9 +5003,9 @@ gimple_omp_taskreg_set_child_fn (gimple gs, tree child_fn)
static inline tree
gimple_omp_taskreg_data_arg (const_gimple gs)
{
- if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return gs->gimple_omp_parallel.data_arg;
+ const gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <const gimple_statement_omp_parallel> (gs);
+ return omp_parallel_stmt->data_arg;
}
@@ -4629,9 +5014,9 @@ gimple_omp_taskreg_data_arg (const_gimple gs)
static inline tree *
gimple_omp_taskreg_data_arg_ptr (gimple gs)
{
- if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return &gs->gimple_omp_parallel.data_arg;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ return &omp_parallel_stmt->data_arg;
}
@@ -4640,9 +5025,9 @@ gimple_omp_taskreg_data_arg_ptr (gimple gs)
static inline void
gimple_omp_taskreg_set_data_arg (gimple gs, tree data_arg)
{
- if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- gs->gimple_omp_parallel.data_arg = data_arg;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ omp_parallel_stmt->data_arg = data_arg;
}
@@ -4651,8 +5036,9 @@ gimple_omp_taskreg_set_data_arg (gimple gs, tree data_arg)
static inline tree
gimple_omp_task_copy_fn (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return gs->gimple_omp_task.copy_fn;
+ const gimple_statement_omp_task *omp_task_stmt =
+ as_a <const gimple_statement_omp_task> (gs);
+ return omp_task_stmt->copy_fn;
}
/* Return a pointer to the copy function used to hold the body of
@@ -4661,8 +5047,9 @@ gimple_omp_task_copy_fn (const_gimple gs)
static inline tree *
gimple_omp_task_copy_fn_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return &gs->gimple_omp_task.copy_fn;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ return &omp_task_stmt->copy_fn;
}
@@ -4671,8 +5058,9 @@ gimple_omp_task_copy_fn_ptr (gimple gs)
static inline void
gimple_omp_task_set_copy_fn (gimple gs, tree copy_fn)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- gs->gimple_omp_task.copy_fn = copy_fn;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ omp_task_stmt->copy_fn = copy_fn;
}
@@ -4681,8 +5069,9 @@ gimple_omp_task_set_copy_fn (gimple gs, tree copy_fn)
static inline tree
gimple_omp_task_arg_size (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return gs->gimple_omp_task.arg_size;
+ const gimple_statement_omp_task *omp_task_stmt =
+ as_a <const gimple_statement_omp_task> (gs);
+ return omp_task_stmt->arg_size;
}
@@ -4691,8 +5080,9 @@ gimple_omp_task_arg_size (const_gimple gs)
static inline tree *
gimple_omp_task_arg_size_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return &gs->gimple_omp_task.arg_size;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ return &omp_task_stmt->arg_size;
}
@@ -4701,8 +5091,9 @@ gimple_omp_task_arg_size_ptr (gimple gs)
static inline void
gimple_omp_task_set_arg_size (gimple gs, tree arg_size)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- gs->gimple_omp_task.arg_size = arg_size;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ omp_task_stmt->arg_size = arg_size;
}
@@ -4711,8 +5102,9 @@ gimple_omp_task_set_arg_size (gimple gs, tree arg_size)
static inline tree
gimple_omp_task_arg_align (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return gs->gimple_omp_task.arg_align;
+ const gimple_statement_omp_task *omp_task_stmt =
+ as_a <const gimple_statement_omp_task> (gs);
+ return omp_task_stmt->arg_align;
}
@@ -4721,8 +5113,9 @@ gimple_omp_task_arg_align (const_gimple gs)
static inline tree *
gimple_omp_task_arg_align_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return &gs->gimple_omp_task.arg_align;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ return &omp_task_stmt->arg_align;
}
@@ -4731,8 +5124,9 @@ gimple_omp_task_arg_align_ptr (gimple gs)
static inline void
gimple_omp_task_set_arg_align (gimple gs, tree arg_align)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- gs->gimple_omp_task.arg_align = arg_align;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ omp_task_stmt->arg_align = arg_align;
}
@@ -4741,8 +5135,9 @@ gimple_omp_task_set_arg_align (gimple gs, tree arg_align)
static inline tree
gimple_omp_single_clauses (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_SINGLE);
- return gs->gimple_omp_single.clauses;
+ const gimple_statement_omp_single *omp_single_stmt =
+ as_a <const gimple_statement_omp_single> (gs);
+ return omp_single_stmt->clauses;
}
@@ -4751,8 +5146,9 @@ gimple_omp_single_clauses (const_gimple gs)
static inline tree *
gimple_omp_single_clauses_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_SINGLE);
- return &gs->gimple_omp_single.clauses;
+ gimple_statement_omp_single *omp_single_stmt =
+ as_a <gimple_statement_omp_single> (gs);
+ return &omp_single_stmt->clauses;
}
@@ -4761,8 +5157,9 @@ gimple_omp_single_clauses_ptr (gimple gs)
static inline void
gimple_omp_single_set_clauses (gimple gs, tree clauses)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_SINGLE);
- gs->gimple_omp_single.clauses = clauses;
+ gimple_statement_omp_single *omp_single_stmt =
+ as_a <gimple_statement_omp_single> (gs);
+ omp_single_stmt->clauses = clauses;
}
@@ -4771,8 +5168,9 @@ gimple_omp_single_set_clauses (gimple gs, tree clauses)
static inline tree
gimple_omp_target_clauses (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
- return gs->gimple_omp_parallel.clauses;
+ const gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <const gimple_statement_omp_parallel> (gs);
+ return omp_parallel_stmt->clauses;
}
@@ -4781,8 +5179,9 @@ gimple_omp_target_clauses (const_gimple gs)
static inline tree *
gimple_omp_target_clauses_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
- return &gs->gimple_omp_parallel.clauses;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ return &omp_parallel_stmt->clauses;
}
@@ -4791,8 +5190,9 @@ gimple_omp_target_clauses_ptr (gimple gs)
static inline void
gimple_omp_target_set_clauses (gimple gs, tree clauses)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
- gs->gimple_omp_parallel.clauses = clauses;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ omp_parallel_stmt->clauses = clauses;
}
@@ -4812,7 +5212,7 @@ static inline void
gimple_omp_target_set_kind (gimple g, int kind)
{
GIMPLE_CHECK (g, GIMPLE_OMP_TARGET);
- g->gsbase.subcode = (g->gsbase.subcode & ~GF_OMP_TARGET_KIND_MASK)
+ g->subcode = (g->subcode & ~GF_OMP_TARGET_KIND_MASK)
| (kind & GF_OMP_TARGET_KIND_MASK);
}
@@ -4822,8 +5222,9 @@ gimple_omp_target_set_kind (gimple g, int kind)
static inline tree
gimple_omp_target_child_fn (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
- return gs->gimple_omp_parallel.child_fn;
+ const gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <const gimple_statement_omp_parallel> (gs);
+ return omp_parallel_stmt->child_fn;
}
/* Return a pointer to the child function used to hold the body of
@@ -4832,8 +5233,9 @@ gimple_omp_target_child_fn (const_gimple gs)
static inline tree *
gimple_omp_target_child_fn_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
- return &gs->gimple_omp_parallel.child_fn;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ return &omp_parallel_stmt->child_fn;
}
@@ -4842,8 +5244,9 @@ gimple_omp_target_child_fn_ptr (gimple gs)
static inline void
gimple_omp_target_set_child_fn (gimple gs, tree child_fn)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
- gs->gimple_omp_parallel.child_fn = child_fn;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ omp_parallel_stmt->child_fn = child_fn;
}
@@ -4853,8 +5256,9 @@ gimple_omp_target_set_child_fn (gimple gs, tree child_fn)
static inline tree
gimple_omp_target_data_arg (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
- return gs->gimple_omp_parallel.data_arg;
+ const gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <const gimple_statement_omp_parallel> (gs);
+ return omp_parallel_stmt->data_arg;
}
@@ -4863,8 +5267,9 @@ gimple_omp_target_data_arg (const_gimple gs)
static inline tree *
gimple_omp_target_data_arg_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
- return &gs->gimple_omp_parallel.data_arg;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ return &omp_parallel_stmt->data_arg;
}
@@ -4873,8 +5278,9 @@ gimple_omp_target_data_arg_ptr (gimple gs)
static inline void
gimple_omp_target_set_data_arg (gimple gs, tree data_arg)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
- gs->gimple_omp_parallel.data_arg = data_arg;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ omp_parallel_stmt->data_arg = data_arg;
}
@@ -4883,8 +5289,9 @@ gimple_omp_target_set_data_arg (gimple gs, tree data_arg)
static inline tree
gimple_omp_teams_clauses (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TEAMS);
- return gs->gimple_omp_single.clauses;
+ const gimple_statement_omp_single *omp_single_stmt =
+ as_a <const gimple_statement_omp_single> (gs);
+ return omp_single_stmt->clauses;
}
@@ -4893,8 +5300,9 @@ gimple_omp_teams_clauses (const_gimple gs)
static inline tree *
gimple_omp_teams_clauses_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TEAMS);
- return &gs->gimple_omp_single.clauses;
+ gimple_statement_omp_single *omp_single_stmt =
+ as_a <gimple_statement_omp_single> (gs);
+ return &omp_single_stmt->clauses;
}
@@ -4903,8 +5311,9 @@ gimple_omp_teams_clauses_ptr (gimple gs)
static inline void
gimple_omp_teams_set_clauses (gimple gs, tree clauses)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TEAMS);
- gs->gimple_omp_single.clauses = clauses;
+ gimple_statement_omp_single *omp_single_stmt =
+ as_a <gimple_statement_omp_single> (gs);
+ omp_single_stmt->clauses = clauses;
}
@@ -4913,8 +5322,9 @@ gimple_omp_teams_set_clauses (gimple gs, tree clauses)
static inline tree
gimple_omp_sections_clauses (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
- return gs->gimple_omp_sections.clauses;
+ const gimple_statement_omp_sections *omp_sections_stmt =
+ as_a <const gimple_statement_omp_sections> (gs);
+ return omp_sections_stmt->clauses;
}
@@ -4923,8 +5333,9 @@ gimple_omp_sections_clauses (const_gimple gs)
static inline tree *
gimple_omp_sections_clauses_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
- return &gs->gimple_omp_sections.clauses;
+ gimple_statement_omp_sections *omp_sections_stmt =
+ as_a <gimple_statement_omp_sections> (gs);
+ return &omp_sections_stmt->clauses;
}
@@ -4934,8 +5345,9 @@ gimple_omp_sections_clauses_ptr (gimple gs)
static inline void
gimple_omp_sections_set_clauses (gimple gs, tree clauses)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
- gs->gimple_omp_sections.clauses = clauses;
+ gimple_statement_omp_sections *omp_sections_stmt =
+ as_a <gimple_statement_omp_sections> (gs);
+ omp_sections_stmt->clauses = clauses;
}
@@ -4945,8 +5357,9 @@ gimple_omp_sections_set_clauses (gimple gs, tree clauses)
static inline tree
gimple_omp_sections_control (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
- return gs->gimple_omp_sections.control;
+ const gimple_statement_omp_sections *omp_sections_stmt =
+ as_a <const gimple_statement_omp_sections> (gs);
+ return omp_sections_stmt->control;
}
@@ -4956,8 +5369,9 @@ gimple_omp_sections_control (const_gimple gs)
static inline tree *
gimple_omp_sections_control_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
- return &gs->gimple_omp_sections.control;
+ gimple_statement_omp_sections *omp_sections_stmt =
+ as_a <gimple_statement_omp_sections> (gs);
+ return &omp_sections_stmt->control;
}
@@ -4967,8 +5381,9 @@ gimple_omp_sections_control_ptr (gimple gs)
static inline void
gimple_omp_sections_set_control (gimple gs, tree control)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
- gs->gimple_omp_sections.control = control;
+ gimple_statement_omp_sections *omp_sections_stmt =
+ as_a <gimple_statement_omp_sections> (gs);
+ omp_sections_stmt->control = control;
}
@@ -4977,10 +5392,11 @@ gimple_omp_sections_set_control (gimple gs, tree control)
static inline void
gimple_omp_for_set_cond (gimple gs, size_t i, enum tree_code cond)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
gcc_gimple_checking_assert (TREE_CODE_CLASS (cond) == tcc_comparison
- && i < gs->gimple_omp_for.collapse);
- gs->gimple_omp_for.iter[i].cond = cond;
+ && i < omp_for_stmt->collapse);
+ omp_for_stmt->iter[i].cond = cond;
}
@@ -4989,9 +5405,10 @@ gimple_omp_for_set_cond (gimple gs, size_t i, enum tree_code cond)
static inline enum tree_code
gimple_omp_for_cond (const_gimple gs, size_t i)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- return gs->gimple_omp_for.iter[i].cond;
+ const gimple_statement_omp_for *omp_for_stmt =
+ as_a <const gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ return omp_for_stmt->iter[i].cond;
}
@@ -5000,8 +5417,9 @@ gimple_omp_for_cond (const_gimple gs, size_t i)
static inline void
gimple_omp_atomic_store_set_val (gimple g, tree val)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
- g->gimple_omp_atomic_store.val = val;
+ gimple_statement_omp_atomic_store *omp_atomic_store_stmt =
+ as_a <gimple_statement_omp_atomic_store> (g);
+ omp_atomic_store_stmt->val = val;
}
@@ -5010,8 +5428,9 @@ gimple_omp_atomic_store_set_val (gimple g, tree val)
static inline tree
gimple_omp_atomic_store_val (const_gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
- return g->gimple_omp_atomic_store.val;
+ const gimple_statement_omp_atomic_store *omp_atomic_store_stmt =
+ as_a <const gimple_statement_omp_atomic_store> (g);
+ return omp_atomic_store_stmt->val;
}
@@ -5020,8 +5439,9 @@ gimple_omp_atomic_store_val (const_gimple g)
static inline tree *
gimple_omp_atomic_store_val_ptr (gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
- return &g->gimple_omp_atomic_store.val;
+ gimple_statement_omp_atomic_store *omp_atomic_store_stmt =
+ as_a <gimple_statement_omp_atomic_store> (g);
+ return &omp_atomic_store_stmt->val;
}
@@ -5030,8 +5450,9 @@ gimple_omp_atomic_store_val_ptr (gimple g)
static inline void
gimple_omp_atomic_load_set_lhs (gimple g, tree lhs)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
- g->gimple_omp_atomic_load.lhs = lhs;
+ gimple_statement_omp_atomic_load *omp_atomic_load_stmt =
+ as_a <gimple_statement_omp_atomic_load> (g);
+ omp_atomic_load_stmt->lhs = lhs;
}
@@ -5040,8 +5461,9 @@ gimple_omp_atomic_load_set_lhs (gimple g, tree lhs)
static inline tree
gimple_omp_atomic_load_lhs (const_gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
- return g->gimple_omp_atomic_load.lhs;
+ const gimple_statement_omp_atomic_load *omp_atomic_load_stmt =
+ as_a <const gimple_statement_omp_atomic_load> (g);
+ return omp_atomic_load_stmt->lhs;
}
@@ -5050,8 +5472,9 @@ gimple_omp_atomic_load_lhs (const_gimple g)
static inline tree *
gimple_omp_atomic_load_lhs_ptr (gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
- return &g->gimple_omp_atomic_load.lhs;
+ gimple_statement_omp_atomic_load *omp_atomic_load_stmt =
+ as_a <gimple_statement_omp_atomic_load> (g);
+ return &omp_atomic_load_stmt->lhs;
}
@@ -5060,8 +5483,9 @@ gimple_omp_atomic_load_lhs_ptr (gimple g)
static inline void
gimple_omp_atomic_load_set_rhs (gimple g, tree rhs)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
- g->gimple_omp_atomic_load.rhs = rhs;
+ gimple_statement_omp_atomic_load *omp_atomic_load_stmt =
+ as_a <gimple_statement_omp_atomic_load> (g);
+ omp_atomic_load_stmt->rhs = rhs;
}
@@ -5070,8 +5494,9 @@ gimple_omp_atomic_load_set_rhs (gimple g, tree rhs)
static inline tree
gimple_omp_atomic_load_rhs (const_gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
- return g->gimple_omp_atomic_load.rhs;
+ const gimple_statement_omp_atomic_load *omp_atomic_load_stmt =
+ as_a <const gimple_statement_omp_atomic_load> (g);
+ return omp_atomic_load_stmt->rhs;
}
@@ -5080,8 +5505,9 @@ gimple_omp_atomic_load_rhs (const_gimple g)
static inline tree *
gimple_omp_atomic_load_rhs_ptr (gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
- return &g->gimple_omp_atomic_load.rhs;
+ gimple_statement_omp_atomic_load *omp_atomic_load_stmt =
+ as_a <gimple_statement_omp_atomic_load> (g);
+ return &omp_atomic_load_stmt->rhs;
}
@@ -5090,8 +5516,9 @@ gimple_omp_atomic_load_rhs_ptr (gimple g)
static inline tree
gimple_omp_continue_control_def (const_gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
- return g->gimple_omp_continue.control_def;
+ const gimple_statement_omp_continue *omp_continue_stmt =
+ as_a <const gimple_statement_omp_continue> (g);
+ return omp_continue_stmt->control_def;
}
/* The same as above, but return the address. */
@@ -5099,8 +5526,9 @@ gimple_omp_continue_control_def (const_gimple g)
static inline tree *
gimple_omp_continue_control_def_ptr (gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
- return &g->gimple_omp_continue.control_def;
+ gimple_statement_omp_continue *omp_continue_stmt =
+ as_a <gimple_statement_omp_continue> (g);
+ return &omp_continue_stmt->control_def;
}
/* Set the definition of the control variable in a GIMPLE_OMP_CONTINUE. */
@@ -5108,8 +5536,9 @@ gimple_omp_continue_control_def_ptr (gimple g)
static inline void
gimple_omp_continue_set_control_def (gimple g, tree def)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
- g->gimple_omp_continue.control_def = def;
+ gimple_statement_omp_continue *omp_continue_stmt =
+ as_a <gimple_statement_omp_continue> (g);
+ omp_continue_stmt->control_def = def;
}
@@ -5118,8 +5547,9 @@ gimple_omp_continue_set_control_def (gimple g, tree def)
static inline tree
gimple_omp_continue_control_use (const_gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
- return g->gimple_omp_continue.control_use;
+ const gimple_statement_omp_continue *omp_continue_stmt =
+ as_a <const gimple_statement_omp_continue> (g);
+ return omp_continue_stmt->control_use;
}
@@ -5128,8 +5558,9 @@ gimple_omp_continue_control_use (const_gimple g)
static inline tree *
gimple_omp_continue_control_use_ptr (gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
- return &g->gimple_omp_continue.control_use;
+ gimple_statement_omp_continue *omp_continue_stmt =
+ as_a <gimple_statement_omp_continue> (g);
+ return &omp_continue_stmt->control_use;
}
@@ -5138,8 +5569,9 @@ gimple_omp_continue_control_use_ptr (gimple g)
static inline void
gimple_omp_continue_set_control_use (gimple g, tree use)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
- g->gimple_omp_continue.control_use = use;
+ gimple_statement_omp_continue *omp_continue_stmt =
+ as_a <gimple_statement_omp_continue> (g);
+ omp_continue_stmt->control_use = use;
}
/* Return a pointer to the body for the GIMPLE_TRANSACTION statement GS. */
@@ -5147,8 +5579,9 @@ gimple_omp_continue_set_control_use (gimple g, tree use)
static inline gimple_seq *
gimple_transaction_body_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
- return &gs->gimple_transaction.body;
+ gimple_statement_transaction *transaction_stmt =
+ as_a <gimple_statement_transaction> (gs);
+ return &transaction_stmt->body;
}
/* Return the body for the GIMPLE_TRANSACTION statement GS. */
@@ -5164,15 +5597,17 @@ gimple_transaction_body (gimple gs)
static inline tree
gimple_transaction_label (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
- return gs->gimple_transaction.label;
+ const gimple_statement_transaction *transaction_stmt =
+ as_a <const gimple_statement_transaction> (gs);
+ return transaction_stmt->label;
}
static inline tree *
gimple_transaction_label_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
- return &gs->gimple_transaction.label;
+ gimple_statement_transaction *transaction_stmt =
+ as_a <gimple_statement_transaction> (gs);
+ return &transaction_stmt->label;
}
/* Return the subcode associated with a GIMPLE_TRANSACTION. */
@@ -5181,7 +5616,7 @@ static inline unsigned int
gimple_transaction_subcode (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
- return gs->gsbase.subcode;
+ return gs->subcode;
}
/* Set BODY to be the body for the GIMPLE_TRANSACTION statement GS. */
@@ -5189,8 +5624,9 @@ gimple_transaction_subcode (const_gimple gs)
static inline void
gimple_transaction_set_body (gimple gs, gimple_seq body)
{
- GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
- gs->gimple_transaction.body = body;
+ gimple_statement_transaction *transaction_stmt =
+ as_a <gimple_statement_transaction> (gs);
+ transaction_stmt->body = body;
}
/* Set the label associated with a GIMPLE_TRANSACTION. */
@@ -5198,8 +5634,9 @@ gimple_transaction_set_body (gimple gs, gimple_seq body)
static inline void
gimple_transaction_set_label (gimple gs, tree label)
{
- GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
- gs->gimple_transaction.label = label;
+ gimple_statement_transaction *transaction_stmt =
+ as_a <gimple_statement_transaction> (gs);
+ transaction_stmt->label = label;
}
/* Set the subcode associated with a GIMPLE_TRANSACTION. */
@@ -5208,7 +5645,7 @@ static inline void
gimple_transaction_set_subcode (gimple gs, unsigned int subcode)
{
GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
- gs->gsbase.subcode = subcode;
+ gs->subcode = subcode;
}
@@ -5318,7 +5755,7 @@ static inline enum br_predictor
gimple_predict_predictor (gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_PREDICT);
- return (enum br_predictor) (gs->gsbase.subcode & ~GF_PREDICT_TAKEN);
+ return (enum br_predictor) (gs->subcode & ~GF_PREDICT_TAKEN);
}
@@ -5328,7 +5765,7 @@ static inline void
gimple_predict_set_predictor (gimple gs, enum br_predictor predictor)
{
GIMPLE_CHECK (gs, GIMPLE_PREDICT);
- gs->gsbase.subcode = (gs->gsbase.subcode & GF_PREDICT_TAKEN)
+ gs->subcode = (gs->subcode & GF_PREDICT_TAKEN)
| (unsigned) predictor;
}
@@ -5339,7 +5776,7 @@ static inline enum prediction
gimple_predict_outcome (gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_PREDICT);
- return (gs->gsbase.subcode & GF_PREDICT_TAKEN) ? TAKEN : NOT_TAKEN;
+ return (gs->subcode & GF_PREDICT_TAKEN) ? TAKEN : NOT_TAKEN;
}
@@ -5350,9 +5787,9 @@ gimple_predict_set_outcome (gimple gs, enum prediction outcome)
{
GIMPLE_CHECK (gs, GIMPLE_PREDICT);
if (outcome == TAKEN)
- gs->gsbase.subcode |= GF_PREDICT_TAKEN;
+ gs->subcode |= GF_PREDICT_TAKEN;
else
- gs->gsbase.subcode &= ~GF_PREDICT_TAKEN;
+ gs->subcode &= ~GF_PREDICT_TAKEN;
}
@@ -5491,7 +5928,7 @@ gsi_end_p (gimple_stmt_iterator i)
static inline bool
gsi_one_before_end_p (gimple_stmt_iterator i)
{
- return i.ptr != NULL && i.ptr->gsbase.next == NULL;
+ return i.ptr != NULL && i.ptr->next == NULL;
}
@@ -5500,7 +5937,7 @@ gsi_one_before_end_p (gimple_stmt_iterator i)
static inline void
gsi_next (gimple_stmt_iterator *i)
{
- i->ptr = i->ptr->gsbase.next;
+ i->ptr = i->ptr->next;
}
/* Advance the iterator to the previous gimple statement. */
@@ -5508,8 +5945,8 @@ gsi_next (gimple_stmt_iterator *i)
static inline void
gsi_prev (gimple_stmt_iterator *i)
{
- gimple prev = i->ptr->gsbase.prev;
- if (prev->gsbase.next)
+ gimple prev = i->ptr->prev;
+ if (prev->next)
i->ptr = prev;
else
i->ptr = NULL;
@@ -2586,7 +2586,7 @@ copy_debug_stmt (gimple stmt, copy_body_data *id)
&& TREE_CODE ((**debug_args)[i + 1]) == DEBUG_EXPR_DECL)
{
t = (**debug_args)[i + 1];
- stmt->gsbase.subcode = GIMPLE_DEBUG_BIND;
+ stmt->subcode = GIMPLE_DEBUG_BIND;
gimple_debug_bind_set_value (stmt, t);
break;
}
@@ -183,7 +183,7 @@ make_phi_node (tree var, int len)
memset (phi, 0, (sizeof (struct gimple_statement_phi)
- sizeof (struct phi_arg_d)
+ sizeof (struct phi_arg_d) * len));
- phi->gsbase.code = GIMPLE_PHI;
+ phi->code = GIMPLE_PHI;
gimple_init_singleton (phi);
phi->gimple_phi.nargs = len;
phi->gimple_phi.capacity = capacity;