[llvm-commits] [llvm] r49060 - /llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp
Tanya Lattner
tonic at nondot.org
Tue Apr 1 16:41:44 PDT 2008
Author: tbrethou
Date: Tue Apr 1 18:41:44 2008
New Revision: 49060
URL: http://llvm.org/viewvc/llvm-project?rev=49060&view=rev
Log:
Reverting 49056 due to the build being broken.
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=49060&r1=49059&r2=49060&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp Tue Apr 1 18:41:44 2008
@@ -232,8 +232,8 @@
return false;
// First see if it is possible to eliminate loop itself or not.
- for (SmallVector<SplitInfo, 4>::iterator SI = SplitData.begin();
- SI != SplitData.end();) {
+ for (SmallVector<SplitInfo, 4>::iterator SI = SplitData.begin(),
+ E = SplitData.end(); SI != E;) {
SplitInfo &SD = *SI;
ICmpInst *CI = dyn_cast<ICmpInst>(SD.SplitCondition);
if (SD.SplitCondition->getOpcode() == Instruction::And) {
@@ -244,7 +244,8 @@
return Changed;
} else {
SmallVector<SplitInfo, 4>::iterator Delete_SI = SI;
- SI = SplitData.erase(Delete_SI);
+ ++SI;
+ SplitData.erase(Delete_SI);
}
}
else if (CI && CI->getPredicate() == ICmpInst::ICMP_EQ) {
@@ -255,7 +256,8 @@
return Changed;
} else {
SmallVector<SplitInfo, 4>::iterator Delete_SI = SI;
- SI = SplitData.erase(Delete_SI);
+ ++SI;
+ SplitData.erase(Delete_SI);
}
} else
++SI;
More information about the llvm-commits
mailing list