diff options
author | Matthias Braun <matze@braunis.de> | 2013-10-10 21:28:52 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2013-10-10 21:28:52 +0000 |
commit | 5649e25ce86b9d89d228ae7c392413571b0f8c19 (patch) | |
tree | 5d52d34808f1ab241f9cdc53e4fe889d76a0f6cb /lib/CodeGen/RegisterPressure.cpp | |
parent | 87a86058fa0726328de42ace85b5532d18775646 (diff) | |
download | llvm-5649e25ce86b9d89d228ae7c392413571b0f8c19.tar.gz llvm-5649e25ce86b9d89d228ae7c392413571b0f8c19.tar.bz2 llvm-5649e25ce86b9d89d228ae7c392413571b0f8c19.tar.xz |
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
Diffstat (limited to 'lib/CodeGen/RegisterPressure.cpp')
-rw-r--r-- | lib/CodeGen/RegisterPressure.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/RegisterPressure.cpp b/lib/CodeGen/RegisterPressure.cpp index 260eacdca6..2f273a3fd3 100644 --- a/lib/CodeGen/RegisterPressure.cpp +++ b/lib/CodeGen/RegisterPressure.cpp @@ -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); } |