diff options
author | Owen Anderson <resistor@mac.com> | 2008-11-13 21:53:14 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-11-13 21:53:14 +0000 |
commit | 711fd3db2d3170263850d7ee55987ac1fb9006f3 (patch) | |
tree | d137969fb87b4dcff33a058ee30ea33632fe6ce3 /lib/CodeGen/PreAllocSplitting.cpp | |
parent | 330169fa3e9c46c46bf130746d38e6ec2fac303a (diff) | |
download | external_llvm-711fd3db2d3170263850d7ee55987ac1fb9006f3.zip external_llvm-711fd3db2d3170263850d7ee55987ac1fb9006f3.tar.gz external_llvm-711fd3db2d3170263850d7ee55987ac1fb9006f3.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59267 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PreAllocSplitting.cpp')
-rw-r--r-- | lib/CodeGen/PreAllocSplitting.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/PreAllocSplitting.cpp b/lib/CodeGen/PreAllocSplitting.cpp index f7d8ab0..dfbc796 100644 --- a/lib/CodeGen/PreAllocSplitting.cpp +++ b/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 { |