|
LLVM 23.0.0git
|
#include "Target/AMDGPU/GCNRegPressure.h"
Public Member Functions | |
| GCNDownwardRPTracker (const LiveIntervals &LIS_) | |
| MachineBasicBlock::const_iterator | getNext () const |
| GCNRegPressure | moveMaxPressure () |
return MaxPressure and clear it. | |
| bool | reset (const MachineInstr &MI, MachineBasicBlock::const_iterator End, const LiveRegSet *LiveRegs=nullptr) |
Reset tracker to the point before the MI filling LiveRegs upon this point using LIS. | |
| bool | advanceBeforeNext (MachineInstr *MI=nullptr, bool UseInternalIterator=true) |
| Move to the state right before the next MI or after the end of MBB. | |
| void | advanceToNext (MachineInstr *MI=nullptr, bool UseInternalIterator=true) |
| Move to the state at the MI, advanceBeforeNext has to be called first. | |
| bool | advance (MachineInstr *MI=nullptr, bool UseInternalIterator=true) |
| Move to the state at the next MI. | |
| bool | advance (MachineBasicBlock::const_iterator End) |
Advance instructions until before End using internal iterators to process instructions in program order. | |
| bool | advance (MachineBasicBlock::const_iterator Begin, MachineBasicBlock::const_iterator End, const LiveRegSet *LiveRegsCopy=nullptr) |
Reset tracker to Begin (filling LiveRegs upon this point using LIS) and advance to End, which must be between Begin and the end of its parent block (inclusive). | |
| GCNRegPressure | bumpDownwardPressure (const MachineInstr *MI, const SIRegisterInfo *TRI) const |
Mostly copy/paste from CodeGen/RegisterPressure.cpp Calculate the impact MI will have on CurPressure and. | |
| 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. | |
| void | reset (const MachineRegisterInfo &MRI, const LiveRegSet &LiveRegs) |
Resets tracker with the provided LiveRegs. | |
| Public Member Functions inherited from llvm::GCNRPTracker | |
| 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 () |
| GCNRegPressure | getPressure () const |
| decltype(LiveRegs) | moveLiveRegs () |
Additional Inherited Members | |
| Public Types inherited from llvm::GCNRPTracker | |
| using | LiveRegSet = DenseMap<unsigned, LaneBitmask> |
| Protected Member Functions inherited from llvm::GCNRPTracker | |
| GCNRPTracker (const LiveIntervals &LIS_) | |
| 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. | |
| void | bumpDeadDefs (ArrayRef< VRegMaskOrUnit > DeadDefs) |
| Mostly copy/paste from CodeGen/RegisterPressure.cpp. | |
| LaneBitmask | getLastUsedLanes (Register Reg, SlotIndex Pos) const |
| Mostly copy/paste from CodeGen/RegisterPressure.cpp. | |
| Protected Attributes inherited from llvm::GCNRPTracker | |
| const LiveIntervals & | LIS |
| LiveRegSet | LiveRegs |
| GCNRegPressure | CurPressure |
| GCNRegPressure | MaxPressure |
| const MachineInstr * | LastTrackedMI = nullptr |
| const MachineRegisterInfo * | MRI = nullptr |
Definition at line 407 of file GCNRegPressure.h.
|
inline |
Definition at line 414 of file GCNRegPressure.h.
References llvm::GCNRPTracker::GCNRPTracker().
| bool GCNDownwardRPTracker::advance | ( | MachineBasicBlock::const_iterator | Begin, |
| MachineBasicBlock::const_iterator | End, | ||
| const LiveRegSet * | LiveRegsCopy = nullptr ) |
Reset tracker to Begin (filling LiveRegs upon this point using LIS) and advance to End, which must be between Begin and the end of its parent block (inclusive).
returns false if the range [Begin, End) is empty except debug values.
Definition at line 783 of file GCNRegPressure.cpp.
| bool GCNDownwardRPTracker::advance | ( | MachineBasicBlock::const_iterator | End | ) |
Advance instructions until before End using internal iterators to process instructions in program order.
Returns whether iterators actually had to advance to reach End.
Definition at line 776 of file GCNRegPressure.cpp.
References advance().
| bool GCNDownwardRPTracker::advance | ( | MachineInstr * | MI = nullptr, |
| bool | UseInternalIterator = true ) |
Move to the state at the next MI.
returns false if reached end of block. If UseInternalIterator is true, then internal iterators are used and set to process in program order. If UseInternalIterator is false, then it is assumed that the tracker is using an externally managed iterator, and advance* calls will not update the state of the iterator. In such cases, the tracker will move to the state right before the provided MI and use LIS for RP calculations.
Definition at line 763 of file GCNRegPressure.cpp.
References advanceBeforeNext(), advanceToNext(), and MI.
| bool GCNDownwardRPTracker::advanceBeforeNext | ( | MachineInstr * | MI = nullptr, |
| bool | UseInternalIterator = true ) |
Move to the state right before the next MI or after the end of MBB.
returns false if reached end of the block. If UseInternalIterator is true, then internal iterators are used and set to process in program order. If UseInternalIterator is false, then it is assumed that the tracker is using an externally managed iterator, and advance* calls will not update the state of the iterator. In such cases, the tracker will move to the state right before the provided MI and use LIS for RP calculations.
UseInternalIterator
Definition at line 672 of file GCNRegPressure.cpp.
References assert(), llvm::GCNRPTracker::CurPressure, llvm::LaneBitmask::getNone(), llvm::LiveInterval::hasSubRanges(), llvm::SmallSet< T, N, C >::insert(), llvm::GCNRPTracker::LastTrackedMI, llvm::GCNRPTracker::LIS, llvm::LiveRange::liveAt(), llvm::GCNRPTracker::LiveRegs, llvm_unreachable, llvm::max(), llvm::GCNRPTracker::MaxPressure, MI, llvm::GCNRPTracker::MRI, llvm::MachineInstr::operands(), and llvm::LiveInterval::subranges().
Referenced by advance(), and llvm::GCNRegPressurePrinter::runOnMachineFunction().
| void GCNDownwardRPTracker::advanceToNext | ( | MachineInstr * | MI = nullptr, |
| bool | UseInternalIterator = true ) |
Move to the state at the MI, advanceBeforeNext has to be called first.
If UseInternalIterator is true, then internal iterators are used and set to process in program order. If UseInternalIterator is false, then it is assumed that the tracker is using an externally managed iterator, and advance* calls will not update the state of the iterator. In such cases, the tracker will move to the state at the provided MI .
Definition at line 738 of file GCNRegPressure.cpp.
References llvm::MachineInstr::all_defs(), llvm::GCNRPTracker::CurPressure, getDefRegMask(), llvm::GCNRPTracker::LastTrackedMI, llvm::GCNRPTracker::LiveRegs, llvm::max(), llvm::GCNRPTracker::MaxPressure, MI, llvm::GCNRPTracker::MRI, and llvm::skipDebugInstructionsForward().
Referenced by advance(), and llvm::GCNRegPressurePrinter::runOnMachineFunction().
| GCNRegPressure GCNDownwardRPTracker::bumpDownwardPressure | ( | const MachineInstr * | MI, |
| const SIRegisterInfo * | TRI ) const |
Mostly copy/paste from CodeGen/RegisterPressure.cpp Calculate the impact MI will have on CurPressure and.
Definition at line 817 of file GCNRegPressure.cpp.
References llvm::RegisterOperands::adjustLaneLiveness(), assert(), llvm::RegisterOperands::collect(), llvm::GCNRPTracker::CurPressure, llvm::RegisterOperands::Defs, findUseBetween(), llvm::GCNRPTracker::getLastUsedLanes(), llvm::GCNRegPressure::inc(), llvm::GCNRPTracker::LastTrackedMI, llvm::GCNRPTracker::LIS, llvm::GCNRPTracker::LiveRegs, MBB, MI, llvm::GCNRPTracker::MRI, llvm::LaneBitmask::none(), llvm::skipDebugInstructionsForward(), TRI, and llvm::RegisterOperands::Uses.
Referenced by llvm::GCNSchedStrategy::getRegisterPressures().
|
inline |
Definition at line 418 of file GCNRegPressure.h.
|
inline |
return MaxPressure and clear it.
Definition at line 421 of file GCNRegPressure.h.
References llvm::GCNRPTracker::MaxPressure.
| void GCNRPTracker::reset | ( | const MachineBasicBlock & | MBB, |
| bool | End ) |
Resets tracker at the start or End of the MBB.
Definition at line 339 of file GCNRegPressure.cpp.
| void GCNRPTracker::reset | ( | const MachineInstr & | MI, |
| bool | After ) |
Resets tracker before or After the provided MI, which can be a debug instruction.
Definition at line 336 of file GCNRegPressure.cpp.
| bool GCNDownwardRPTracker::reset | ( | const MachineInstr & | MI, |
| MachineBasicBlock::const_iterator | End, | ||
| const LiveRegSet * | LiveRegs = nullptr ) |
Reset tracker to the point before the MI filling LiveRegs upon this point using LIS.
End must be between the MI and the end of its parent block (inclusive). returns false if the range [MI, End) is empty except debug values.
Definition at line 650 of file GCNRegPressure.cpp.
References assert(), MI, llvm::GCNRPTracker::reset(), and llvm::skipDebugInstructionsForward().
Referenced by advance(), and llvm::GCNRegPressurePrinter::runOnMachineFunction().
| void GCNRPTracker::reset | ( | const MachineRegisterInfo & | MRI, |
| const LiveRegSet & | LiveRegs ) |
Resets tracker with the provided LiveRegs.
Definition at line 351 of file GCNRegPressure.cpp.
| void GCNRPTracker::reset | ( | const MachineRegisterInfo & | MRI, |
| SlotIndex | SI ) |
Resets tracker at the specified slot index SI.
Definition at line 342 of file GCNRegPressure.cpp.