Replace LiveInterval::killedAt with isKilledAtInstr.
Return true for LRGs that end at EarlyClobber or Register slots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189642 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/LiveRangeEdit.cpp b/lib/CodeGen/LiveRangeEdit.cpp
index ca64729..8627111 100644
--- a/lib/CodeGen/LiveRangeEdit.cpp
+++ b/lib/CodeGen/LiveRangeEdit.cpp
@@ -278,7 +278,7 @@
// Always shrink COPY uses that probably come from live range splitting.
if (MI->readsVirtualRegister(Reg) &&
(MI->isCopy() || MOI->isDef() || MRI.hasOneNonDBGUse(Reg) ||
- LI.killedAt(Idx)))
+ LI.isKilledAtInstr(Idx)))
ToShrink.insert(&LI);
// Remove defined value.
diff --git a/lib/CodeGen/RegisterPressure.cpp b/lib/CodeGen/RegisterPressure.cpp
index 188750d..8328b50 100644
--- a/lib/CodeGen/RegisterPressure.cpp
+++ b/lib/CodeGen/RegisterPressure.cpp
@@ -496,7 +496,7 @@
// Adjust liveouts if LiveIntervals are available.
if (RequireIntervals) {
const LiveInterval *LI = getInterval(Reg);
- if (LI && !LI->killedAt(SlotIdx))
+ if (LI && !LI->isKilledAtInstr(SlotIdx))
discoverLiveOut(Reg);
}
increaseRegPressure(Reg);
@@ -550,7 +550,7 @@
bool lastUse = false;
if (RequireIntervals) {
const LiveInterval *LI = getInterval(Reg);
- lastUse = LI && LI->killedAt(SlotIdx);
+ lastUse = LI && LI->isKilledAtInstr(SlotIdx);
}
else {
// Allocatable physregs are always single-use before register rewriting.
@@ -886,7 +886,7 @@
// to be bottom-scheduled to avoid searching uses at each query.
SlotIndex CurrIdx = getCurrSlot();
const LiveInterval *LI = getInterval(Reg);
- if (LI && LI->killedAt(SlotIdx)
+ if (LI && LI->isKilledAtInstr(SlotIdx)
&& !findUseBetween(Reg, CurrIdx, SlotIdx, MRI, LIS)) {
decreaseRegPressure(Reg);
}