mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
Pass LiveQueryResult by value
This makes the API a bit more natural to use and makes it easier to make LiveRanges implementation details private. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192394 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -513,7 +513,7 @@ bool RegPressureTracker::recede(SmallVectorImpl<unsigned> *LiveUses,
|
||||
const LiveInterval *LI = getInterval(Reg);
|
||||
// Check if this LR is killed and not redefined here.
|
||||
if (LI) {
|
||||
LiveRangeQuery LRQ(*LI, SlotIdx);
|
||||
LiveQueryResult LRQ = LI->Query(SlotIdx);
|
||||
if (!LRQ.isKill() && !LRQ.valueDefined())
|
||||
discoverLiveOut(Reg);
|
||||
}
|
||||
@@ -571,7 +571,7 @@ bool RegPressureTracker::advance() {
|
||||
bool lastUse = false;
|
||||
if (RequireIntervals) {
|
||||
const LiveInterval *LI = getInterval(Reg);
|
||||
lastUse = LI && LiveRangeQuery(*LI, SlotIdx).isKill();
|
||||
lastUse = LI && LI->Query(SlotIdx).isKill();
|
||||
}
|
||||
else {
|
||||
// Allocatable physregs are always single-use before register rewriting.
|
||||
@@ -896,7 +896,7 @@ void RegPressureTracker::bumpDownwardPressure(const MachineInstr *MI) {
|
||||
SlotIndex CurrIdx = getCurrSlot();
|
||||
const LiveInterval *LI = getInterval(Reg);
|
||||
if (LI) {
|
||||
LiveRangeQuery LRQ(*LI, SlotIdx);
|
||||
LiveQueryResult LRQ = LI->Query(SlotIdx);
|
||||
if (LRQ.isKill() && !findUseBetween(Reg, CurrIdx, SlotIdx, MRI, LIS))
|
||||
decreaseRegPressure(Reg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user