Skip to content

Commit

Permalink
Fix the bug that broke the nightly tester in McCat/18-imp last night. :(
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7925 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
lattner committed Aug 17, 2003
1 parent e2ce618 commit 169db9d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/Analysis/LoopInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,15 @@ Loop *LoopInfo::ConsiderForLoop(BasicBlock *BB, const DominatorSet &DS) {
if (BlockLoop == 0) { // Child block not processed yet...
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
// that we should reparent the loop which the block is currently
// considered to belong to to be a child of this loop.
MoveSiblingLoopInto(BlockLoop, 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;

MoveSiblingLoopInto(SubLoop, Child);
--i; // We just shrunk the SubLoops list.
}
}
Expand Down

0 comments on commit 169db9d

Please sign in to comment.