diff options
Diffstat (limited to 'gcc/tree-ssa-tail-merge.c')
-rw-r--r-- | gcc/tree-ssa-tail-merge.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/tree-ssa-tail-merge.c b/gcc/tree-ssa-tail-merge.c index 71f874d..8765fdd 100644 --- a/gcc/tree-ssa-tail-merge.c +++ b/gcc/tree-ssa-tail-merge.c @@ -205,6 +205,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-ssa-sccvn.h" #include "cfgloop.h" #include "tree-eh.h" +#include "tree-cfgcleanup.h" /* Describes a group of bbs with the same successors. The successor bbs are cached in succs, and the successor edge flags are cached in succ_flags. @@ -1717,6 +1718,16 @@ tail_merge_optimize (unsigned int todo) timevar_push (TV_TREE_TAIL_MERGE); + /* We enter from PRE which has critical edges split. Elimination + does not process trivially dead code so cleanup the CFG if we + are told so. And re-split critical edges then. */ + if (todo & TODO_cleanup_cfg) + { + cleanup_tree_cfg (); + todo &= ~TODO_cleanup_cfg; + split_critical_edges (); + } + if (!dom_info_available_p (CDI_DOMINATORS)) { /* PRE can leave us with unreachable blocks, remove them now. */ |