[llvm-commits] [llvm] r138473 - /llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
Bill Wendling
isanbard at gmail.com
Wed Aug 24 13:28:44 PDT 2011
Author: void
Date: Wed Aug 24 15:28:43 2011
New Revision: 138473
URL: http://llvm.org/viewvc/llvm-project?rev=138473&view=rev
Log:
Use getFirstInsertionPt instead of getFirstNonPHI so that it skips to the proper
insertion place.
Modified:
llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=138473&r1=138472&r2=138473&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Wed Aug 24 15:28:43 2011
@@ -456,7 +456,7 @@
// platforms.
if (WeakPH) {
Value *Conv = new SIToFPInst(NewPHI, PN->getType(), "indvar.conv",
- PN->getParent()->getFirstNonPHI());
+ PN->getParent()->getFirstInsertionPt());
PN->replaceAllUsesWith(Conv);
RecursivelyDeleteTriviallyDeadInstructions(PN);
}
@@ -1703,7 +1703,7 @@
BasicBlock *Preheader = L->getLoopPreheader();
if (!Preheader) return;
- Instruction *InsertPt = ExitBlock->getFirstNonPHI();
+ Instruction *InsertPt = ExitBlock->getFirstInsertionPt();
BasicBlock::iterator I = Preheader->getTerminator();
while (I != Preheader->begin()) {
--I;
@@ -1903,7 +1903,7 @@
// the end of the pass.
while (!OldCannIVs.empty()) {
PHINode *OldCannIV = OldCannIVs.pop_back_val();
- OldCannIV->insertBefore(L->getHeader()->getFirstNonPHI());
+ OldCannIV->insertBefore(L->getHeader()->getFirstInsertionPt());
}
}
else if (ExpandBECount && ReuseIVForExit && needsLFTR(L, DT)) {
More information about the llvm-commits
mailing list