diff options
author | Michael Matz <matz@suse.de> | 2012-05-03 14:34:07 +0000 |
---|---|---|
committer | Michael Matz <matz@gcc.gnu.org> | 2012-05-03 14:34:07 +0000 |
commit | 3e8b732e26584184ee273b8bab8fc924681c770b (patch) | |
tree | d681839cfc46539f6a7285ab0aee7f6206b1d145 /gcc/basic-block.h | |
parent | 1fa2969ff66462973c073f4605d8881e40551aff (diff) | |
download | gcc-3e8b732e26584184ee273b8bab8fc924681c770b.zip gcc-3e8b732e26584184ee273b8bab8fc924681c770b.tar.gz gcc-3e8b732e26584184ee273b8bab8fc924681c770b.tar.bz2 |
basic-block.h (struct rtl_bb_info, [...]): Move in front of basic_block_def.
* 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.
From-SVN: r187099
Diffstat (limited to 'gcc/basic-block.h')
-rw-r--r-- | gcc/basic-block.h | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/gcc/basic-block.h b/gcc/basic-block.h index f8cdea0..99df4d8 100644 --- a/gcc/basic-block.h +++ b/gcc/basic-block.h @@ -101,8 +101,27 @@ extern const struct gcov_ctr_summary *profile_info; /* Declared in cfgloop.h. */ struct loop; -/* Declared in tree-flow.h. */ -struct rtl_bb_info; +struct GTY(()) rtl_bb_info { + /* The first and last insns of the block. */ + rtx head_; + rtx end_; + + /* In CFGlayout mode points to insn notes/jumptables to be placed just before + and after the block. */ + rtx header; + rtx footer; + + /* This field is used by the bb-reorder pass. */ + int visited; +}; + +struct GTY(()) gimple_bb_info { + /* Sequence of statements in this block. */ + gimple_seq seq; + + /* PHI nodes for this block. */ + gimple_seq phi_nodes; +}; /* A basic block is a sequence of instructions with only entry and only one exit. If any one of the instructions are executed, they @@ -149,7 +168,7 @@ struct GTY((chain_next ("%h.next_bb"), chain_prev ("%h.prev_bb"))) basic_block_d struct basic_block_def *next_bb; union basic_block_il_dependent { - struct gimple_bb_info * GTY ((tag ("0"))) gimple; + struct gimple_bb_info GTY ((tag ("0"))) gimple; struct rtl_bb_info * GTY ((tag ("1"))) rtl; } GTY ((desc ("((%1.flags & BB_RTL) != 0)"))) il; @@ -172,27 +191,12 @@ struct GTY((chain_next ("%h.next_bb"), chain_prev ("%h.prev_bb"))) basic_block_d int flags; }; -struct GTY(()) rtl_bb_info { - /* The first and last insns of the block. */ - rtx head_; - rtx end_; - - /* In CFGlayout mode points to insn notes/jumptables to be placed just before - and after the block. */ - rtx header; - rtx footer; - - /* This field is used by the bb-reorder and tracer passes. */ - int visited; -}; - -struct GTY(()) gimple_bb_info { - /* Sequence of statements in this block. */ - gimple_seq seq; - - /* PHI nodes for this block. */ - gimple_seq phi_nodes; -}; +/* This ensures that struct gimple_bb_info is smaller than + struct rtl_bb_info, so that inlining the former into basic_block_def + is the better choice. */ +typedef int __assert_gimple_bb_smaller_rtl_bb + [(int)sizeof(struct rtl_bb_info) + - (int)sizeof (struct gimple_bb_info)]; DEF_VEC_P(basic_block); DEF_VEC_ALLOC_P(basic_block,gc); |