LLVM 23.0.0git
llvm::GCNRPTracker Class Reference

#include "Target/AMDGPU/GCNRegPressure.h"

Inheritance diagram for llvm::GCNRPTracker:
[legend]

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 MachineInstrgetLastTrackedMI () const
void clearMaxPressure ()
GCNRegPressure getPressure () const
decltype(LiveRegsmoveLiveRegs ()

Protected Member Functions

 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

const LiveIntervalsLIS
LiveRegSet LiveRegs
GCNRegPressure CurPressure
GCNRegPressure MaxPressure
const MachineInstrLastTrackedMI = nullptr
const MachineRegisterInfoMRI = nullptr

Detailed Description

Definition at line 321 of file GCNRegPressure.h.

Member Typedef Documentation

◆ LiveRegSet

Constructor & Destructor Documentation

◆ GCNRPTracker()

llvm::GCNRPTracker::GCNRPTracker ( const LiveIntervals & LIS_)
inlineprotected

Member Function Documentation

◆ bumpDeadDefs()

void llvm::GCNRPTracker::bumpDeadDefs ( ArrayRef< VRegMaskOrUnit > DeadDefs)
protected

Mostly copy/paste from CodeGen/RegisterPressure.cpp.

References LiveRegs, MRI, and Reg.

◆ clearMaxPressure()

void llvm::GCNRPTracker::clearMaxPressure ( )
inline

Definition at line 357 of file GCNRegPressure.h.

References MaxPressure.

◆ getLastTrackedMI()

const MachineInstr * llvm::GCNRPTracker::getLastTrackedMI ( ) const
inline

Definition at line 355 of file GCNRegPressure.h.

References LastTrackedMI.

◆ getLastUsedLanes()

LaneBitmask GCNRPTracker::getLastUsedLanes ( Register Reg,
SlotIndex Pos ) const
protected

◆ getLiveRegs()

const decltype(LiveRegs) & llvm::GCNRPTracker::getLiveRegs ( ) const
inline

Definition at line 354 of file GCNRegPressure.h.

References LiveRegs.

Referenced by llvm::GCNRegPressurePrinter::runOnMachineFunction().

◆ getPressure()

GCNRegPressure llvm::GCNRPTracker::getPressure ( ) const
inline

◆ moveLiveRegs()

decltype(LiveRegs) llvm::GCNRPTracker::moveLiveRegs ( )
inline

Definition at line 361 of file GCNRegPressure.h.

References LiveRegs.

◆ reset() [1/4]

void GCNRPTracker::reset ( const MachineBasicBlock & MBB,
bool End )
protected

Resets tracker at the start or End of the MBB.

Definition at line 552 of file GCNRegPressure.cpp.

References LIS, MBB, and reset().

◆ reset() [2/4]

void GCNRPTracker::reset ( const MachineInstr & MI,
bool After )
protected

Resets tracker before or After the provided MI, which can be a debug instruction.

Definition at line 524 of file GCNRegPressure.cpp.

References LIS, MI, MRI, reset(), and llvm::skipDebugInstructionsForward().

Referenced by llvm::GCNDownwardRPTracker::reset(), reset(), and reset().

◆ reset() [3/4]

void GCNRPTracker::reset ( const MachineRegisterInfo & MRI,
const LiveRegSet & LiveRegs )

Resets tracker with the provided LiveRegs.

Definition at line 565 of file GCNRegPressure.cpp.

References CurPressure, llvm::getRegPressure(), LastTrackedMI, LiveRegs, MaxPressure, and MRI.

◆ reset() [4/4]

void GCNRPTracker::reset ( const MachineRegisterInfo & MRI,
SlotIndex SI )
protected

Resets tracker at the specified slot index SI.

Definition at line 558 of file GCNRegPressure.cpp.

References CurPressure, llvm::getLiveRegs(), llvm::getRegPressure(), LastTrackedMI, LIS, LiveRegs, MaxPressure, and MRI.

Member Data Documentation

◆ CurPressure

◆ LastTrackedMI

◆ LIS

◆ LiveRegs

◆ MaxPressure

◆ MRI


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