LLVM 22.0.0git
AMDGPUAsmPrinter.cpp File Reference

The AMDGPUAsmPrinter is used to print both assembly string and also binary code. More...

Go to the source code of this file.

Functions

static uint32_t getFPMode (SIModeRegisterDefaults Mode)
static AsmPrintercreateAMDGPUAsmPrinterPass (TargetMachine &tm, std::unique_ptr< MCStreamer > &&Streamer)
LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAMDGPUAsmPrinter ()
const AMDGPUMCExprcreateOccupancy (unsigned InitOcc, const MCExpr *NumSGPRs, const MCExpr *NumVGPRs, unsigned DynamicVGPRBlockSize, const GCNSubtarget &STM, MCContext &Ctx)
 Mimics GCNSubtarget::computeOccupancy for MCExpr.
static const MCExprcomputeAccumOffset (const MCExpr *NumVGPR, MCContext &Ctx)
static unsigned getRsrcReg (CallingConv::ID CallConv)
static void EmitPALMetadataCommon (AMDGPUPALMetadata *MD, const SIProgramInfo &CurrentProgramInfo, CallingConv::ID CC, const GCNSubtarget &ST, unsigned DynamicVGPRBlockSize)
static amd_element_byte_size_t getElementByteSizeValue (unsigned Size)

Detailed Description

The AMDGPUAsmPrinter is used to print both assembly string and also binary code.

When passed an MCAsmStreamer it prints assembly and when passed an MCObjectStreamer it outputs binary code.

Definition in file AMDGPUAsmPrinter.cpp.

Function Documentation

◆ computeAccumOffset()

◆ createAMDGPUAsmPrinterPass()

AsmPrinter * createAMDGPUAsmPrinterPass ( TargetMachine & tm,
std::unique_ptr< MCStreamer > && Streamer )
static

Definition at line 83 of file AMDGPUAsmPrinter.cpp.

Referenced by LLVMInitializeAMDGPUAsmPrinter().

◆ createOccupancy()

const AMDGPUMCExpr * createOccupancy ( unsigned InitOcc,
const MCExpr * NumSGPRs,
const MCExpr * NumVGPRs,
unsigned DynamicVGPRBlockSize,
const GCNSubtarget & STM,
MCContext & Ctx )

Mimics GCNSubtarget::computeOccupancy for MCExpr.

Remove dependency on GCNSubtarget and depend only only the necessary values for said occupancy computation. Should match computeOccupancy implementation without passing STM on.

Definition at line 366 of file AMDGPUAsmPrinter.cpp.

References llvm::AMDGPUMCExpr::AGVK_Occupancy, llvm::AMDGPUMCExpr::create(), llvm::MCConstantExpr::create(), llvm::GCNSubtarget::getGeneration(), llvm::AMDGPU::IsaInfo::getMaxWavesPerEU(), llvm::AMDGPU::IsaInfo::getTotalNumVGPRs(), and llvm::AMDGPU::IsaInfo::getVGPRAllocGranule().

◆ EmitPALMetadataCommon()

◆ getElementByteSizeValue()

amd_element_byte_size_t getElementByteSizeValue ( unsigned Size)
static

◆ getFPMode()

◆ getRsrcReg()

◆ LLVMInitializeAMDGPUAsmPrinter()