aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-01-08 14:37:09 +0100
committerRichard Biener <rguenther@suse.de>2021-01-08 15:10:40 +0100
commit77a375a3ebf822914c19835ac690c67694c70bd0 (patch)
treeb20414ff63887d4ce9396d37757ef1c8f770f147 /gcc
parentb407f233d7c18534fbfe8f74af7f0232498fb0c4 (diff)
downloadgcc-77a375a3ebf822914c19835ac690c67694c70bd0.zip
gcc-77a375a3ebf822914c19835ac690c67694c70bd0.tar.gz
gcc-77a375a3ebf822914c19835ac690c67694c70bd0.tar.bz2
reset the SCEV htab after FRE in loop pipeline
When running FRE in the loop pipeline (as part of the conditionally scheduled scalar cleanups) we have to reset the SCEV hashtable as otherwise we can end up with stale entries and all sorts of problems. Catched by my out-of-tree verifier for this problem. 2021-01-08 Richard Biener <rguenther@suse.de> * tree-ssa-sccvn.c (pass_fre::execute): Reset the SCEV hash table.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/tree-ssa-sccvn.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index 1701685..0ba846f 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -7883,6 +7883,9 @@ pass_fre::execute (function *fun)
if (iterate_p)
loop_optimizer_finalize ();
+ if (scev_initialized_p ())
+ scev_reset_htab ();
+
/* For late FRE after IVOPTs and unrolling, see if we can
remove some TREE_ADDRESSABLE and rewrite stuff into SSA. */
if (!may_iterate)