LLVM 22.0.0git
llvm::GCNUpwardRPTracker Class Reference

#include "Target/AMDGPU/GCNRegPressure.h"

Inheritance diagram for llvm::GCNUpwardRPTracker:
[legend]

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

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< VRegMaskOrUnit > 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 LiveIntervalsLIS
LiveRegSet LiveRegs
GCNRegPressure CurPressure
GCNRegPressure MaxPressure
const MachineInstrLastTrackedMI = nullptr
const MachineRegisterInfoMRI = nullptr

Detailed Description

Definition at line 322 of file GCNRegPressure.h.

Constructor & Destructor Documentation

◆ GCNUpwardRPTracker()

llvm::GCNUpwardRPTracker::GCNUpwardRPTracker ( const LiveIntervals & LIS_)
inline

Definition at line 324 of file GCNRegPressure.h.

References llvm::GCNRPTracker::GCNRPTracker().

Member Function Documentation

◆ getMaxPressure()

const GCNRegPressure & llvm::GCNUpwardRPTracker::getMaxPressure ( ) const
inline

◆ getMaxPressureAndReset()

GCNRegPressure llvm::GCNUpwardRPTracker::getMaxPressureAndReset ( )
inline

Definition at line 357 of file GCNRegPressure.h.

References llvm::GCNRPTracker::MaxPressure, and resetMaxPressure().

◆ isValid()

bool GCNUpwardRPTracker::isValid ( ) const

◆ recede()

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 518 of file GCNRegPressure.cpp.

References assert(), collectVirtualRegUses(), llvm::GCNRPTracker::CurPressure, 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::dumpMaxRegPressure(), getRegisterPressures(), and llvm::GCNRegPressurePrinter::runOnMachineFunction().

◆ reset() [1/5]

void llvm::GCNUpwardRPTracker::reset ( const MachineBasicBlock & MBB)
inline

reset tracker to the end of the MBB.

Definition at line 334 of file GCNRegPressure.h.

References llvm::GCNRPTracker::LIS, MBB, and reset().

◆ reset() [2/5]

void llvm::GCNUpwardRPTracker::reset ( const MachineInstr & MI)
inline

reset tracker to the point just after MI (in program order).

Definition at line 340 of file GCNRegPressure.h.

References llvm::GCNRPTracker::LIS, MI, and reset().

◆ reset() [3/5]

void GCNRPTracker::reset ( const MachineInstr & MI,
const LiveRegSet * LiveRegsCopy,
bool After )

Definition at line 290 of file GCNRegPressure.cpp.

References I, llvm::GCNRPTracker::MRI, P, and TRI.

◆ reset() [4/5]

void llvm::GCNUpwardRPTracker::reset ( const MachineRegisterInfo & MRI,
SlotIndex SI )
inline

◆ reset() [5/5]

void GCNRPTracker::reset ( const MachineRegisterInfo & MRI_,
const LiveRegSet & LiveRegs_ )

Definition at line 300 of file GCNRegPressure.cpp.

References llvm::GCNRPTracker::LIS, MI, llvm::GCNRPTracker::MRI, and P.

◆ resetMaxPressure()

void llvm::GCNUpwardRPTracker::resetMaxPressure ( )
inline

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