summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-01-19 23:14:56 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-01-19 23:14:56 +0000
commit509089f5b62d041510db10deff916407eff2f37b (patch)
tree95c60bab627acefcb71ff3fccd953693a5c4d669 /llvm/lib/CodeGen
parent493c0fbde8ecae09e78796b5d569cd3e2b5c6d70 (diff)
downloadbcm5719-llvm-509089f5b62d041510db10deff916407eff2f37b.tar.gz
bcm5719-llvm-509089f5b62d041510db10deff916407eff2f37b.zip
Don't accidentally leave small gaps in the live ranges when leaving the active
interval after an instruction. The leaveIntvAfter() method only adds liveness from the instruction's boundary index to the inserted copy. Ideally, SplitKit should be smarter about this, perhaps by combining useIntv() and leaveIntvAfter() into one method that guarantees continuity. llvm-svn: 123858
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/RegAllocGreedy.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp
index fa3b5871fce..2083c4bdc41 100644
--- a/llvm/lib/CodeGen/RegAllocGreedy.cpp
+++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp
@@ -757,7 +757,7 @@ void RAGreedy::splitAroundRegion(LiveInterval &VirtReg, unsigned PhysReg,
}
if (!BI.LiveThrough) {
DEBUG(dbgs() << ", killed in block.\n");
- SE.useIntv(Start, BI.Kill);
+ SE.useIntv(Start, BI.Kill.getBoundaryIndex());
SE.leaveIntvAfter(BI.Kill);
continue;
}
@@ -765,7 +765,7 @@ void RAGreedy::splitAroundRegion(LiveInterval &VirtReg, unsigned PhysReg,
// Block is live-through, but exit bundle is on the stack.
// Spill immediately after the last use.
DEBUG(dbgs() << ", uses, stack-out.\n");
- SE.useIntv(Start, BI.LastUse);
+ SE.useIntv(Start, BI.LastUse.getBoundaryIndex());
SE.leaveIntvAfter(BI.LastUse);
continue;
}
@@ -789,6 +789,7 @@ void RAGreedy::splitAroundRegion(LiveInterval &VirtReg, unsigned PhysReg,
SlotIndex Use = std::lower_bound(SA->UseSlots.begin(), SA->UseSlots.end(),
IP.second)[-1];
DEBUG(dbgs() << ", free use at " << Use << ".\n");
+ Use = Use.getBoundaryIndex();
assert(Use >= BI.FirstUse && Use < IP.first);
SE.useIntv(Start, Use);
SE.leaveIntvAfter(Use);
OpenPOWER on IntegriCloud