diff options
author | Richard Biener <rguenther@suse.de> | 2016-08-11 08:49:56 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-08-11 08:49:56 +0000 |
commit | bb7ebad1c0f641753ffb60a22d2f3c546c406e1b (patch) | |
tree | 96bdae5b59a4b3af8514e48519f238d75d480175 /gcc/tree-ssa-threadbackward.c | |
parent | 7d188edd736820008bc161a200ebd92eba29a716 (diff) | |
download | gcc-bb7ebad1c0f641753ffb60a22d2f3c546c406e1b.zip gcc-bb7ebad1c0f641753ffb60a22d2f3c546c406e1b.tar.gz gcc-bb7ebad1c0f641753ffb60a22d2f3c546c406e1b.tar.bz2 |
tree-ssa-threadbackward.c (pass_data_thread_jumps): Remove unconditional TODO_cleanup_cfg.
2016-08-11 Richard Biener <rguenther@suse.de>
* tree-ssa-threadbackward.c (pass_data_thread_jumps): Remove
unconditional TODO_cleanup_cfg.
(pass_thread_jumps::execute): Initialize loops, perform a CFG
cleanup only if we threaded a jump.
* gcc.dg/tree-ssa/ssa-dom-thread-7.c: Adjust.
From-SVN: r239355
Diffstat (limited to 'gcc/tree-ssa-threadbackward.c')
-rw-r--r-- | gcc/tree-ssa-threadbackward.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/tree-ssa-threadbackward.c b/gcc/tree-ssa-threadbackward.c index e05669f..506078f 100644 --- a/gcc/tree-ssa-threadbackward.c +++ b/gcc/tree-ssa-threadbackward.c @@ -674,7 +674,7 @@ const pass_data pass_data_thread_jumps = 0, 0, 0, - ( TODO_cleanup_cfg | TODO_update_ssa ), + TODO_update_ssa, }; class pass_thread_jumps : public gimple_opt_pass @@ -699,6 +699,8 @@ pass_thread_jumps::gate (function *fun ATTRIBUTE_UNUSED) unsigned int pass_thread_jumps::execute (function *fun) { + loop_optimizer_init (LOOPS_HAVE_PREHEADERS | LOOPS_HAVE_SIMPLE_LATCHES); + /* Try to thread each block with more than one successor. */ basic_block bb; FOR_EACH_BB_FN (bb, fun) @@ -706,8 +708,10 @@ pass_thread_jumps::execute (function *fun) if (EDGE_COUNT (bb->succs) > 1) find_jump_threads_backwards (bb); } - thread_through_all_blocks (true); - return 0; + bool changed = thread_through_all_blocks (true); + + loop_optimizer_finalize (); + return changed ? TODO_cleanup_cfg : 0; } } |