diff options
Diffstat (limited to 'gcc/loop-init.c')
-rw-r--r-- | gcc/loop-init.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/loop-init.c b/gcc/loop-init.c index 401e528..ac87daf 100644 --- a/gcc/loop-init.c +++ b/gcc/loop-init.c @@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-ssa-loop-niter.h" #include "loop-unroll.h" #include "tree-scalar-evolution.h" +#include "tree-cfgcleanup.h" /* Apply FLAGS to the loop state. */ @@ -133,13 +134,19 @@ loop_optimizer_init (unsigned flags) /* Finalize loop structures. */ void -loop_optimizer_finalize (struct function *fn) +loop_optimizer_finalize (struct function *fn, bool clean_loop_closed_phi) { class loop *loop; basic_block bb; timevar_push (TV_LOOP_FINI); + if (clean_loop_closed_phi && loops_state_satisfies_p (fn, LOOP_CLOSED_SSA)) + { + clean_up_loop_closed_phi (fn); + loops_state_clear (fn, LOOP_CLOSED_SSA); + } + if (loops_state_satisfies_p (fn, LOOPS_HAVE_RECORDED_EXITS)) release_recorded_exits (fn); |