diff options
author | Richard Biener <rguenther@suse.de> | 2017-05-11 09:16:00 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2017-05-11 09:16:00 +0000 |
commit | 7581ce9a1ad6df9c8998a3c74256837a1ff6f7cc (patch) | |
tree | 9a8d993679a6f1ac8732484d5735bfcfde36a743 /gcc/tree-ssa-tail-merge.c | |
parent | 86b001e0012c26b3a39a65937ba949e2285fdd77 (diff) | |
download | gcc-7581ce9a1ad6df9c8998a3c74256837a1ff6f7cc.zip gcc-7581ce9a1ad6df9c8998a3c74256837a1ff6f7cc.tar.gz gcc-7581ce9a1ad6df9c8998a3c74256837a1ff6f7cc.tar.bz2 |
tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Skip unreachable blocks and destinations.
2017-05-11 Richard Biener <rguenther@suse.de>
* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
Skip unreachable blocks and destinations.
(eliminate): Move stmt removal and fixup ...
(fini_eliminate): ... here. Skip inserted exprs.
(pass_pre::execute): Move fini_pre after fini_eliminate.
* tree-ssa-tailmerge.c: Include tree-cfgcleanup.h.
(tail_merge_optimize): Run cleanup_tree_cfg if requested by
PRE to get rid of dead code that has invalid SSA form and
split critical edges again.
From-SVN: r247882
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. */ |