[llvm-commits] [llvm] r59267 - /llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
Owen Anderson
resistor at mac.com
Thu Nov 13 13:53:15 PST 2008
Author: resistor
Date: Thu Nov 13 15:53:14 2008
New Revision: 59267
URL: http://llvm.org/viewvc/llvm-project?rev=59267&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
Modified: llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp?rev=59267&r1=59266&r2=59267&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp (original)
+++ llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp Thu Nov 13 15:53:14 2008
@@ -233,13 +233,13 @@
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 {
More information about the llvm-commits
mailing list