aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-scalar-evolution.c
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2010-01-14 07:38:15 +0000
committerSebastian Pop <sebastian.pop@amd.com>2010-01-14 07:38:15 +0000
commite59713ceb0113d2d1079de4dff5ff5be04c52a0c (patch)
treee7d4749d1d7087c6a71839b545d5d0b794c4ca4d /gcc/tree-scalar-evolution.c
parent79f6dca699b16507f252f9341eac1863f05de813 (diff)
Fix PR42732.
2010-01-14 Sebastian Pop <sebastian.pop@amd.com> PR middle-end/42732 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and rename_nb_iterations. * sese.c (rename_variables_in_operand): New. (rename_variables_in_expr): New. (rename_nb_iterations): New. (sese_adjust_liveout_phis): Update the rename_map. * sese.h (rename_nb_iterations): Declared. * tree-scalar-evolution.c (scev_reset_htab): New. (scev_reset): Call scev_reset_htab. * tree-scalar-evolution.h (scev_reset_htab): Declared. * testsuite/gfortran.dg/graphite/pr42732.f: New. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@155881 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-scalar-evolution.c')
-rw-r--r--gcc/tree-scalar-evolution.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c
index 3ebc54e8556..4d8f85e5047 100644
--- a/gcc/tree-scalar-evolution.c
+++ b/gcc/tree-scalar-evolution.c
@@ -3033,7 +3033,20 @@ scev_initialize (void)
}
}
-/* Cleans up the information cached by the scalar evolutions analysis. */
+/* Cleans up the information cached by the scalar evolutions analysis
+ in the hash table. */
+
+void
+scev_reset_htab (void)
+{
+ if (!scalar_evolution_info)
+ return;
+
+ htab_empty (scalar_evolution_info);
+}
+
+/* Cleans up the information cached by the scalar evolutions analysis
+ in the hash table and in the loop->nb_iterations. */
void
scev_reset (void)
@@ -3041,10 +3054,11 @@ scev_reset (void)
loop_iterator li;
struct loop *loop;
- if (!scalar_evolution_info || !current_loops)
+ scev_reset_htab ();
+
+ if (!current_loops)
return;
- htab_empty (scalar_evolution_info);
FOR_EACH_LOOP (li, loop, 0)
{
loop->nb_iterations = NULL_TREE;