summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-09 23:33:02 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-09 23:33:02 +0000
commit23cd57c29926189ad9d7b2b208024645870884ad (patch)
tree124f74159d3eee4254d1bf47e40b72fcee7a82f2 /lib
parent9b057771ba22441b8d312404204433477b4be657 (diff)
downloadllvm-23cd57c29926189ad9d7b2b208024645870884ad.tar.gz
llvm-23cd57c29926189ad9d7b2b208024645870884ad.tar.bz2
llvm-23cd57c29926189ad9d7b2b208024645870884ad.tar.xz
Simplify using the new leaveIntvBefore()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125238 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/RegAllocGreedy.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp
index 1529545b86..f8b3ea792d 100644
--- a/lib/CodeGen/RegAllocGreedy.cpp
+++ b/lib/CodeGen/RegAllocGreedy.cpp
@@ -714,19 +714,8 @@ void RAGreedy::splitAroundRegion(LiveInterval &VirtReg, unsigned PhysReg,
// 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.