use the LI ivar.

llvm-svn: 123068
This commit is contained in:
Chris Lattner 2011-01-08 17:49:51 +00:00
parent 385f2ec6d8
commit d62691f4e8
1 changed files with 2 additions and 3 deletions

View File

@ -328,9 +328,8 @@ void LoopRotate::preserveCanonicalLoopForm(Loop *L, BasicBlock *OrigHeader,
BasicBlock *NewPreHeader =
BasicBlock::Create(OrigHeader->getContext(), "bb.nph",
OrigHeader->getParent(), NewHeader);
LoopInfo &LI = getAnalysis<LoopInfo>();
if (Loop *PL = LI.getLoopFor(OrigPreHeader))
PL->addBasicBlockToLoop(NewPreHeader, LI.getBase());
if (Loop *PL = LI->getLoopFor(OrigPreHeader))
PL->addBasicBlockToLoop(NewPreHeader, LI->getBase());
BranchInst::Create(NewHeader, NewPreHeader);
BranchInst *OrigPH_BI = cast<BranchInst>(OrigPreHeader->getTerminator());