summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-propagate.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-17 10:47:07 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-17 10:47:07 +0000
commit63c6ab3ab001856f14c3113f97876690677e287d (patch)
tree7a6e05646de7e3f138ad1860df6c733efa101475 /gcc/tree-ssa-propagate.c
parent5712dd7d701141a2862027dcc5fee5a058d32422 (diff)
downloadgcc-63c6ab3ab001856f14c3113f97876690677e287d.tar.gz
* 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
Diffstat (limited to 'gcc/tree-ssa-propagate.c')
-rw-r--r--gcc/tree-ssa-propagate.c14
1 files changed, 3 insertions, 11 deletions
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);
}