mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
[LoopDeletion] Add an assert that verifies LCSSA
This is inspired by PR24804 -- had this assert been there before, isolating the root cause for PR24804 would have been far easier. llvm-svn: 261481
This commit is contained in:
parent
d168b044b1
commit
1d32ffd382
@ -122,6 +122,9 @@ bool LoopDeletion::runOnLoop(Loop *L, LPPassManager &) {
|
||||
if (skipOptnoneFunction(L))
|
||||
return false;
|
||||
|
||||
DominatorTree &DT = getAnalysis<DominatorTreeWrapperPass>().getDomTree();
|
||||
assert(L->isLCSSAForm(DT) && "Expected LCSSA!");
|
||||
|
||||
// We can only remove the loop if there is a preheader that we can
|
||||
// branch from after removing it.
|
||||
BasicBlock *preheader = L->getLoopPreheader();
|
||||
@ -194,7 +197,6 @@ bool LoopDeletion::runOnLoop(Loop *L, LPPassManager &) {
|
||||
|
||||
// Update the dominator tree and remove the instructions and blocks that will
|
||||
// be deleted from the reference counting scheme.
|
||||
DominatorTree &DT = getAnalysis<DominatorTreeWrapperPass>().getDomTree();
|
||||
SmallVector<DomTreeNode*, 8> ChildNodes;
|
||||
for (Loop::block_iterator LI = L->block_begin(), LE = L->block_end();
|
||||
LI != LE; ++LI) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user