IndVarSimplify: Adapt to changes in LLVM trunk

Contributed-By: Andrew Trick <atrick@apple.com>
llvm-svn: 153317
This commit is contained in:
Tobias Grosser 2012-03-23 08:02:15 +00:00
parent d1f12db70e
commit d87492bb8c
1 changed files with 4 additions and 9 deletions

View File

@ -447,10 +447,8 @@ void PollyIndVarSimplify::HandleFloatingPointIV(Loop *L, PHINode *PN) {
} }
// Add a new IVUsers entry for the newly-created integer PHI. // Add a new IVUsers entry for the newly-created integer PHI.
if (IU) { if (IU)
SmallPtrSet<Loop*,16> SimpleLoopNests; IU->AddUsersIfInteresting(NewPHI);
IU->AddUsersIfInteresting(NewPHI, SimpleLoopNests);
}
Changed = true; Changed = true;
} }
@ -1969,11 +1967,8 @@ bool PollyIndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) {
// loop exit test instruction. // loop exit test instruction.
if (IU && NewICmp) { if (IU && NewICmp) {
ICmpInst *NewICmpInst = dyn_cast<ICmpInst>(NewICmp); ICmpInst *NewICmpInst = dyn_cast<ICmpInst>(NewICmp);
if (NewICmpInst) { if (NewICmpInst)
SmallPtrSet<Loop*,16> SimpleLoopNests; IU->AddUsersIfInteresting(cast<Instruction>(NewICmpInst->getOperand(0)));
IU->AddUsersIfInteresting(cast<Instruction>(NewICmpInst->getOperand(0)),
SimpleLoopNests);
}
} }
// Clean up dead instructions. // Clean up dead instructions.
Changed |= DeleteDeadPHIs(L->getHeader()); Changed |= DeleteDeadPHIs(L->getHeader());