aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-scalar-evolution.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-scalar-evolution.c')
-rw-r--r--gcc/tree-scalar-evolution.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c
index cc80794..262ec76 100644
--- a/gcc/tree-scalar-evolution.c
+++ b/gcc/tree-scalar-evolution.c
@@ -2608,6 +2608,16 @@ scev_initialize (void)
}
}
+/* Clean the scalar evolution analysis cache, but preserve the cached
+ numbers of iterations for the loops. */
+
+void
+scev_reset_except_niters (void)
+{
+ if (scalar_evolution_info)
+ htab_empty (scalar_evolution_info);
+}
+
/* Cleans up the information cached by the scalar evolutions analysis. */
void
@@ -2619,7 +2629,8 @@ scev_reset (void)
if (!scalar_evolution_info || !current_loops)
return;
- htab_empty (scalar_evolution_info);
+ scev_reset_except_niters ();
+
FOR_EACH_LOOP (li, loop, 0)
{
loop->nb_iterations = NULL_TREE;