aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/PreAllocSplitting.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-10-24 05:53:44 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-10-24 05:53:44 +0000
commit2efe3fd79a751eabe1664109a004af45dca99274 (patch)
tree25e450e93555b4361176759c35a88463cfa280da /lib/CodeGen/PreAllocSplitting.cpp
parent79cce5c51baf9381a757228ea7509c90401c2ebb (diff)
downloadexternal_llvm-2efe3fd79a751eabe1664109a004af45dca99274.zip
external_llvm-2efe3fd79a751eabe1664109a004af45dca99274.tar.gz
external_llvm-2efe3fd79a751eabe1664109a004af45dca99274.tar.bz2
Fix a end() dereference; remove an abort() that wasn't meant to be left in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58072 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PreAllocSplitting.cpp')
-rw-r--r--lib/CodeGen/PreAllocSplitting.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/CodeGen/PreAllocSplitting.cpp b/lib/CodeGen/PreAllocSplitting.cpp
index 498600f..37d0df1 100644
--- a/lib/CodeGen/PreAllocSplitting.cpp
+++ b/lib/CodeGen/PreAllocSplitting.cpp
@@ -381,13 +381,13 @@ PreAllocSplitting::ShrinkWrapToLastUse(MachineBasicBlock *MBB,
LastMO = Uses[0];
LastMI = LastMO->getParent();
} else {
+ MachineBasicBlock::iterator MEE = MBB->begin();
MachineBasicBlock::iterator MII;
- if (MBB == BarrierMBB) {
+ if (MBB == BarrierMBB)
MII = Barrier;
- --MII;
- } else
+ else
MII = MBB->end();
- for (MachineBasicBlock::iterator MEE = MBB->begin(); MII != MEE; --MII) {
+ while (--MII != MEE) {
MachineInstr *UseMI = &*MII;
if (!UseMIs.count(UseMI))
continue;
@@ -460,7 +460,6 @@ PreAllocSplitting::ShrinkWrapLiveInterval(VNInfo *ValNo,
} else {
// Remove entire live range of the bb out of the live interval.
CurrLI->removeRange(LIs->getMBBStartIdx(MBB), LIs->getMBBEndIdx(MBB)+1);
- abort(); // FIXME
}
if (MBB == DefMBB)