From: Richard Biener <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] more SCEV cache clearing
Date: Wed, 29 Jul 2020 12:35:52 +0200 (CEST) [thread overview]
Message-ID: <nycvar.YFH.7.76.2007291235360.9963@zhemvz.fhfr.qr> (raw)
This fixes two more places, in loop interchange and in the
vectorizer where the SCEV verifier sees stale entries.
Boostrapped/tested on x86_64-unknown-linux-gnu, pushed.
2020-07-29 Richard Biener <rguenther@suse.de>
* tree-vectorizer.c (vectorize_loops): Reset the SCEV
cache if we removed any SIMD UID SSA defs.
* gimple-loop-interchange.cc (pass_linterchange::execute):
Reset the scev cache if we interchanged a loop.
---
gcc/gimple-loop-interchange.cc | 2 ++
gcc/tree-vectorizer.c | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/gcc/gimple-loop-interchange.cc b/gcc/gimple-loop-interchange.cc
index 2379848808f..1656004ecf0 100644
--- a/gcc/gimple-loop-interchange.cc
+++ b/gcc/gimple-loop-interchange.cc
@@ -2084,6 +2084,8 @@ pass_linterchange::execute (function *fun)
loop_nest.release ();
}
+ if (changed_p)
+ scev_reset ();
return changed_p ? (TODO_update_ssa_only_virtuals) : 0;
}
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index 26a184696aa..2a60d37bb87 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -1283,7 +1283,11 @@ vectorize_loops (void)
/* Fold IFN_GOMP_SIMD_{VF,LANE,LAST_LANE,ORDERED_{START,END}} builtins. */
if (cfun->has_simduid_loops)
- adjust_simduid_builtins (simduid_to_vf_htab);
+ {
+ adjust_simduid_builtins (simduid_to_vf_htab);
+ /* Avoid stale SCEV cache entries for the SIMD_LANE defs. */
+ scev_reset ();
+ }
/* Shrink any "omp array simd" temporary arrays to the
actual vectorization factors. */
--
2.26.2
reply other threads:[~2020-07-29 10:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nycvar.YFH.7.76.2007291235360.9963@zhemvz.fhfr.qr \
--to=rguenther@suse.de \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).