Fix the bug that broke the nightly tester in McCat/18-imp last night. :(
llvm-svn: 7925
This commit is contained in:
parent
61b05eaeec
commit
c01f05f4be
|
@ -220,15 +220,15 @@ Loop *LoopInfo::ConsiderForLoop(BasicBlock *BB, const DominatorSet &DS) {
|
||||||
if (BlockLoop == 0) { // Child block not processed yet...
|
if (BlockLoop == 0) { // Child block not processed yet...
|
||||||
BlockLoop = Child;
|
BlockLoop = Child;
|
||||||
} else if (BlockLoop != Child) {
|
} else if (BlockLoop != Child) {
|
||||||
|
Loop *SubLoop = BlockLoop;
|
||||||
|
// Reparent all of the blocks which used to belong to BlockLoops
|
||||||
|
for (unsigned j = 0, e = SubLoop->Blocks.size(); j != e; ++j)
|
||||||
|
ContainingLoops[SubLoop->Blocks[j]] = Child;
|
||||||
|
|
||||||
// There is already a loop which contains this block, that means
|
// There is already a loop which contains this block, that means
|
||||||
// that we should reparent the loop which the block is currently
|
// that we should reparent the loop which the block is currently
|
||||||
// considered to belong to to be a child of this loop.
|
// considered to belong to to be a child of this loop.
|
||||||
MoveSiblingLoopInto(BlockLoop, Child);
|
MoveSiblingLoopInto(SubLoop, Child);
|
||||||
|
|
||||||
// Reparent all of the blocks which used to belong to BlockLoops
|
|
||||||
for (unsigned j = 0, e = BlockLoop->Blocks.size(); j != e; ++j)
|
|
||||||
ContainingLoops[BlockLoop->Blocks[j]] = Child;
|
|
||||||
|
|
||||||
--i; // We just shrunk the SubLoops list.
|
--i; // We just shrunk the SubLoops list.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue