summaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveRangeCalc.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-09-13 16:47:56 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-09-13 16:47:56 +0000
commitee5655dca467d3812145a2f965c31edf4875c93e (patch)
treeb0add16964b529f5c8b9f66365defa013d3d8152 /lib/CodeGen/LiveRangeCalc.cpp
parentc1c622ef0dd29d1bafd580790aec5231af50abf2 (diff)
downloadllvm-ee5655dca467d3812145a2f965c31edf4875c93e.tar.gz
llvm-ee5655dca467d3812145a2f965c31edf4875c93e.tar.bz2
llvm-ee5655dca467d3812145a2f965c31edf4875c93e.tar.xz
Switch extendInBlock() to take a kill slot instead of the last use slot.
Three out of four clients prefer this interface which is consistent with extendIntervalEndTo() and LiveRangeCalc::extend(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139604 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveRangeCalc.cpp')
-rw-r--r--lib/CodeGen/LiveRangeCalc.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/CodeGen/LiveRangeCalc.cpp b/lib/CodeGen/LiveRangeCalc.cpp
index eedf924388..a7d5af5198 100644
--- a/lib/CodeGen/LiveRangeCalc.cpp
+++ b/lib/CodeGen/LiveRangeCalc.cpp
@@ -63,13 +63,12 @@ void LiveRangeCalc::extend(LiveInterval *LI,
assert(Kill.isValid() && "Invalid SlotIndex");
assert(Indexes && "Missing SlotIndexes");
assert(DomTree && "Missing dominator tree");
- SlotIndex LastUse = Kill.getPrevSlot();
- MachineBasicBlock *KillMBB = Indexes->getMBBFromIndex(LastUse);
+ MachineBasicBlock *KillMBB = Indexes->getMBBFromIndex(Kill.getPrevSlot());
assert(Kill && "No MBB at Kill");
// Is there a def in the same MBB we can extend?
- if (LI->extendInBlock(Indexes->getMBBStartIdx(KillMBB), LastUse))
+ if (LI->extendInBlock(Indexes->getMBBStartIdx(KillMBB), Kill))
return;
// Find the single reaching def, or determine if Kill is jointly dominated by
@@ -134,7 +133,7 @@ VNInfo *LiveRangeCalc::findReachingDefs(LiveInterval *LI,
// First time we see Pred. Try to determine the live-out value, but set
// it as null if Pred is live-through with an unknown value.
- VNInfo *VNI = LI->extendInBlock(Start, End.getPrevSlot());
+ VNInfo *VNI = LI->extendInBlock(Start, End);
setLiveOutValue(Pred, VNI);
if (VNI) {
if (TheVNI && TheVNI != VNI)