Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit df8b022

Browse files
committed
[LCSSA] Add expensive verification of LCSSA form for sub-loops.
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. Reviewers: davide, efriedma, mzolotukhin Reviewed By: davide Differential Revision: https://reviews.llvm.org/D56921 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352958 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 5cbc524 commit df8b022

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/Transforms/Utils/LCSSA.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,12 @@ bool llvm::formLCSSA(Loop &L, DominatorTree &DT, LoopInfo *LI,
305305
ScalarEvolution *SE) {
306306
bool Changed = false;
307307

308+
#ifdef EXPENSIVE_CHECKS
309+
// Verify all sub-loops are in LCSSA form already.
310+
for (Loop *SubLoop: L)
311+
assert(SubLoop->isRecursivelyLCSSAForm(DT, *LI) && "Subloop not in LCSSA!");
312+
#endif
313+
308314
SmallVector<BasicBlock *, 8> ExitBlocks;
309315
L.getExitBlocks(ExitBlocks);
310316
if (ExitBlocks.empty())

0 commit comments

Comments
 (0)