From 63c6ab3ab001856f14c3113f97876690677e287d Mon Sep 17 00:00:00 2001 From: steven Date: Wed, 17 Nov 2004 10:47:07 +0000 Subject: [PATCH] * tree-ssa-propagate.c (cfg_blocks_add) Assert we're not trying to insert the exit or entry block. (ssa_prop_init): Use add_control_edge to seed the algorithm. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90802 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/tree-ssa-propagate.c | 14 +++----------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 19ebe9f9876..932744504a1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-11-17 Steven Bosscher + + * tree-ssa-propagate.c (cfg_blocks_add) Assert we're not trying + to insert the exit or entry block. + (ssa_prop_init): Use add_control_edge to seed the algorithm. + 2004-11-16 Zack Weinberg * mkmap-flat.awk, mkmap-symver.awk: If the last version diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c index 6fab4f46242..29d3fd3c489 100644 --- a/gcc/tree-ssa-propagate.c +++ b/gcc/tree-ssa-propagate.c @@ -172,14 +172,12 @@ cfg_blocks_empty_p (void) /* Add a basic block to the worklist. The block must not be already - in the worklist. */ + in the worklist, and it must not be the ENTRY or EXIT block. */ static void cfg_blocks_add (basic_block bb) { - if (bb == ENTRY_BLOCK_PTR || bb == EXIT_BLOCK_PTR) - return; - + gcc_assert (bb != ENTRY_BLOCK_PTR && bb != EXIT_BLOCK_PTR); gcc_assert (!TEST_BIT (bb_in_list, bb->index)); if (cfg_blocks_empty_p ()) @@ -494,13 +492,7 @@ ssa_prop_init (void) /* Seed the algorithm by adding the successors of the entry block to the edge worklist. */ FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs) - { - if (e->dest != EXIT_BLOCK_PTR) - { - e->flags |= EDGE_EXECUTABLE; - cfg_blocks_add (e->dest); - } - } + add_control_edge (e); } -- 2.11.0