summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
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
commitf8b09d424d8205e5bbfad858487b96cf8c99d4c3 (patch)
treee1c6c54db75cc4cd1a5fe424008b02e160624121 /llvm/lib/CodeGen
parent39c16d445e8e3699d42b6f5c243559a63d789451 (diff)
downloadbcm5719-llvm-f8b09d424d8205e5bbfad858487b96cf8c99d4c3.tar.gz
bcm5719-llvm-f8b09d424d8205e5bbfad858487b96cf8c99d4c3.zip
Fix a end() dereference; remove an abort() that wasn't meant to be left in.
llvm-svn: 58072
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/PreAllocSplitting.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/PreAllocSplitting.cpp b/llvm/lib/CodeGen/PreAllocSplitting.cpp
index 498600f37b4..37d0df1139d 100644
--- a/llvm/lib/CodeGen/PreAllocSplitting.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud