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 303 of file GCNRegPressure.h.

Constructor & Destructor Documentation

◆ GCNUpwardRPTracker()

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

Definition at line 305 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 338 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 513 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 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 315 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 321 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 273 of file GCNRegPressure.cpp.

References MI, llvm::GCNRPTracker::MRI, and TRI.

◆ reset() [4/5]

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

reset tracker at the specified slot index SI.

Definition at line 310 of file GCNRegPressure.h.

References llvm::getLiveRegs(), llvm::GCNRPTracker::LIS, llvm::GCNRPTracker::MRI, and llvm::GCNRPTracker::reset().

Referenced by reset(), reset(), and llvm::GCNRegPressurePrinter::runOnMachineFunction().

◆ reset() [5/5]

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

Definition at line 283 of file GCNRegPressure.cpp.

References I.

◆ resetMaxPressure()

void llvm::GCNUpwardRPTracker::resetMaxPressure ( )
inline

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