diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2008-05-18 22:36:30 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2008-05-18 22:36:30 +0000 |
commit | 45a7844faf66271c1b2491d2931aa761c80c2f90 (patch) | |
tree | f1da280155d74a0224de267e7b4f026be9c8d18c /gcc/tree-ssa-dom.c | |
parent | f76257660862749a706a6c0d2181811a234e51cf (diff) | |
download | gcc-45a7844faf66271c1b2491d2931aa761c80c2f90.zip gcc-45a7844faf66271c1b2491d2931aa761c80c2f90.tar.gz gcc-45a7844faf66271c1b2491d2931aa761c80c2f90.tar.bz2 |
tree-ssa-dom.c (tree_ssa_dominator_optimize): If some blocks need EH cleanup at the end of the pass...
* tree-ssa-dom.c (tree_ssa_dominator_optimize): If some blocks need
EH cleanup at the end of the pass, search for those that have been
turned into forwarder blocks and do the cleanup on their successor.
From-SVN: r135514
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r-- | gcc/tree-ssa-dom.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index 909bfeb..c4145b3 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -319,6 +319,23 @@ tree_ssa_dominator_optimize (void) such edges from the CFG as needed. */ if (!bitmap_empty_p (need_eh_cleanup)) { + unsigned i; + bitmap_iterator bi; + + /* Jump threading may have created forwarder blocks from blocks + needing EH cleanup; the new successor of these blocks, which + has inherited from the original block, needs the cleanup. */ + EXECUTE_IF_SET_IN_BITMAP (need_eh_cleanup, 0, i, bi) + { + basic_block bb = BASIC_BLOCK (i); + if (single_succ_p (bb) == 1 + && (single_succ_edge (bb)->flags & EDGE_EH) == 0) + { + bitmap_clear_bit (need_eh_cleanup, i); + bitmap_set_bit (need_eh_cleanup, single_succ (bb)->index); + } + } + tree_purge_all_dead_eh_edges (need_eh_cleanup); bitmap_zero (need_eh_cleanup); } |