[PATCH] D56921: [LCSSA] Add expensive verification of LCSSA form for sub-loops.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 18 09:56:16 PST 2019
fhahn created this revision.
fhahn added reviewers: davide, efriedma, mzolotukhin.
Herald added a subscriber: hiraditya.
This assertion makes sure all sub-loops are in LCSSA form before
bringing their parent in LCSSA form. This precondition was added to
formLCSSA in D56848 <https://reviews.llvm.org/D56848>.
https://reviews.llvm.org/D56921
Files:
llvm/lib/Transforms/Utils/LCSSA.cpp
Index: llvm/lib/Transforms/Utils/LCSSA.cpp
===================================================================
--- llvm/lib/Transforms/Utils/LCSSA.cpp
+++ llvm/lib/Transforms/Utils/LCSSA.cpp
@@ -306,6 +306,12 @@
ScalarEvolution *SE) {
bool Changed = false;
+#ifdef EXPENSIVE_CHECKS
+ // Verify all sub-loops are in LCSSA form already.
+ for (Loop *SubLoop: L)
+ assert(SubLoop->isRecursivelyLCSSAForm(DT, *LI) && "Subloop not in LCSSA!");
+#endif
+
SmallVector<BasicBlock *, 8> ExitBlocks;
L.getExitBlocks(ExitBlocks);
if (ExitBlocks.empty())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56921.182550.patch
Type: text/x-patch
Size: 584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190118/0e368239/attachment.bin>
More information about the llvm-commits
mailing list