summaryrefslogtreecommitdiff
path: root/gcc/loop-init.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2015-04-23 08:30:04 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2015-04-23 08:30:04 +0000
commit1ebce84937e54f18d49fe2722848be2de021957e (patch)
treeeffc3756d6b4a06c5169abcd4a1c65749373e202 /gcc/loop-init.c
parente95d0248daced44bf127beded55b18633fa8b5b1 (diff)
downloadgcc-1ebce84937e54f18d49fe2722848be2de021957e.tar.gz
2015-04-23 Richard Biener <rguenther@suse.de>
* cfgexpand.c (expand_gimple_stmt_1): Use ops.code. * cfgloop.c (verify_loop_structure): Verify the root loop node. * except.c (duplicate_eh_regions): Call get_eh_region_from_lp_number_fn instead of get_eh_region_from_lp_number. * loop-init.c (fix_loop_structure): If we removed a loop, reset the SCEV cache. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222353 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-init.c')
-rw-r--r--gcc/loop-init.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/loop-init.c b/gcc/loop-init.c
index c13d360fb5a..87e58ea677d 100644
--- a/gcc/loop-init.c
+++ b/gcc/loop-init.c
@@ -49,6 +49,7 @@ along with GCC; see the file COPYING3. If not see
#include "ggc.h"
#include "tree-ssa-loop-niter.h"
#include "loop-unroll.h"
+#include "tree-scalar-evolution.h"
/* Apply FLAGS to the loop state. */
@@ -221,6 +222,9 @@ fix_loop_structure (bitmap changed_bbs)
timevar_push (TV_LOOP_INIT);
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ fprintf (dump_file, "fix_loop_structure: fixing up loops for function\n");
+
/* We need exact and fast dominance info to be available. */
gcc_assert (dom_info_state (CDI_DOMINATORS) == DOM_OK);
@@ -290,6 +294,7 @@ fix_loop_structure (bitmap changed_bbs)
}
/* Finally free deleted loops. */
+ bool any_deleted = false;
FOR_EACH_VEC_ELT (*get_loops (cfun), i, loop)
if (loop && loop->header == NULL)
{
@@ -322,8 +327,14 @@ fix_loop_structure (bitmap changed_bbs)
}
(*get_loops (cfun))[i] = NULL;
flow_loop_free (loop);
+ any_deleted = true;
}
+ /* If we deleted loops then the cached scalar evolutions refering to
+ those loops become invalid. */
+ if (any_deleted && scev_initialized_p ())
+ scev_reset_htab ();
+
loops_state_clear (LOOPS_NEED_FIXUP);
/* Apply flags to loops. */