[PATCH] D134531: [SCEV] Verify block disposition cache.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 10 12:42:51 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4b599fa1ee24: [SCEV] Verify block disposition cache. (authored by fhahn).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134531/new/
https://reviews.llvm.org/D134531
Files:
llvm/lib/Analysis/ScalarEvolution.cpp
Index: llvm/lib/Analysis/ScalarEvolution.cpp
===================================================================
--- llvm/lib/Analysis/ScalarEvolution.cpp
+++ llvm/lib/Analysis/ScalarEvolution.cpp
@@ -14021,6 +14021,22 @@
}
}
}
+
+ // Verify integrity of the block disposition cache.
+ for (const auto &It : BlockDispositions) {
+ const SCEV *S = It.first;
+ auto &Values = It.second;
+ for (auto &V : Values) {
+ auto CachedDisposition = V.getInt();
+ const BasicBlock *BB = V.getPointer();
+ const auto RecomputedDisposition = SE2.getBlockDisposition(S, BB);
+ if (CachedDisposition != RecomputedDisposition) {
+ dbgs() << "Cached disposition of " << *S << " for block %"
+ << BB->getName() << " is incorrect! \n";
+ std::abort();
+ }
+ }
+ }
}
bool ScalarEvolution::invalidate(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134531.466590.patch
Type: text/x-patch
Size: 868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221010/50c34376/attachment.bin>
More information about the llvm-commits
mailing list