forked from OSchip/llvm-project
[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 llvm-svn: 352958
This commit is contained in:
parent
44d6f9e131
commit
509b48a64a
|
@ -305,6 +305,12 @@ bool llvm::formLCSSA(Loop &L, DominatorTree &DT, LoopInfo *LI,
|
|||
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())
|
||||
|
|
Loading…
Reference in New Issue