Commit 39850c0b by Steven Bosscher Committed by 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.

From-SVN: r90802
parent e9fb72e8
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> 2004-11-16 Zack Weinberg <zack@codesourcery.com>
* mkmap-flat.awk, mkmap-symver.awk: If the last version * mkmap-flat.awk, mkmap-symver.awk: If the last version
......
...@@ -172,14 +172,12 @@ cfg_blocks_empty_p (void) ...@@ -172,14 +172,12 @@ cfg_blocks_empty_p (void)
/* Add a basic block to the worklist. The block must not be already /* 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 static void
cfg_blocks_add (basic_block bb) cfg_blocks_add (basic_block bb)
{ {
if (bb == ENTRY_BLOCK_PTR || bb == EXIT_BLOCK_PTR) gcc_assert (bb != ENTRY_BLOCK_PTR && bb != EXIT_BLOCK_PTR);
return;
gcc_assert (!TEST_BIT (bb_in_list, bb->index)); gcc_assert (!TEST_BIT (bb_in_list, bb->index));
if (cfg_blocks_empty_p ()) if (cfg_blocks_empty_p ())
...@@ -494,13 +492,7 @@ ssa_prop_init (void) ...@@ -494,13 +492,7 @@ ssa_prop_init (void)
/* Seed the algorithm by adding the successors of the entry block to the /* Seed the algorithm by adding the successors of the entry block to the
edge worklist. */ edge worklist. */
FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs) FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
{ add_control_edge (e);
if (e->dest != EXIT_BLOCK_PTR)
{
e->flags |= EDGE_EXECUTABLE;
cfg_blocks_add (e->dest);
}
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment