aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.h
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2012-05-03 14:34:07 +0000
committerMichael Matz <matz@suse.de>2012-05-03 14:34:07 +0000
commita981573272be27f52280baaef805dbe7c0dd1ac2 (patch)
treed681839cfc46539f6a7285ab0aee7f6206b1d145 /gcc/gimple.h
parentae5fb0cff3e245b68313413dae4232aed1bc90f6 (diff)
* basic-block.h (struct rtl_bb_info, struct gimple_bb_info): Move
in front of basic_block_def. (struct basic_block_def): Make il.gimple the full struct, not a pointer. (__assert_gimple_bb_smaller_rtl_bb): Asserting typedef. * cfgexpand.c (expand_gimple_basic_block): Clear all il.gimple members. * gimple-iterator.c (gimple_stmt_iterator): Don't special case NULL il.gimple, which can't happen anymore. * gimple.h (bb_seq): il.gimple can't be NULL. (bb_seq_add): Ditto. (set_bb_seq): Adjust. (gsi_start_bb, gsi_last_bb): Tidy. * lto-streamer-in.c (make_new_block): Don't zero members that are zeroed already, don't allocate a gimple_bb_info. * tree-cfg.c (create_bb): Don't allocate a gimple_bb_info. (remove_bb): Clear all il.gimple members. (gimple_verify_flow_info): Adjust for flat il.gimple. * tree-flow-inline.h (phi_nodes, phi_nodes_ptr, set_phi_nodes): Adjust. * coretypes.h (const_gimple_seq): Remove typedef. * gimple.h (gimple_seq_first): Take gimple_seq. (gimple_seq_first_stmt): Ditto. (gimple_seq_last): Ditto. (gimple_seq_last_stmt): Ditto. (gimple_seq_empty_p): Ditto. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@187099 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple.h')
-rw-r--r--gcc/gimple.h52
1 files changed, 15 insertions, 37 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h
index c40d7c3cc4e..80271a1e358 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -1023,7 +1023,7 @@ extern bool types_compatible_p (tree, tree);
/* Return the first node in GIMPLE sequence S. */
static inline gimple_seq_node
-gimple_seq_first (const_gimple_seq s)
+gimple_seq_first (gimple_seq s)
{
return s;
}
@@ -1032,7 +1032,7 @@ gimple_seq_first (const_gimple_seq s)
/* Return the first statement in GIMPLE sequence S. */
static inline gimple
-gimple_seq_first_stmt (const_gimple_seq s)
+gimple_seq_first_stmt (gimple_seq s)
{
gimple_seq_node n = gimple_seq_first (s);
return n;
@@ -1042,7 +1042,7 @@ gimple_seq_first_stmt (const_gimple_seq s)
/* Return the last node in GIMPLE sequence S. */
static inline gimple_seq_node
-gimple_seq_last (const_gimple_seq s)
+gimple_seq_last (gimple_seq s)
{
return s ? s->gsbase.prev : NULL;
}
@@ -1051,7 +1051,7 @@ gimple_seq_last (const_gimple_seq s)
/* Return the last statement in GIMPLE sequence S. */
static inline gimple
-gimple_seq_last_stmt (const_gimple_seq s)
+gimple_seq_last_stmt (gimple_seq s)
{
gimple_seq_node n = gimple_seq_last (s);
return n;
@@ -1079,7 +1079,7 @@ gimple_seq_set_first (gimple_seq *ps, gimple_seq_node first)
/* Return true if GIMPLE sequence S is empty. */
static inline bool
-gimple_seq_empty_p (const_gimple_seq s)
+gimple_seq_empty_p (gimple_seq s)
{
return s == NULL;
}
@@ -1110,13 +1110,13 @@ gimple_seq_alloc_with_stmt (gimple stmt)
static inline gimple_seq
bb_seq (const_basic_block bb)
{
- return (!(bb->flags & BB_RTL) && bb->il.gimple) ? bb->il.gimple->seq : NULL;
+ return (!(bb->flags & BB_RTL)) ? bb->il.gimple.seq : NULL;
}
static inline gimple_seq *
-bb_seq_addr (const_basic_block bb)
+bb_seq_addr (basic_block bb)
{
- return (!(bb->flags & BB_RTL) && bb->il.gimple) ? &bb->il.gimple->seq : NULL;
+ return (!(bb->flags & BB_RTL)) ? &bb->il.gimple.seq : NULL;
}
/* Sets the sequence of statements in BB to SEQ. */
@@ -1125,7 +1125,7 @@ static inline void
set_bb_seq (basic_block bb, gimple_seq seq)
{
gcc_checking_assert (!(bb->flags & BB_RTL));
- bb->il.gimple->seq = seq;
+ bb->il.gimple.seq = seq;
}
@@ -4975,20 +4975,9 @@ gsi_start_bb (basic_block bb)
gimple_seq *seq;
seq = bb_seq_addr (bb);
- if (!seq)
- /* XXX Only necessary because of ENTRY/EXIT block which don't have
- il.gimple */
- {
- i.ptr = NULL;
- i.seq = NULL;
- i.bb = NULL;
- }
- else
- {
- i.ptr = gimple_seq_first (*seq);
- i.seq = seq;
- i.bb = bb;
- }
+ i.ptr = gimple_seq_first (*seq);
+ i.seq = seq;
+ i.bb = bb;
return i;
}
@@ -5019,20 +5008,9 @@ gsi_last_bb (basic_block bb)
gimple_seq *seq;
seq = bb_seq_addr (bb);
- if (!seq)
- /* XXX Only necessary because of ENTRY/EXIT block which don't have
- il.gimple */
- {
- i.ptr = NULL;
- i.seq = NULL;
- i.bb = NULL;
- }
- else
- {
- i.ptr = gimple_seq_last (*seq);
- i.seq = seq;
- i.bb = bb;
- }
+ i.ptr = gimple_seq_last (*seq);
+ i.seq = seq;
+ i.bb = bb;
return i;
}