summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-08 23:26:48 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-08 23:26:48 +0000
commit8a2bbdeee24b40da6187199658646d04329c139e (patch)
treeaec273eb100b85be4664495d9843559c0c76afe3 /lib
parenta50c539b7a9e74597da34bfaea5429a48481f18b (diff)
downloadllvm-8a2bbdeee24b40da6187199658646d04329c139e.tar.gz
llvm-8a2bbdeee24b40da6187199658646d04329c139e.tar.bz2
llvm-8a2bbdeee24b40da6187199658646d04329c139e.tar.xz
Fix one more case of splitting after the last split point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125137 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/RegAllocGreedy.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp
index e767bbad7e..cfef95e1e8 100644
--- a/lib/CodeGen/RegAllocGreedy.cpp
+++ b/lib/CodeGen/RegAllocGreedy.cpp
@@ -746,8 +746,7 @@ void RAGreedy::splitAroundRegion(LiveInterval &VirtReg, unsigned PhysReg,
continue;
}
- if (IP.second.getBoundaryIndex() < BI.LastUse &&
- IP.second.getBoundaryIndex() <= BI.LastSplitPoint) {
+ if (IP.second.getBoundaryIndex() < BI.LastUse) {
// There are interference-free uses at the end of the block.
// Find the first use that can get the live-out register.
SmallVectorImpl<SlotIndex>::const_iterator UI =
@@ -755,13 +754,16 @@ void RAGreedy::splitAroundRegion(LiveInterval &VirtReg, unsigned PhysReg,
IP.second.getBoundaryIndex());
assert(UI != SA->UseSlots.end() && "Couldn't find last use");
SlotIndex Use = *UI;
- DEBUG(dbgs() << ", free use at " << Use << ".\n");
assert(Use <= BI.LastUse && "Couldn't find last use");
- SlotIndex SegStart = SE.enterIntvBefore(Use);
- assert(SegStart >= IP.second && "Couldn't avoid interference");
- assert(SegStart < BI.LastSplitPoint && "Impossible split point");
- SE.useIntv(SegStart, Stop);
- continue;
+ // Only attempt a split befroe the last split point.
+ if (Use.getBaseIndex() <= BI.LastSplitPoint) {
+ DEBUG(dbgs() << ", free use at " << Use << ".\n");
+ SlotIndex SegStart = SE.enterIntvBefore(Use);
+ assert(SegStart >= IP.second && "Couldn't avoid interference");
+ assert(SegStart < BI.LastSplitPoint && "Impossible split point");
+ SE.useIntv(SegStart, Stop);
+ continue;
+ }
}
// Interference is after the last use.