[llvm-commits] [llvm-gcc-4.2] r42409 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Devang Patel
dpatel at apple.com
Thu Sep 27 11:21:49 PDT 2007
Author: dpatel
Date: Thu Sep 27 13:21:48 2007
New Revision: 42409
URL: http://llvm.org/viewvc/llvm-project?rev=42409&view=rev
Log:
While searching for appropriate place for temporaries, do not over-increment interator.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=42409&r1=42408&r2=42409&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Thu Sep 27 13:21:48 2007
@@ -2463,6 +2463,7 @@
CI != E; ++CI) {
if (&*CI == AllocaInsertionPoint) {
InsertPt = AllocaInsertionPoint;
+ ++InsertPt;
break;
}
}
@@ -2473,12 +2474,14 @@
InsertPt = II->getNormalDest()->begin();
while (isa<PHINode>(InsertPt))
++InsertPt;
- }
+ } else
+ ++InsertPt; // Insert after the init instruction.
} else {
InsertPt = AllocaInsertionPoint; // Insert after the allocas.
+ ++InsertPt;
}
BasicBlock *BB = InsertPt->getParent();
- BB->getInstList().insert(++InsertPt, SI);
+ BB->getInstList().insert(InsertPt, SI);
// Finally, This is no longer a GCC temporary.
DECL_GIMPLE_FORMAL_TEMP_P(Var) = 0;
More information about the llvm-commits
mailing list