LLVM 20.0.0git
|
#include "Target/AMDGPU/GCNRegPressure.h"
Public Member Functions | |
GCNUpwardRPTracker (const LiveIntervals &LIS_) | |
void | reset (const MachineRegisterInfo &MRI, SlotIndex SI) |
reset tracker at the specified slot index SI . | |
void | reset (const MachineBasicBlock &MBB) |
reset tracker to the end of the MBB . | |
void | reset (const MachineInstr &MI) |
reset tracker to the point just after MI (in program order). | |
void | recede (const MachineInstr &MI) |
Move to the state of RP just before the MI . | |
bool | isValid () const |
returns whether the tracker's state after receding MI corresponds to reported by LIS. | |
const GCNRegPressure & | getMaxPressure () const |
void | resetMaxPressure () |
GCNRegPressure | getMaxPressureAndReset () |
void | reset (const MachineInstr &MI, const LiveRegSet *LiveRegsCopy, bool After) |
void | reset (const MachineRegisterInfo &MRI_, const LiveRegSet &LiveRegs_) |
Public Member Functions inherited from llvm::GCNRPTracker | |
void | reset (const MachineRegisterInfo &MRI_, const LiveRegSet &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, const LiveRegSet *LiveRegsCopy, bool After) |
void | bumpDeadDefs (ArrayRef< RegisterMaskPair > DeadDefs) |
Mostly copy/paste from CodeGen/RegisterPressure.cpp. | |
LaneBitmask | getLastUsedLanes (Register RegUnit, 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 199 of file GCNRegPressure.h.
|
inline |
Definition at line 201 of file GCNRegPressure.h.
|
inline |
Definition at line 230 of file GCNRegPressure.h.
References llvm::GCNRPTracker::MaxPressure.
Referenced by llvm::GCNRegPressurePrinter::runOnMachineFunction().
|
inline |
Definition at line 234 of file GCNRegPressure.h.
References llvm::GCNRPTracker::MaxPressure, and resetMaxPressure().
Referenced by llvm::GCNIterativeScheduler::getRegionPressure().
bool GCNUpwardRPTracker::isValid | ( | ) | const |
returns
whether the tracker's state after receding MI corresponds to reported by LIS.
Definition at line 715 of file GCNRegPressure.cpp.
References llvm::GCNRPTracker::CurPressure, llvm::dbgs(), llvm::SlotIndex::getBaseIndex(), llvm::LiveIntervals::getInstructionIndex(), llvm::getLiveRegs(), llvm::getRegPressure(), llvm::MachineRegisterInfo::getTargetRegisterInfo(), llvm::isEqual(), llvm::GCNRPTracker::LIS, llvm::GCNRPTracker::LiveRegs, llvm::GCNRPTracker::MRI, llvm::print(), and llvm::reportMismatch().
Referenced by llvm::GCNIterativeScheduler::getRegionPressure().
void GCNUpwardRPTracker::recede | ( | const MachineInstr & | MI | ) |
Move to the state of RP just before the MI
.
If UseInternalIterator
is set, also update the internal iterators. Setting UseInternalIterator
to false allows for an externally managed iterator / program order.
Definition at line 436 of file GCNRegPressure.cpp.
References assert(), collectVirtualRegUses(), llvm::GCNRPTracker::CurPressure, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::erase(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), getDefRegMask(), llvm::LaneBitmask::getNone(), llvm::getRegPressure(), I, llvm::GCNRegPressure::inc(), llvm::GCNRPTracker::LastTrackedMI, llvm::GCNRPTracker::LIS, llvm::GCNRPTracker::LiveRegs, llvm::max(), llvm::GCNRPTracker::MaxPressure, MI, llvm::GCNRPTracker::MRI, and llvm::LaneBitmask::none().
Referenced by llvm::GCNIterativeScheduler::getRegionPressure(), getRegisterPressures(), llvm::GCNRegPressurePrinter::runOnMachineFunction(), and llvm::GCNSchedStrategy::schedNode().
|
inline |
reset tracker to the end of the MBB
.
Definition at line 211 of file GCNRegPressure.h.
References llvm::SlotIndexes::getMBBEndIdx(), llvm::LiveIntervals::getSlotIndexes(), llvm::GCNRPTracker::LIS, MBB, and reset().
|
inline |
reset tracker to the point just after MI
(in program order).
Definition at line 217 of file GCNRegPressure.h.
References llvm::SlotIndex::getDeadSlot(), llvm::LiveIntervals::getInstructionIndex(), llvm::GCNRPTracker::LIS, MI, and reset().
void GCNRPTracker::reset | ( | const MachineInstr & | MI, |
const LiveRegSet * | LiveRegsCopy, | ||
bool | After | ||
) |
Definition at line 169 of file GCNRegPressure.cpp.
References llvm::GCNRegPressure::getVGPRNum().
|
inline |
reset tracker at the specified slot index SI
.
Definition at line 206 of file GCNRegPressure.h.
References llvm::getLiveRegs(), llvm::GCNRPTracker::LIS, llvm::GCNRPTracker::MRI, and llvm::GCNRPTracker::reset().
Referenced by llvm::GCNIterativeScheduler::getRegionPressure(), reset(), and llvm::GCNRegPressurePrinter::runOnMachineFunction().
void GCNRPTracker::reset | ( | const MachineRegisterInfo & | MRI_, |
const LiveRegSet & | LiveRegs_ | ||
) |
Definition at line 179 of file GCNRegPressure.cpp.
|
inline |
Definition at line 232 of file GCNRegPressure.h.
References llvm::GCNRPTracker::CurPressure, and llvm::GCNRPTracker::MaxPressure.
Referenced by getMaxPressureAndReset(), and llvm::GCNRegPressurePrinter::runOnMachineFunction().