diff options
author | Nikita Popov <npopov@redhat.com> | 2022-02-25 11:30:01 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2022-03-07 09:46:20 +0100 |
commit | d1e880acaa6f096618fa09d18daf17b9300558fc (patch) | |
tree | 9818a467729da3154f6441ea9e3e7a38249d87d2 /llvm/lib/Transforms/Scalar/LoopPassManager.cpp | |
parent | ef193a7a7c865254dfa726a07711423d2b5c69f7 (diff) | |
download | llvm-d1e880acaa6f096618fa09d18daf17b9300558fc.zip llvm-d1e880acaa6f096618fa09d18daf17b9300558fc.tar.gz llvm-d1e880acaa6f096618fa09d18daf17b9300558fc.tar.bz2 |
[SCEV] Enable verification in LoopPM
Currently, we hardly ever actually run SCEV verification, even in
tests with -verify-scev. This is because the NewPM LPM does not
verify SCEV. The reason for this is that SCEV verification can
actually change the result of subsequent SCEV queries, which means
that you see different transformations depending on whether
verification is enabled or not.
To allow verification in the LPM, this limits verification to
BECounts that have actually been cached. It will not calculate
new BECounts.
BackedgeTakenInfo::getExact() is still not entirely readonly,
it still calls getUMinFromMismatchedTypes(). But I hope that this
is not problematic in the same way. (This could be avoided by
performing the umin in the other SCEV instance, but this would
require duplicating some of the code.)
Differential Revision: https://reviews.llvm.org/D120551
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopPassManager.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopPassManager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopPassManager.cpp b/llvm/lib/Transforms/Scalar/LoopPassManager.cpp index 3238b88..d20d275 100644 --- a/llvm/lib/Transforms/Scalar/LoopPassManager.cpp +++ b/llvm/lib/Transforms/Scalar/LoopPassManager.cpp @@ -309,12 +309,12 @@ PreservedAnalyses FunctionToLoopPassAdaptor::run(Function &F, #ifndef NDEBUG // LoopAnalysisResults should always be valid. - // Note that we don't LAR.SE.verify() because that can change observed SE - // queries. See PR44815. if (VerifyDomInfo) LAR.DT.verify(); if (VerifyLoopInfo) LAR.LI.verify(LAR.DT); + if (VerifySCEV) + LAR.SE.verify(); if (LAR.MSSA && VerifyMemorySSA) LAR.MSSA->verifyMemorySSA(); #endif |