* tree-ssa-propagate.c (cfg_blocks_add) Assert we're not trying
authorSteven Bosscher <stevenb@suse.de>
Wed, 17 Nov 2004 10:47:07 +0000 (10:47 +0000)
committerSteven Bosscher <steven@gcc.gnu.org>
Wed, 17 Nov 2004 10:47:07 +0000 (10:47 +0000)
to insert the exit or entry block.
(ssa_prop_init): Use add_control_edge to seed the algorithm.

From-SVN: r90802

gcc/ChangeLog
gcc/tree-ssa-propagate.c

index 19ebe9f98763d3cb32d2605f8977633c08263332..932744504a116cdf77faa386ff4f85da39ba796d 100644 (file)
@@ -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
index 6fab4f46242caae3f6cef12d0924e2b3c24fda47..29d3fd3c4896245ea46690e9e902ef011b4523be 100644 (file)
@@ -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);
 }