[llvm-commits] [llvm] r40903 - /llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp
Devang Patel
dpatel at apple.com
Tue Aug 7 10:45:35 PDT 2007
Author: dpatel
Date: Tue Aug 7 12:45:35 2007
New Revision: 40903
URL: http://llvm.org/viewvc/llvm-project?rev=40903&view=rev
Log:
Use eraseFromParent().
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp?rev=40903&r1=40902&r2=40903&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp Tue Aug 7 12:45:35 2007
@@ -238,8 +238,7 @@
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;
@@ -263,8 +262,7 @@
continue;
I->replaceAllUsesWith(UndefValue::get(I->getType()));
- I->removeFromParent();
- delete I;
+ I->eraseFromParent();
}
LPM.deleteLoopFromQueue(L);
More information about the llvm-commits
mailing list