aboutsummaryrefslogtreecommitdiff
path: root/gcc/domwalk.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2007-09-06 09:05:58 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2007-09-06 09:05:58 +0000
commit515f36ebd9df15ba503f02dbc77a32183ec03664 (patch)
treedad0e8d38805913fe334995e506eaac1d8d4144d /gcc/domwalk.c
parent47de45c6fc7adcf626af5499cb39b0ca43b870c3 (diff)
downloadgcc-515f36ebd9df15ba503f02dbc77a32183ec03664.zip
gcc-515f36ebd9df15ba503f02dbc77a32183ec03664.tar.gz
gcc-515f36ebd9df15ba503f02dbc77a32183ec03664.tar.bz2
re PR tree-optimization/33302 (dead-store not eliminated)
2007-09-06 Richard Guenther <rguenther@suse.de> PR tree-optimization/33302 * tree-ssa-dse.c (tree_ssa_dse): Connect infinite loops to the exit block before doing the post-dominator walk. * domwalk.c (walk_dominator_tree): The exit block is interesting even if it is not reachable. * gcc.dg/tree-ssa/ssa-dse-11.c: New testcase. From-SVN: r128180
Diffstat (limited to 'gcc/domwalk.c')
-rw-r--r--gcc/domwalk.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/domwalk.c b/gcc/domwalk.c
index a58437e..fb7f072 100644
--- a/gcc/domwalk.c
+++ b/gcc/domwalk.c
@@ -151,7 +151,9 @@ walk_dominator_tree (struct dom_walk_data *walk_data, basic_block bb)
while (true)
{
/* Don't worry about unreachable blocks. */
- if (EDGE_COUNT (bb->preds) > 0 || bb == ENTRY_BLOCK_PTR)
+ if (EDGE_COUNT (bb->preds) > 0
+ || bb == ENTRY_BLOCK_PTR
+ || bb == EXIT_BLOCK_PTR)
{
/* If block BB is not interesting to the caller, then none of the
callbacks that walk the statements in BB are going to be