summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-11-13 21:53:14 +0000
committerOwen Anderson <resistor@mac.com>2008-11-13 21:53:14 +0000
commitd36b4c1bf8924ff42f0f05729632f44f05eea044 (patch)
tree8a7cb72cdaa29258dceada6d09a272aef557e8f0 /llvm/lib/CodeGen
parentbee1ad97072ff3f3137e427c0291f90a5d8305ad (diff)
downloadbcm5719-llvm-d36b4c1bf8924ff42f0f05729632f44f05eea044.tar.gz
bcm5719-llvm-d36b4c1bf8924ff42f0f05729632f44f05eea044.zip
Don't allow the restore point to be placed after terminators. With this change,
MultiSource/Applications is clean with the prealloc splitter. Some failures remain in SPEC. llvm-svn: 59267
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/PreAllocSplitting.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/PreAllocSplitting.cpp b/llvm/lib/CodeGen/PreAllocSplitting.cpp
index f7d8ab01026..dfbc796cd3f 100644
--- a/llvm/lib/CodeGen/PreAllocSplitting.cpp
+++ b/llvm/lib/CodeGen/PreAllocSplitting.cpp
@@ -233,13 +233,13 @@ PreAllocSplitting::findRestorePoint(MachineBasicBlock *MBB, MachineInstr *MI,
unsigned &RestoreIndex) {
// FIXME: Allow spill to be inserted to the beginning of the mbb. Update mbb
// begin index accordingly.
- MachineBasicBlock::iterator Pt = MBB->end();
+ MachineBasicBlock::iterator Pt = MBB->getFirstTerminator();
unsigned EndIdx = LIs->getMBBEndIdx(MBB);
// Go bottom up if RefsInMBB is empty and the end of the mbb isn't beyond
// the last index in the live range.
if (RefsInMBB.empty() && LastIdx >= EndIdx) {
- MachineBasicBlock::iterator MII = MBB->end();
+ MachineBasicBlock::iterator MII = MBB->getFirstTerminator();
MachineBasicBlock::iterator EndPt = MI;
--MII;
do {
OpenPOWER on IntegriCloud