LLVM 22.0.0git
GCNRegPressure.h File Reference

This file defines the GCNRegPressure class, which tracks registry pressure by bookkeeping number of SGPR/VGPRs used, weights for large SGPR/VGPRs. More...

#include "GCNSubtarget.h"
#include "llvm/CodeGen/LiveIntervals.h"
#include "llvm/CodeGen/RegisterPressure.h"
#include <algorithm>

Go to the source code of this file.

Classes

struct  llvm::GCNRegPressure
class  llvm::GCNRPTarget
 Models a register pressure target, allowing to evaluate and track register savings against that target from a starting GCNRegPressure. More...
class  llvm::GCNRPTracker
class  llvm::GCNUpwardRPTracker
class  llvm::GCNDownwardRPTracker
struct  llvm::GCNRegPressurePrinter

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

Functions

GCNRegPressure llvm::max (const GCNRegPressure &P1, const GCNRegPressure &P2)
GCNRegPressure llvm::operator+ (const GCNRegPressure &P1, const GCNRegPressure &P2)
GCNRegPressure llvm::operator- (const GCNRegPressure &P1, const GCNRegPressure &P2)
GCNRPTracker::LiveRegSet llvm::getLiveRegs (SlotIndex SI, const LiveIntervals &LIS, const MachineRegisterInfo &MRI)
LaneBitmask llvm::getLiveLaneMask (unsigned Reg, SlotIndex SI, const LiveIntervals &LIS, const MachineRegisterInfo &MRI, LaneBitmask LaneMaskFilter=LaneBitmask::getAll())
LaneBitmask llvm::getLiveLaneMask (const LiveInterval &LI, SlotIndex SI, const MachineRegisterInfo &MRI, LaneBitmask LaneMaskFilter=LaneBitmask::getAll())
template<typename Range>
DenseMap< MachineInstr *, GCNRPTracker::LiveRegSetllvm::getLiveRegMap (Range &&R, bool After, LiveIntervals &LIS)
 creates a map MachineInstr -> LiveRegSet R - range of iterators on instructions After - upon entry or exit of every instruction Note: there is no entry in the map for instructions with empty live reg set Complexity = O(NumVirtRegs * averageLiveRangeSegmentsPerReg * lg(R))
GCNRPTracker::LiveRegSet llvm::getLiveRegsAfter (const MachineInstr &MI, const LiveIntervals &LIS)
GCNRPTracker::LiveRegSet llvm::getLiveRegsBefore (const MachineInstr &MI, const LiveIntervals &LIS)
template<typename Range>
GCNRegPressure llvm::getRegPressure (const MachineRegisterInfo &MRI, Range &&LiveRegs)
bool llvm::isEqual (const GCNRPTracker::LiveRegSet &S1, const GCNRPTracker::LiveRegSet &S2)
Printable llvm::print (const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr, unsigned DynamicVGPRBlockSize=0)
Printable llvm::print (const GCNRPTracker::LiveRegSet &LiveRegs, const MachineRegisterInfo &MRI)
Printable llvm::reportMismatch (const GCNRPTracker::LiveRegSet &LISLR, const GCNRPTracker::LiveRegSet &TrackedL, const TargetRegisterInfo *TRI, StringRef Pfx=" ")

Detailed Description

This file defines the GCNRegPressure class, which tracks registry pressure by bookkeeping number of SGPR/VGPRs used, weights for large SGPR/VGPRs.

It also implements a compare function, which compares different register pressures, and declares one with max occupancy as winner.

Definition in file GCNRegPressure.h.