forked from OSchip/llvm-project
IndVarSimplify: Adapt to changes in LLVM trunk
Contributed-By: Andrew Trick <atrick@apple.com> llvm-svn: 153317
This commit is contained in:
parent
d1f12db70e
commit
d87492bb8c
|
@ -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());
|
||||||
|
|
Loading…
Reference in New Issue