+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
/* 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 ())
/* 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);
}