|
LLVM 24.0.0git
|
#include "Target/AMDGPU/GCNRegPressure.h"
Public Types | |
| using | LiveRegSet = DenseMap<unsigned, LaneBitmask> |
Public Member Functions | |
| void | reset (const MachineRegisterInfo &MRI, const LiveRegSet &LiveRegs) |
Resets tracker with the provided LiveRegs. | |
| const decltype(LiveRegs) & | getLiveRegs () const |
| const MachineInstr * | getLastTrackedMI () const |
| void | clearMaxPressure () |
| const GCNRegPressure & | getMaxPressure () const |
| void | resetMaxPressure () |
| void | setPressureCallback (std::function< void(const GCNRegPressure &)> CB) |
| Sets a function that the tracker calls with the pressure of every program point that it folds into the maximum pressure. | |
| GCNRegPressure | getPressure () const |
| decltype(LiveRegs) | moveLiveRegs () |
Protected Member Functions | |
| GCNRPTracker (LiveIntervals &LIS_) | |
| void | updateMaxPressure (const GCNRegPressure &RP) |
Folds the pressure RP of one program point into MaxPressure and passes it to the pressure callback. | |
| void | reset (const MachineInstr &MI, bool After) |
Resets tracker before or After the provided MI, which can be a debug instruction. | |
| void | reset (const MachineBasicBlock &MBB, bool End) |
Resets tracker at the start or End of the MBB. | |
| void | reset (const MachineRegisterInfo &MRI, SlotIndex SI) |
Resets tracker at the specified slot index SI. | |
| LaneBitmask | getLastUsedLanes (Register Reg, SlotIndex Pos) const |
| Mostly copy/paste from CodeGen/RegisterPressure.cpp. | |
Protected Attributes | |
| LiveIntervals & | LIS |
| LiveRegSet | LiveRegs |
| GCNRegPressure | CurPressure |
| GCNRegPressure | MaxPressure |
| MachineBasicBlock::const_iterator | LastTrackedMI |
| const MachineRegisterInfo * | MRI = nullptr |
| std::function< void(const GCNRegPressure &)> | PressureCallback |
Definition at line 332 of file GCNRegPressure.h.
Definition at line 334 of file GCNRegPressure.h.
|
inlineprotected |
Definition at line 344 of file GCNRegPressure.h.
References LIS.
Referenced by llvm::GCNDownwardRPTrackerBase::GCNDownwardRPTrackerBase(), and llvm::GCNUpwardRPTracker::GCNUpwardRPTracker().
|
inline |
Definition at line 376 of file GCNRegPressure.h.
References MaxPressure.
|
inline |
Definition at line 372 of file GCNRegPressure.h.
References LastTrackedMI.
|
protected |
Mostly copy/paste from CodeGen/RegisterPressure.cpp.
Definition at line 577 of file GCNRegPressure.cpp.
References llvm::SlotIndex::getBaseIndex(), getLanesWithProperty(), LIS, and MRI.
Referenced by llvm::GCNDownwardRPTrackerBase::bumpDownwardPressure().
Definition at line 371 of file GCNRegPressure.h.
References LiveRegs.
Referenced by llvm::GCNRegPressurePrinter::runOnMachineFunction().
|
inline |
Definition at line 378 of file GCNRegPressure.h.
References MaxPressure.
Referenced by llvm::GCNRegPressurePrinter::runOnMachineFunction().
|
inline |
Definition at line 389 of file GCNRegPressure.h.
References CurPressure.
Referenced by llvm::dumpMaxRegPressure(), llvm::GCNSchedStrategy::getRegisterPressures(), and llvm::GCNRegPressurePrinter::runOnMachineFunction().
|
inline |
Definition at line 391 of file GCNRegPressure.h.
References LiveRegs.
|
protected |
|
protected |
Resets tracker before or After the provided MI, which can be a debug instruction.
Definition at line 526 of file GCNRegPressure.cpp.
References LIS, MI, MRI, reset(), and llvm::skipDebugInstructionsForward().
Referenced by llvm::GCNDownwardRPTracker::reset(), reset(), and reset().
| void GCNRPTracker::reset | ( | const MachineRegisterInfo & | MRI, |
| const LiveRegSet & | LiveRegs ) |
Resets tracker with the provided LiveRegs.
Definition at line 567 of file GCNRegPressure.cpp.
References CurPressure, llvm::getRegPressure(), LastTrackedMI, LiveRegs, MaxPressure, and MRI.
|
protected |
Resets tracker at the specified slot index SI.
Definition at line 560 of file GCNRegPressure.cpp.
References CurPressure, llvm::getLiveRegs(), llvm::getRegPressure(), LastTrackedMI, LIS, LiveRegs, MaxPressure, and MRI.
|
inline |
Definition at line 380 of file GCNRegPressure.h.
References CurPressure, and MaxPressure.
Referenced by llvm::GCNUpwardRPTracker::getMaxPressureAndReset(), and llvm::GCNRegPressurePrinter::runOnMachineFunction().
|
inline |
Sets a function that the tracker calls with the pressure of every program point that it folds into the maximum pressure.
A user can compute there a maximum that maxPerRegFile() does not keep, e.g. of one register kind.
Definition at line 385 of file GCNRegPressure.h.
References PressureCallback.
Referenced by llvm::dumpMaxRegPressure().
|
inlineprotected |
Folds the pressure RP of one program point into MaxPressure and passes it to the pressure callback.
Definition at line 348 of file GCNRegPressure.h.
References llvm::maxPerRegFile(), MaxPressure, and PressureCallback.
Referenced by llvm::GCNDownwardRPTrackerBase::addDefs(), llvm::GCNUpwardRPTracker::recede(), llvm::GCNDownwardRPTrackerBase::retireDeadDefs(), and llvm::GCNDownwardRPTrackerBase::retireDeadUses().
|
protected |
Definition at line 339 of file GCNRegPressure.h.
Referenced by llvm::GCNDownwardRPTrackerBase::addDefs(), llvm::GCNDownwardRPTrackerBase::bumpDownwardPressure(), getPressure(), llvm::GCNUpwardRPTracker::isValid(), llvm::GCNUpwardRPTracker::recede(), reset(), reset(), resetMaxPressure(), llvm::GCNDownwardRPTrackerBase::retireDeadDefs(), and llvm::GCNDownwardRPTrackerBase::retireDeadUses().
|
protected |
Definition at line 340 of file GCNRegPressure.h.
Referenced by llvm::GCNManualDownwardRPTracker::advance(), llvm::GCNDownwardRPTracker::advanceBeforeNext(), llvm::GCNDownwardRPTracker::advanceToNext(), llvm::GCNDownwardRPTrackerBase::bumpDownwardPressure(), getLastTrackedMI(), llvm::GCNUpwardRPTracker::recede(), reset(), and reset().
|
protected |
Definition at line 337 of file GCNRegPressure.h.
Referenced by llvm::GCNManualDownwardRPTracker::advance(), llvm::GCNDownwardRPTracker::advanceBeforeNext(), llvm::GCNDownwardRPTrackerBase::bumpDownwardPressure(), llvm::GCNDownwardRPTracker::GCNDownwardRPTracker(), llvm::GCNDownwardRPTrackerBase::GCNDownwardRPTrackerBase(), llvm::GCNManualDownwardRPTracker::GCNManualDownwardRPTracker(), GCNRPTracker(), getLastUsedLanes(), llvm::GCNUpwardRPTracker::isValid(), llvm::GCNUpwardRPTracker::recede(), reset(), reset(), reset(), llvm::GCNUpwardRPTracker::reset(), and llvm::GCNDownwardRPTrackerBase::retireDeadUses().
|
protected |
Definition at line 338 of file GCNRegPressure.h.
Referenced by llvm::GCNDownwardRPTrackerBase::addDefs(), llvm::GCNDownwardRPTrackerBase::bumpDownwardPressure(), getLiveRegs(), llvm::GCNUpwardRPTracker::isValid(), moveLiveRegs(), llvm::GCNUpwardRPTracker::recede(), reset(), and reset().
|
protected |
Definition at line 339 of file GCNRegPressure.h.
Referenced by clearMaxPressure(), getMaxPressure(), llvm::GCNUpwardRPTracker::getMaxPressureAndReset(), llvm::GCNDownwardRPTracker::moveMaxPressure(), reset(), reset(), resetMaxPressure(), and updateMaxPressure().
|
mutableprotected |
Definition at line 341 of file GCNRegPressure.h.
Referenced by llvm::GCNDownwardRPTrackerBase::addDefs(), llvm::GCNDownwardRPTrackerBase::bumpDownwardPressure(), getLastUsedLanes(), llvm::GCNUpwardRPTracker::isValid(), llvm::GCNUpwardRPTracker::recede(), reset(), reset(), reset(), llvm::GCNDownwardRPTrackerBase::retireDeadDefs(), and llvm::GCNDownwardRPTrackerBase::retireDeadUses().
|
protected |
Definition at line 342 of file GCNRegPressure.h.
Referenced by setPressureCallback(), and updateMaxPressure().