LLVM: llvm::AMDGPUMachineFunction Class Reference (original) (raw)

#include "[Target/AMDGPU/AMDGPUMachineFunction.h](AMDGPUMachineFunction%5F8h%5Fsource.html)"

Public Member Functions
AMDGPUMachineFunction (const Function &F, const AMDGPUSubtarget &ST)
uint64_t getExplicitKernArgSize () const
Align getMaxKernArgAlign () const
uint32_t getLDSSize () const
uint32_t getGDSSize () const
bool isEntryFunction () const
bool isModuleEntryFunction () const
bool isChainFunction () const
bool isBottomOfStack () const
bool hasNoSignedZerosFPMath () const
bool isMemoryBound () const
bool needsWaveLimiter () const
bool hasInitWholeWave () const
void setInitWholeWave ()
unsigned allocateLDSGlobal (const DataLayout &DL, const GlobalVariable &GV)
unsigned allocateLDSGlobal (const DataLayout &DL, const GlobalVariable &GV, Align Trailing)
Align getDynLDSAlign () const
void setDynLDSAlign (const Function &F, const GlobalVariable &GV)
void setUsesDynamicLDS (bool DynLDS)
bool isDynamicLDSUsed () const
- Public Member Functions inherited from llvm::MachineFunctionInfo
virtual ~MachineFunctionInfo ()
virtual MachineFunctionInfo * clone (BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const
Make a functionally equivalent copy of this MachineFunctionInfo in MF.
Static Public Member Functions
static std::optional< uint32_t > getLDSKernelIdMetadata (const Function &F)
static std::optional< uint32_t > getLDSAbsoluteAddress (const GlobalValue &GV)
- Static Public Member Functions inherited from llvm::MachineFunctionInfo
template<typename FuncInfoTy , typename SubtargetTy = TargetSubtargetInfo>
static FuncInfoTy * create (BumpPtrAllocator &Allocator, const Function &F, const SubtargetTy *STI)
Factory function: default behavior is to call new using the supplied allocator.
template
static Ty * create (BumpPtrAllocator &Allocator, const Ty &MFI)
Protected Attributes
uint64_t ExplicitKernArgSize = 0
Align MaxKernArgAlign
uint32_t LDSSize = 0
Number of bytes in the LDS that are being used.
uint32_t GDSSize = 0
uint32_t StaticLDSSize = 0
Number of bytes in the LDS allocated statically.
uint32_t StaticGDSSize = 0
Align DynLDSAlign
Align for dynamic shared memory if any.
bool UsesDynamicLDS = false
bool IsEntryFunction = false
bool IsModuleEntryFunction = false
bool IsChainFunction = false
bool NoSignedZerosFPMath = false
bool MemoryBound = false
bool WaveLimiter = false
bool HasInitWholeWave = false

Definition at line 24 of file AMDGPUMachineFunction.h.

Definition at line 42 of file AMDGPUMachineFunction.cpp.

References llvm::CallingConv::AMDGPU_KERNEL, CC, llvm::StringRef::consumeInteger(), llvm::StringRef::empty(), ExplicitKernArgSize, F, GDSSize, llvm::AMDGPU::getIntegerPairAttribute(), getKernelDynLDSGlobalFromFunction(), llvm::Attribute::getValueAsBool(), llvm::Attribute::getValueAsString(), hasLDSKernelArgument(), llvm::Attribute::isStringAttribute(), LDSSize, MaxKernArgAlign, MemoryBound, NoSignedZerosFPMath, llvm::CallingConv::SPIR_KERNEL, StaticGDSSize, StaticLDSSize, UsesDynamicLDS, and WaveLimiter.

allocateLDSGlobal() [1/2]

allocateLDSGlobal() [2/2]

TODO: We should sort these to minimize wasted space due to alignment padding. Currently the padding is decided by the first encountered use during lowering.

Definition at line 93 of file AMDGPUMachineFunction.cpp.

References llvm::alignTo(), assert(), DL, GDSSize, llvm::GlobalValue::getAddressSpace(), llvm::GlobalObject::getAlign(), getLDSAbsoluteAddress(), llvm::GlobalValue::getValueType(), isModuleEntryFunction(), llvm::AMDGPU::isNamedBarrier(), LDSSize, llvm_unreachable, llvm::AMDGPUAS::LOCAL_ADDRESS, llvm::Offset, llvm::AMDGPUAS::REGION_ADDRESS, llvm::report_fatal_error(), StaticGDSSize, and StaticLDSSize.

getDynLDSAlign()

Align llvm::AMDGPUMachineFunction::getDynLDSAlign ( ) const inline

getExplicitKernArgSize()

uint64_t llvm::AMDGPUMachineFunction::getExplicitKernArgSize ( ) const inline

getGDSSize()

uint32_t llvm::AMDGPUMachineFunction::getGDSSize ( ) const inline

getLDSAbsoluteAddress()

getLDSKernelIdMetadata()

getLDSSize()

uint32_t llvm::AMDGPUMachineFunction::getLDSSize ( ) const inline

getMaxKernArgAlign()

Align llvm::AMDGPUMachineFunction::getMaxKernArgAlign ( ) const inline

hasInitWholeWave()

bool llvm::AMDGPUMachineFunction::hasInitWholeWave ( ) const inline

hasNoSignedZerosFPMath()

bool llvm::AMDGPUMachineFunction::hasNoSignedZerosFPMath ( ) const inline

isBottomOfStack()

bool llvm::AMDGPUMachineFunction::isBottomOfStack ( ) const inline

isChainFunction()

bool llvm::AMDGPUMachineFunction::isChainFunction ( ) const inline

isDynamicLDSUsed()

bool AMDGPUMachineFunction::isDynamicLDSUsed ( ) const

isEntryFunction()

bool llvm::AMDGPUMachineFunction::isEntryFunction ( ) const inline

Definition at line 89 of file AMDGPUMachineFunction.h.

References IsEntryFunction.

Referenced by llvm::SIMachineFunctionInfo::allocateWWMSpill(), llvm::SIFrameLowering::determineCalleeSaves(), llvm::SIFrameLowering::determineCalleeSavesSGPR(), llvm::SIFrameLowering::emitEntryFunctionPrologue(), llvm::SIFrameLowering::emitEpilogue(), llvm::AMDGPUAsmPrinter::emitFunctionBodyEnd(), llvm::AMDGPUAsmPrinter::emitFunctionBodyStart(), llvm::AMDGPUAsmPrinter::emitFunctionEntryLabel(), llvm::SIFrameLowering::emitPrologue(), llvm::SIFrameLowering::hasFPImpl(), isBottomOfStack(), llvm::AMDGPULegalizerInfo::legalizeImplicitArgPtr(), llvm::AMDGPULegalizerInfo::legalizeLDSKernelId(), llvm::SIFrameLowering::requiresStackPointerReference(), llvm::AMDGPUAsmPrinter::runOnMachineFunction(), and llvm::SIMachineFunctionInfo::SIMachineFunctionInfo().

isMemoryBound()

bool llvm::AMDGPUMachineFunction::isMemoryBound ( ) const inline

isModuleEntryFunction()

bool llvm::AMDGPUMachineFunction::isModuleEntryFunction ( ) const inline

needsWaveLimiter()

bool llvm::AMDGPUMachineFunction::needsWaveLimiter ( ) const inline

setDynLDSAlign()

Definition at line 207 of file AMDGPUMachineFunction.cpp.

References llvm::alignTo(), assert(), DL, DynLDSAlign, F, llvm::GlobalObject::getAlign(), getKernelDynLDSGlobalFromFunction(), getLDSAbsoluteAddress(), llvm::GlobalValue::getValueType(), LDSSize, llvm::Offset, llvm::report_fatal_error(), and StaticLDSSize.

Referenced by llvm::AMDGPULegalizerInfo::legalizeGlobalValue().

setInitWholeWave()

void llvm::AMDGPUMachineFunction::setInitWholeWave ( ) inline

setUsesDynamicLDS()

void AMDGPUMachineFunction::setUsesDynamicLDS ( bool DynLDS )

DynLDSAlign

Align llvm::AMDGPUMachineFunction::DynLDSAlign protected

ExplicitKernArgSize

uint64_t llvm::AMDGPUMachineFunction::ExplicitKernArgSize = 0 protected

GDSSize

uint32_t llvm::AMDGPUMachineFunction::GDSSize = 0 protected

HasInitWholeWave

bool llvm::AMDGPUMachineFunction::HasInitWholeWave = false protected

IsChainFunction

bool llvm::AMDGPUMachineFunction::IsChainFunction = false protected

IsEntryFunction

bool llvm::AMDGPUMachineFunction::IsEntryFunction = false protected

IsModuleEntryFunction

bool llvm::AMDGPUMachineFunction::IsModuleEntryFunction = false protected

LDSSize

uint32_t llvm::AMDGPUMachineFunction::LDSSize = 0 protected

MaxKernArgAlign

Align llvm::AMDGPUMachineFunction::MaxKernArgAlign protected

MemoryBound

bool llvm::AMDGPUMachineFunction::MemoryBound = false protected

NoSignedZerosFPMath

bool llvm::AMDGPUMachineFunction::NoSignedZerosFPMath = false protected

StaticGDSSize

uint32_t llvm::AMDGPUMachineFunction::StaticGDSSize = 0 protected

StaticLDSSize

uint32_t llvm::AMDGPUMachineFunction::StaticLDSSize = 0 protected

UsesDynamicLDS

bool llvm::AMDGPUMachineFunction::UsesDynamicLDS = false protected

WaveLimiter

bool llvm::AMDGPUMachineFunction::WaveLimiter = false protected

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