LLVM 24.0.0git
llvm::GCNDownwardRPTrackerBase Class Reference

Common behavior for downward RP trackers. Unconstructible directly. More...

#include "Target/AMDGPU/GCNRegPressure.h"

Inheritance diagram for llvm::GCNDownwardRPTrackerBase:
[legend]

Public Member Functions

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.
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 ()
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

 GCNDownwardRPTrackerBase (LiveIntervals &LIS)
void retireDeadUses (const MachineInstr &MI)
 Retires the lanes of MI's used registers that die at MI, mirroring RegPressureTracker::advance().
void retireDeadDefs (const MachineInstr &MI, SlotIndex SI)
 Retires the lanes defined by MI that are dead at SI, according to LIS.
void addDefs (const MachineInstr &MI)
 Adds all lanes (dead or not) defined by MI's register operands to CurPressure.
Protected Member Functions inherited from llvm::GCNRPTracker
 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.

Additional Inherited Members

Public Types inherited from llvm::GCNRPTracker
using LiveRegSet = DenseMap<unsigned, LaneBitmask>
Protected Attributes inherited from llvm::GCNRPTracker
LiveIntervals & LIS
LiveRegSet LiveRegs
GCNRegPressure CurPressure
GCNRegPressure MaxPressure
MachineBasicBlock::const_iterator LastTrackedMI
const MachineRegisterInfo * MRI = nullptr
std::function< void(const GCNRegPressure &)> PressureCallback

Detailed Description

Common behavior for downward RP trackers. Unconstructible directly.

Definition at line 432 of file GCNRegPressure.h.

Constructor & Destructor Documentation

◆ GCNDownwardRPTrackerBase()

llvm::GCNDownwardRPTrackerBase::GCNDownwardRPTrackerBase ( LiveIntervals & LIS)
inlineprotected

Member Function Documentation

◆ addDefs()

void GCNDownwardRPTrackerBase::addDefs ( const MachineInstr & MI)
protected

◆ bumpDownwardPressure()

◆ retireDeadDefs()

void GCNDownwardRPTrackerBase::retireDeadDefs ( const MachineInstr & MI,
SlotIndex SI )
protected

◆ retireDeadUses()

void GCNDownwardRPTrackerBase::retireDeadUses ( const MachineInstr & MI)
protected

Retires the lanes of MI's used registers that die at MI, mirroring RegPressureTracker::advance().

Early-clobber defs of MI are accounted in MaxPressure as live together with all of its uses. The uses of a PHI are not retired since they do not die there.

Definition at line 700 of file GCNRegPressure.cpp.

References assert(), llvm::GCNRPTracker::CurPressure, getDefRegMask(), llvm::LaneBitmask::getNone(), llvm::GCNRegPressure::inc(), llvm::SmallSet< T, N, C >::insert(), llvm::GCNRPTracker::LIS, MI, llvm::GCNRPTracker::MRI, and llvm::GCNRPTracker::updateMaxPressure().

Referenced by llvm::GCNManualDownwardRPTracker::advance(), and llvm::GCNDownwardRPTracker::advanceToNext().


The documentation for this class was generated from the following files: