diff options
author | Nikita Popov <npopov@redhat.com> | 2023-04-27 11:36:21 +0200 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2023-04-28 12:17:26 +0200 |
commit | 0aed0dbec2434d9d1a41266be009e56cc964633b (patch) | |
tree | 4cea585999bae56a5946d4fa399a8d1e1b07fa0b /llvm/lib/Transforms/Utils/LCSSA.cpp | |
parent | 575fdea70a86f68b0d303a9a3273fc47f810628a (diff) | |
download | llvm-0aed0dbec2434d9d1a41266be009e56cc964633b.zip llvm-0aed0dbec2434d9d1a41266be009e56cc964633b.tar.gz llvm-0aed0dbec2434d9d1a41266be009e56cc964633b.tar.bz2 |
[LCSSA] Don't invalidate entire loop in SCEV
We already invalidate each individual instruction for which LCSSA
is formed in formLCSSAForInstructions(), so I don't see a reason
why we would need to invalidate the entire loop on top of that.
I believe we also no longer need the instruction-level invalidation
now that SCEV looks through LCSSA phis, but I'll leave that for a
separate patch, as it's less obvious.
Differential Revision: https://reviews.llvm.org/D149331
Diffstat (limited to 'llvm/lib/Transforms/Utils/LCSSA.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LCSSA.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Utils/LCSSA.cpp b/llvm/lib/Transforms/Utils/LCSSA.cpp index af79dc4..4b006f5 100644 --- a/llvm/lib/Transforms/Utils/LCSSA.cpp +++ b/llvm/lib/Transforms/Utils/LCSSA.cpp @@ -395,12 +395,6 @@ bool llvm::formLCSSA(Loop &L, const DominatorTree &DT, const LoopInfo *LI, IRBuilder<> Builder(L.getHeader()->getContext()); Changed = formLCSSAForInstructions(Worklist, DT, *LI, SE, Builder); - // If we modified the code, remove any caches about the loop from SCEV to - // avoid dangling entries. - // FIXME: This is a big hammer, can we clear the cache more selectively? - if (SE && Changed) - SE->forgetLoop(&L); - assert(L.isLCSSAForm(DT)); return Changed; |