aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Bosscher <stevenb@suse.de>2004-11-17 10:47:07 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2004-11-17 10:47:07 +0000
commit39850c0b2ebea496afe282431e1c4c351416a2bc (patch)
tree7a6e05646de7e3f138ad1860df6c733efa101475
parente9fb72e85fc8c0c85e9b98a744d3b908901509ca (diff)
downloadgcc-39850c0b2ebea496afe282431e1c4c351416a2bc.zip
gcc-39850c0b2ebea496afe282431e1c4c351416a2bc.tar.gz
gcc-39850c0b2ebea496afe282431e1c4c351416a2bc.tar.bz2
* 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. From-SVN: r90802
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree-ssa-propagate.c14
2 files changed, 9 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 19ebe9f..9327445 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2004-11-17 Steven Bosscher <stevenb@suse.de>
+
+ * 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 <zack@codesourcery.com>
* 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 6fab4f4..29d3fd3 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);
}