LLVM 22.0.0git
|
Track resource usage for kernels / entry functions. More...
#include "Target/AMDGPU/SIProgramInfo.h"
Public Member Functions | |
SIProgramInfo ()=default | |
void | reset (const MachineFunction &MF) |
uint64_t | getFunctionCodeSize (const MachineFunction &MF, bool IsLowerBound=false) |
const MCExpr * | getComputePGMRSrc1 (const GCNSubtarget &ST, MCContext &Ctx) const |
Compute the value of the ComputePGMRsrc1 register. | |
const MCExpr * | getPGMRSrc1 (CallingConv::ID CC, const GCNSubtarget &ST, MCContext &Ctx) const |
const MCExpr * | getComputePGMRSrc2 (MCContext &Ctx) const |
Compute the value of the ComputePGMRsrc2 register. | |
const MCExpr * | getPGMRSrc2 (CallingConv::ID CC, MCContext &Ctx) const |
Track resource usage for kernels / entry functions.
Definition at line 32 of file SIProgramInfo.h.
|
default |
const MCExpr * SIProgramInfo::getComputePGMRSrc1 | ( | const GCNSubtarget & | ST, |
MCContext & | Ctx | ||
) | const |
Compute the value of the ComputePGMRsrc1 register.
Definition at line 169 of file SIProgramInfo.cpp.
References llvm::MCConstantExpr::create(), llvm::MCBinaryExpr::createOr(), getComputePGMRSrc1Reg(), MaskShift(), SGPRBlocks, and VGPRBlocks.
Referenced by getPGMRSrc1().
Compute the value of the ComputePGMRsrc2 register.
Definition at line 194 of file SIProgramInfo.cpp.
References llvm::MCConstantExpr::create(), llvm::MCBinaryExpr::createOr(), getComputePGMRSrc2Reg(), and ScratchEnable.
Referenced by getPGMRSrc2().
uint64_t SIProgramInfo::getFunctionCodeSize | ( | const MachineFunction & | MF, |
bool | IsLowerBound = false |
||
) |
Definition at line 208 of file SIProgramInfo.cpp.
References llvm::alignTo(), CodeSize, CodeSizeInBytes, llvm::MachineBasicBlock::getAlignment(), llvm::GCNSubtarget::getInstrInfo(), llvm::MachineFunction::getSubtarget(), MBB, MI, and TII.
Referenced by llvm::AMDGPUAsmPrinter::runOnMachineFunction().
const MCExpr * SIProgramInfo::getPGMRSrc1 | ( | CallingConv::ID | CC, |
const GCNSubtarget & | ST, | ||
MCContext & | Ctx | ||
) | const |
Definition at line 179 of file SIProgramInfo.cpp.
References llvm::MCConstantExpr::create(), llvm::MCBinaryExpr::createOr(), getComputePGMRSrc1(), getPGMRSrc1Reg(), llvm::AMDGPU::isCompute(), MaskShift(), SGPRBlocks, and VGPRBlocks.
const MCExpr * SIProgramInfo::getPGMRSrc2 | ( | CallingConv::ID | CC, |
MCContext & | Ctx | ||
) | const |
Definition at line 200 of file SIProgramInfo.cpp.
References llvm::MCConstantExpr::create(), getComputePGMRSrc2(), and llvm::AMDGPU::isCompute().
void SIProgramInfo::reset | ( | const MachineFunction & | MF | ) |
Definition at line 25 of file SIProgramInfo.cpp.
References AccumOffset, CodeSizeInBytes, ComputePGMRSrc3, llvm::MCConstantExpr::create(), DebugMode, DX10Clamp, DynamicCallStack, EXCPEnable, EXCPEnMSB, FlatUsed, FloatMode, FwdProgress, llvm::MachineFunction::getContext(), IEEEMode, LDSBlocks, LdsSize, LDSSize, MemOrdered, NamedBarCnt, NumAccVGPR, NumArchVGPR, NumSGPR, NumSGPRsForWavesPerEU, NumVGPR, NumVGPRsForWavesPerEU, Occupancy, Priority, Priv, RrWgMode, ScratchBlocks, ScratchEnable, ScratchSize, SGPRBlocks, SGPRSpill, TGIdXEnable, TGIdYEnable, TGIdZEnable, TGSizeEnable, TgSplit, TIdIGCompCount, TrapHandlerEnable, UserSGPR, VCCUsed, VGPRBlocks, VGPRSpill, and WgpMode.
Referenced by llvm::AMDGPUAsmPrinter::runOnMachineFunction().
Definition at line 72 of file SIProgramInfo.h.
Referenced by reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
std::optional<uint64_t> llvm::SIProgramInfo::CodeSizeInBytes |
Definition at line 33 of file SIProgramInfo.h.
Referenced by getFunctionCodeSize(), and reset().
Definition at line 67 of file SIProgramInfo.h.
Referenced by reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
uint32_t llvm::SIProgramInfo::DebugMode = 0 |
Definition at line 42 of file SIProgramInfo.h.
Referenced by getComputePGMRSrc1Reg(), getPGMRSrc1Reg(), and reset().
uint32_t llvm::SIProgramInfo::DX10Clamp = 0 |
Definition at line 41 of file SIProgramInfo.h.
Referenced by getComputePGMRSrc1Reg(), getPGMRSrc1Reg(), and reset().
Definition at line 94 of file SIProgramInfo.h.
Referenced by llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getHSAKernelProps(), and reset().
uint32_t llvm::SIProgramInfo::EXCPEnable = 0 |
Definition at line 65 of file SIProgramInfo.h.
Referenced by EmitPALMetadataCommon(), getComputePGMRSrc2Reg(), and reset().
uint32_t llvm::SIProgramInfo::EXCPEnMSB = 0 |
Definition at line 63 of file SIProgramInfo.h.
Referenced by getComputePGMRSrc2Reg(), and reset().
Definition at line 78 of file SIProgramInfo.h.
Referenced by llvm::AMDGPUAsmPrinter::emitFunctionBodyEnd(), and reset().
uint32_t llvm::SIProgramInfo::FloatMode = 0 |
Definition at line 39 of file SIProgramInfo.h.
Referenced by getComputePGMRSrc1Reg(), getPGMRSrc1Reg(), reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
uint32_t llvm::SIProgramInfo::FwdProgress = 0 |
Definition at line 46 of file SIProgramInfo.h.
Referenced by EmitPALMetadataCommon(), getComputePGMRSrc1Reg(), and reset().
uint32_t llvm::SIProgramInfo::IEEEMode = 0 |
Definition at line 43 of file SIProgramInfo.h.
Referenced by EmitPALMetadataCommon(), getComputePGMRSrc1Reg(), getPGMRSrc1Reg(), reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
uint32_t llvm::SIProgramInfo::LDSBlocks = 0 |
Definition at line 51 of file SIProgramInfo.h.
Referenced by reset().
uint32_t llvm::SIProgramInfo::LdsSize = 0 |
Definition at line 64 of file SIProgramInfo.h.
Referenced by EmitPALMetadataCommon(), getComputePGMRSrc2Reg(), and reset().
uint32_t llvm::SIProgramInfo::LDSSize = 0 |
Definition at line 77 of file SIProgramInfo.h.
Referenced by llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getHSAKernelProps(), reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
uint32_t llvm::SIProgramInfo::MemOrdered = 0 |
Definition at line 45 of file SIProgramInfo.h.
Referenced by EmitPALMetadataCommon(), getComputePGMRSrc1Reg(), getPGMRSrc1Reg(), and reset().
Definition at line 87 of file SIProgramInfo.h.
Referenced by reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
Definition at line 71 of file SIProgramInfo.h.
Referenced by llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getHSAKernelProps(), reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
Definition at line 70 of file SIProgramInfo.h.
Referenced by reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
Definition at line 74 of file SIProgramInfo.h.
Referenced by llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getHSAKernelProps(), reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
Definition at line 81 of file SIProgramInfo.h.
Referenced by llvm::AMDGPUAsmPrinter::emitFunctionBodyEnd(), reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
Definition at line 69 of file SIProgramInfo.h.
Referenced by llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getHSAKernelProps(), reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
Definition at line 84 of file SIProgramInfo.h.
Referenced by llvm::AMDGPUAsmPrinter::emitFunctionBodyEnd(), reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
Definition at line 90 of file SIProgramInfo.h.
Referenced by reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
uint32_t llvm::SIProgramInfo::Priority = 0 |
Definition at line 38 of file SIProgramInfo.h.
Referenced by getComputePGMRSrc1Reg(), getPGMRSrc1Reg(), and reset().
uint32_t llvm::SIProgramInfo::Priv = 0 |
Definition at line 40 of file SIProgramInfo.h.
Referenced by getComputePGMRSrc1Reg(), getPGMRSrc1Reg(), and reset().
uint32_t llvm::SIProgramInfo::RrWgMode = 0 |
Definition at line 47 of file SIProgramInfo.h.
Referenced by getComputePGMRSrc1Reg(), getPGMRSrc1Reg(), and reset().
Definition at line 52 of file SIProgramInfo.h.
Referenced by reset().
Definition at line 55 of file SIProgramInfo.h.
Referenced by getComputePGMRSrc2(), reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
Definition at line 48 of file SIProgramInfo.h.
Referenced by llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getHSAKernelProps(), reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
Definition at line 37 of file SIProgramInfo.h.
Referenced by getComputePGMRSrc1(), getPGMRSrc1(), reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
unsigned llvm::SIProgramInfo::SGPRSpill = 0 |
Definition at line 75 of file SIProgramInfo.h.
Referenced by reset().
uint32_t llvm::SIProgramInfo::TGIdXEnable = 0 |
Definition at line 58 of file SIProgramInfo.h.
Referenced by getComputePGMRSrc2Reg(), reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
uint32_t llvm::SIProgramInfo::TGIdYEnable = 0 |
Definition at line 59 of file SIProgramInfo.h.
Referenced by getComputePGMRSrc2Reg(), reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
uint32_t llvm::SIProgramInfo::TGIdZEnable = 0 |
Definition at line 60 of file SIProgramInfo.h.
Referenced by getComputePGMRSrc2Reg(), reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
uint32_t llvm::SIProgramInfo::TGSizeEnable = 0 |
Definition at line 61 of file SIProgramInfo.h.
Referenced by getComputePGMRSrc2Reg(), and reset().
uint32_t llvm::SIProgramInfo::TgSplit = 0 |
Definition at line 73 of file SIProgramInfo.h.
Referenced by reset().
uint32_t llvm::SIProgramInfo::TIdIGCompCount = 0 |
Definition at line 62 of file SIProgramInfo.h.
Referenced by getComputePGMRSrc2Reg(), reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
uint32_t llvm::SIProgramInfo::TrapHandlerEnable = 0 |
Definition at line 57 of file SIProgramInfo.h.
Referenced by EmitPALMetadataCommon(), getComputePGMRSrc2Reg(), reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
uint32_t llvm::SIProgramInfo::UserSGPR = 0 |
Definition at line 56 of file SIProgramInfo.h.
Referenced by getComputePGMRSrc2Reg(), reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
Definition at line 97 of file SIProgramInfo.h.
Referenced by llvm::AMDGPUAsmPrinter::emitFunctionBodyEnd(), and reset().
Definition at line 36 of file SIProgramInfo.h.
Referenced by getComputePGMRSrc1(), getPGMRSrc1(), reset(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
unsigned llvm::SIProgramInfo::VGPRSpill = 0 |
Definition at line 76 of file SIProgramInfo.h.
Referenced by reset().
uint32_t llvm::SIProgramInfo::WgpMode = 0 |
Definition at line 44 of file SIProgramInfo.h.
Referenced by EmitPALMetadataCommon(), getComputePGMRSrc1Reg(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getHSAKernelProps(), getPGMRSrc1Reg(), and reset().