[llvm-commits] [llvm] r125238 - /llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Wed Feb 9 15:33:02 PST 2011
Author: stoklund
Date: Wed Feb 9 17:33:02 2011
New Revision: 125238
URL: http://llvm.org/viewvc/llvm-project?rev=125238&view=rev
Log:
Simplify using the new leaveIntvBefore()
Modified:
llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=125238&r1=125237&r2=125238&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Wed Feb 9 17:33:02 2011
@@ -714,19 +714,8 @@
// indirect jump.
DEBUG(dbgs() << ", uses at " << BI.LastUse << " after split point "
<< BI.LastSplitPoint << ", stack-out.\n");
- SlotIndex SegEnd;
- // Find the last real instruction before the split point.
- MachineBasicBlock::iterator SplitI =
- LIS->getInstructionFromIndex(BI.LastSplitPoint);
- MachineBasicBlock::iterator I = SplitI, B = BI.MBB->begin();
- while (I != B && (--I)->isDebugValue())
- ;
- if (I == SplitI)
- SegEnd = SE.leaveIntvAtTop(*BI.MBB);
- else {
- SegEnd = SE.leaveIntvAfter(LIS->getInstructionIndex(I));
- SE.useIntv(Start, SegEnd);
- }
+ SlotIndex SegEnd = SE.leaveIntvBefore(BI.LastSplitPoint);
+ SE.useIntv(Start, SegEnd);
// Run a double interval from the split to the last use.
// This makes it possible to spill the complement without affecting the
// indirect branch.
More information about the llvm-commits
mailing list