diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-02-09 23:33:02 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-02-09 23:33:02 +0000 |
commit | 77ba1cf2868ac19d5a60b6a51c1775ede393f3b6 (patch) | |
tree | db377631e488481860033b86607c0c1eaa9bf3d3 /llvm | |
parent | 7cb57b30bd74056ad1654443298f22fcf995429d (diff) | |
download | bcm5719-llvm-77ba1cf2868ac19d5a60b6a51c1775ede393f3b6.tar.gz bcm5719-llvm-77ba1cf2868ac19d5a60b6a51c1775ede393f3b6.zip |
Simplify using the new leaveIntvBefore()
llvm-svn: 125238
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocGreedy.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp index 1529545b86c..f8b3ea792d6 100644 --- a/llvm/lib/CodeGen/RegAllocGreedy.cpp +++ b/llvm/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. |