public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] reset the SCEV htab after FRE in loop pipeline
@ 2021-01-08 13:40 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2021-01-08 13:40 UTC (permalink / raw)
  To: gcc-patches

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.

Bootstrap & regtest pending on x86_64-unknown-linux-gnu.

2021-01-08  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.c (pass_fre::execute): Reset the SCEV hash table.
---
 gcc/tree-ssa-sccvn.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index 17016853a34..0ba846f0be2 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)
-- 
2.26.2

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-08 13:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-08 13:40 [PATCH] reset the SCEV htab after FRE in loop pipeline Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).