diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-06 09:05:58 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-06 09:05:58 +0000 |
commit | a490a493a2a075b2ee06af6bb9b48139a5bc3cf1 (patch) | |
tree | dad0e8d38805913fe334995e506eaac1d8d4144d /gcc/domwalk.c | |
parent | be738b41523c4e073a99ad7ea9423a5bca4bf42b (diff) | |
download | gcc-a490a493a2a075b2ee06af6bb9b48139a5bc3cf1.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128180 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/domwalk.c')
-rw-r--r-- | gcc/domwalk.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/domwalk.c b/gcc/domwalk.c index a58437ec27c..fb7f0729d3d 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 |