Make LoopInfoBase more generic, in preparation for having MachineLoopInfo. This involves a small interface change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44348 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp
index 21a4e23..73f5db0 100644
--- a/lib/Transforms/Utils/LoopSimplify.cpp
+++ b/lib/Transforms/Utils/LoopSimplify.cpp
@@ -380,7 +380,7 @@
// We know that we have loop information to update... update it now.
if (Loop *Parent = L->getParentLoop())
- Parent->addBasicBlockToLoop(NewBB, *LI);
+ Parent->addBasicBlockToLoop(NewBB, LI->getBase());
DT->splitBlock(NewBB);
if (DominanceFrontier *DF = getAnalysisToUpdate<DominanceFrontier>())
@@ -412,7 +412,7 @@
while (SuccLoop && !SuccLoop->contains(L->getHeader()))
SuccLoop = SuccLoop->getParentLoop();
if (SuccLoop)
- SuccLoop->addBasicBlockToLoop(NewBB, *LI);
+ SuccLoop->addBasicBlockToLoop(NewBB, LI->getBase());
// Update Dominator Information
DT->splitBlock(NewBB);
@@ -558,7 +558,7 @@
// This block is going to be our new header block: add it to this loop and all
// parent loops.
- NewOuter->addBasicBlockToLoop(NewBB, *LI);
+ NewOuter->addBasicBlockToLoop(NewBB, LI->getBase());
// L is now a subloop of our outer loop.
NewOuter->addChildLoop(L);
@@ -693,7 +693,7 @@
// Update Loop Information - we know that this block is now in the current
// loop and all parent loops.
- L->addBasicBlockToLoop(BEBlock, *LI);
+ L->addBasicBlockToLoop(BEBlock, LI->getBase());
// Update dominator information
DT->splitBlock(BEBlock);