diff options
| author | Craig Topper <craig.topper@sifive.com> | 2025-01-22 09:11:22 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-22 09:11:22 -0800 |
| commit | 9e6494c0fb29dfb5d4d2b7bf3ed7af261efee034 (patch) | |
| tree | 85d3968c09733f21db3209095b2c53da1c558ed3 /llvm/lib/CodeGen/MachineScheduler.cpp | |
| parent | 13d09dfad6d1f6a15721688822ce33b74b44a8d8 (diff) | |
[CodeGen] Rename RegisterMaskPair to VRegMaskOrUnit. NFC (#123799)
This holds a physical register unit or virtual register and mask.
While I was here I've used emplace_back and removed an unneeded use of a
template.
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/MachineScheduler.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index 91aaeea156c4..393530f56cc2 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/lib/CodeGen/MachineScheduler.cpp @@ -1288,7 +1288,7 @@ void ScheduleDAGMILive::initRegPressure() { // Account for liveness generated by the region boundary. if (LiveRegionEnd != RegionEnd) { - SmallVector<RegisterMaskPair, 8> LiveUses; + SmallVector<VRegMaskOrUnit, 8> LiveUses; BotRPTracker.recede(&LiveUses); updatePressureDiffs(LiveUses); } @@ -1352,9 +1352,8 @@ updateScheduledPressure(const SUnit *SU, /// Update the PressureDiff array for liveness after scheduling this /// instruction. -void ScheduleDAGMILive::updatePressureDiffs( - ArrayRef<RegisterMaskPair> LiveUses) { - for (const RegisterMaskPair &P : LiveUses) { +void ScheduleDAGMILive::updatePressureDiffs(ArrayRef<VRegMaskOrUnit> LiveUses) { + for (const VRegMaskOrUnit &P : LiveUses) { Register Reg = P.RegUnit; /// FIXME: Currently assuming single-use physregs. if (!Reg.isVirtual()) @@ -1579,7 +1578,7 @@ unsigned ScheduleDAGMILive::computeCyclicCriticalPath() { unsigned MaxCyclicLatency = 0; // Visit each live out vreg def to find def/use pairs that cross iterations. - for (const RegisterMaskPair &P : RPTracker.getPressure().LiveOutRegs) { + for (const VRegMaskOrUnit &P : RPTracker.getPressure().LiveOutRegs) { Register Reg = P.RegUnit; if (!Reg.isVirtual()) continue; @@ -1707,7 +1706,7 @@ void ScheduleDAGMILive::scheduleMI(SUnit *SU, bool IsTopNode) { if (BotRPTracker.getPos() != CurrentBottom) BotRPTracker.recedeSkipDebugValues(); - SmallVector<RegisterMaskPair, 8> LiveUses; + SmallVector<VRegMaskOrUnit, 8> LiveUses; BotRPTracker.recede(RegOpers, &LiveUses); assert(BotRPTracker.getPos() == CurrentBottom && "out of sync"); LLVM_DEBUG(dbgs() << "Bottom Pressure:\n"; dumpRegSetPressure( |
