Instruction *NSplitCond = BinaryOperator::create(Instruction::And,
C1, C2, "lisplit", Terminator);
SplitCondition->replaceAllUsesWith(NSplitCond);
- SplitCondition->removeFromParent();
- delete SplitCondition;
+ SplitCondition->eraseFromParent();
// As a first step to break this loop, remove Latch to Header edge.
BasicBlock *LatchSucc = NULL;
continue;
I->replaceAllUsesWith(UndefValue::get(I->getType()));
- I->removeFromParent();
- delete I;
+ I->eraseFromParent();
}
LPM.deleteLoopFromQueue(L);