aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorZdenek Dvorak <dvorakz@suse.cz>2007-04-24 01:15:54 +0200
committerZdenek Dvorak <rakdver@gcc.gnu.org>2007-04-23 23:15:54 +0000
commit7506e1cbdcf2b1df305bced4ea29845595a07edb (patch)
tree916f5481a2d49b54e7ca5e6359ffeb9231fdbe30 /gcc/cfgexpand.c
parent933e4fe7ae88e0e652148df2ed24b4c7b27a76f9 (diff)
downloadgcc-7506e1cbdcf2b1df305bced4ea29845595a07edb.zip
gcc-7506e1cbdcf2b1df305bced4ea29845595a07edb.tar.gz
gcc-7506e1cbdcf2b1df305bced4ea29845595a07edb.tar.bz2
tree-phinodes.c (reserve_phi_args_for_new_edge, [...]): Use phi_nodes_ptr.
* tree-phinodes.c (reserve_phi_args_for_new_edge, remove_phi_node): Use phi_nodes_ptr. (create_phi_node): Use set_phi_nodes. * omp-low.c (expand_omp_parallel): Use bb_stmt_list. * tree-if-conv.c (process_phi_nodes): Use set_phi_nodes. (combine_blocks): Use bb_stmt_list and set_bb_stmt_list. * tree-flow-inline.h (phi_nodes, set_phi_nodes, (bsi_start, bsi_last): Use bb_stmt_list. (phi_nodes_ptr, bb_stmt_list, set_bb_stmt_list): New functions. * cfgexpand.c (expand_gimple_basic_block): Use bb_stmt_list. Traverse the statements using tsi iterator. * basic-block.h (struct basic_block_def): Fields stmt_list and phi_nodes moved to ... (struct tree_bb_info): ... new structure. * tree-cfg.c (create_bb): Allocate il.tree. Use set_bb_stmt_list. (tree_merge_blocks): Use bb_stmt_list and set_bb_stmt_list. (remove_bb): Handle blocks with NULL stmt list. Clear il.tree field. (tree_verify_flow_info): Verify that il.tree is not set for entry and exit block. (tree_split_block): Use set_bb_stmt_list. From-SVN: r124086
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 490532a..23cf447 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -1439,7 +1439,8 @@ expand_gimple_tailcall (basic_block bb, tree stmt, bool *can_fallthru)
static basic_block
expand_gimple_basic_block (basic_block bb)
{
- block_stmt_iterator bsi = bsi_start (bb);
+ tree_stmt_iterator tsi;
+ tree stmts = bb_stmt_list (bb);
tree stmt = NULL;
rtx note, last;
edge e;
@@ -1452,11 +1453,13 @@ expand_gimple_basic_block (basic_block bb)
bb->index);
}
+ bb->il.tree = NULL;
init_rtl_bb_info (bb);
bb->flags |= BB_RTL;
- if (!bsi_end_p (bsi))
- stmt = bsi_stmt (bsi);
+ tsi = tsi_start (stmts);
+ if (!tsi_end_p (tsi))
+ stmt = tsi_stmt (tsi);
if (stmt && TREE_CODE (stmt) == LABEL_EXPR)
{
@@ -1469,7 +1472,7 @@ expand_gimple_basic_block (basic_block bb)
BB_HEAD (bb) = NEXT_INSN (last);
if (NOTE_P (BB_HEAD (bb)))
BB_HEAD (bb) = NEXT_INSN (BB_HEAD (bb));
- bsi_next (&bsi);
+ tsi_next (&tsi);
note = emit_note_after (NOTE_INSN_BASIC_BLOCK, BB_HEAD (bb));
maybe_dump_rtl_for_tree_stmt (stmt, last);
@@ -1493,9 +1496,9 @@ expand_gimple_basic_block (basic_block bb)
ei_next (&ei);
}
- for (; !bsi_end_p (bsi); bsi_next (&bsi))
+ for (; !tsi_end_p (tsi); tsi_next (&tsi))
{
- tree stmt = bsi_stmt (bsi);
+ tree stmt = tsi_stmt (tsi);
basic_block new_bb;
if (!stmt)