LLVM 20.0.0git
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
llvm::AMDGPUMachineFunction Class Reference

#include "Target/AMDGPU/AMDGPUMachineFunction.h"

Inheritance diagram for llvm::AMDGPUMachineFunction:
Inheritance graph
[legend]

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 MachineFunctionInfoclone (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_tgetLDSKernelIdMetadata (const Function &F)
 
static std::optional< uint32_tgetLDSAbsoluteAddress (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<typename Ty >
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
 

Detailed Description

Definition at line 24 of file AMDGPUMachineFunction.h.

Constructor & Destructor Documentation

◆ AMDGPUMachineFunction()

AMDGPUMachineFunction::AMDGPUMachineFunction ( const Function F,
const AMDGPUSubtarget ST 
)

Member Function Documentation

◆ allocateLDSGlobal() [1/2]

unsigned llvm::AMDGPUMachineFunction::allocateLDSGlobal ( const DataLayout DL,
const GlobalVariable GV 
)
inline

◆ allocateLDSGlobal() [2/2]

unsigned AMDGPUMachineFunction::allocateLDSGlobal ( const DataLayout DL,
const GlobalVariable GV,
Align  Trailing 
)

◆ getDynLDSAlign()

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

Definition at line 127 of file AMDGPUMachineFunction.h.

References DynLDSAlign.

◆ getExplicitKernArgSize()

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

◆ getGDSSize()

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

Definition at line 85 of file AMDGPUMachineFunction.h.

References GDSSize.

◆ getLDSAbsoluteAddress()

std::optional< uint32_t > AMDGPUMachineFunction::getLDSAbsoluteAddress ( const GlobalValue GV)
static

◆ getLDSKernelIdMetadata()

std::optional< uint32_t > AMDGPUMachineFunction::getLDSKernelIdMetadata ( const Function F)
static

◆ getLDSSize()

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

◆ getMaxKernArgAlign()

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

Definition at line 79 of file AMDGPUMachineFunction.h.

References MaxKernArgAlign.

◆ hasInitWholeWave()

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

Definition at line 114 of file AMDGPUMachineFunction.h.

References HasInitWholeWave.

Referenced by llvm::SIMachineFunctionInfo::allocateWWMSpill().

◆ hasNoSignedZerosFPMath()

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

Definition at line 102 of file AMDGPUMachineFunction.h.

References NoSignedZerosFPMath.

◆ 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

◆ isMemoryBound()

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

Definition at line 106 of file AMDGPUMachineFunction.h.

References MemoryBound.

Referenced by llvm::SIMachineFunctionInfo::getMinAllowedOccupancy().

◆ isModuleEntryFunction()

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

◆ needsWaveLimiter()

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

◆ setDynLDSAlign()

void AMDGPUMachineFunction::setDynLDSAlign ( const Function F,
const GlobalVariable GV 
)

◆ setInitWholeWave()

void llvm::AMDGPUMachineFunction::setInitWholeWave ( )
inline

◆ setUsesDynamicLDS()

void AMDGPUMachineFunction::setUsesDynamicLDS ( bool  DynLDS)

Definition at line 235 of file AMDGPUMachineFunction.cpp.

References UsesDynamicLDS.

Member Data Documentation

◆ DynLDSAlign

Align llvm::AMDGPUMachineFunction::DynLDSAlign
protected

Align for dynamic shared memory if any.

Dynamic shared memory is allocated directly after the static one, i.e., LDSSize. Need to pad LDSSize to ensure that dynamic one is aligned accordingly. The maximal alignment is updated during IR translation or lowering stages.

Definition at line 47 of file AMDGPUMachineFunction.h.

Referenced by allocateLDSGlobal(), getDynLDSAlign(), and setDynLDSAlign().

◆ ExplicitKernArgSize

uint64_t llvm::AMDGPUMachineFunction::ExplicitKernArgSize = 0
protected

Definition at line 30 of file AMDGPUMachineFunction.h.

Referenced by AMDGPUMachineFunction(), and getExplicitKernArgSize().

◆ GDSSize

uint32_t llvm::AMDGPUMachineFunction::GDSSize = 0
protected

Definition at line 35 of file AMDGPUMachineFunction.h.

Referenced by allocateLDSGlobal(), AMDGPUMachineFunction(), and getGDSSize().

◆ HasInitWholeWave

bool llvm::AMDGPUMachineFunction::HasInitWholeWave = false
protected

Definition at line 70 of file AMDGPUMachineFunction.h.

Referenced by hasInitWholeWave(), and setInitWholeWave().

◆ IsChainFunction

bool llvm::AMDGPUMachineFunction::IsChainFunction = false
protected

Definition at line 60 of file AMDGPUMachineFunction.h.

Referenced by isChainFunction().

◆ IsEntryFunction

bool llvm::AMDGPUMachineFunction::IsEntryFunction = false
protected

Definition at line 54 of file AMDGPUMachineFunction.h.

Referenced by isEntryFunction().

◆ IsModuleEntryFunction

bool llvm::AMDGPUMachineFunction::IsModuleEntryFunction = false
protected

Definition at line 57 of file AMDGPUMachineFunction.h.

Referenced by isModuleEntryFunction().

◆ LDSSize

uint32_t llvm::AMDGPUMachineFunction::LDSSize = 0
protected

Number of bytes in the LDS that are being used.

Definition at line 34 of file AMDGPUMachineFunction.h.

Referenced by allocateLDSGlobal(), AMDGPUMachineFunction(), getLDSSize(), and setDynLDSAlign().

◆ MaxKernArgAlign

Align llvm::AMDGPUMachineFunction::MaxKernArgAlign
protected

◆ MemoryBound

bool llvm::AMDGPUMachineFunction::MemoryBound = false
protected

Definition at line 65 of file AMDGPUMachineFunction.h.

Referenced by AMDGPUMachineFunction(), and isMemoryBound().

◆ NoSignedZerosFPMath

bool llvm::AMDGPUMachineFunction::NoSignedZerosFPMath = false
protected

Definition at line 62 of file AMDGPUMachineFunction.h.

Referenced by AMDGPUMachineFunction(), and hasNoSignedZerosFPMath().

◆ StaticGDSSize

uint32_t llvm::AMDGPUMachineFunction::StaticGDSSize = 0
protected

Definition at line 40 of file AMDGPUMachineFunction.h.

Referenced by allocateLDSGlobal(), and AMDGPUMachineFunction().

◆ StaticLDSSize

uint32_t llvm::AMDGPUMachineFunction::StaticLDSSize = 0
protected

Number of bytes in the LDS allocated statically.

This field is only used in the instruction selector and not part of the machine function info.

Definition at line 39 of file AMDGPUMachineFunction.h.

Referenced by allocateLDSGlobal(), AMDGPUMachineFunction(), and setDynLDSAlign().

◆ UsesDynamicLDS

bool llvm::AMDGPUMachineFunction::UsesDynamicLDS = false
protected

◆ WaveLimiter

bool llvm::AMDGPUMachineFunction::WaveLimiter = false
protected

Definition at line 68 of file AMDGPUMachineFunction.h.

Referenced by AMDGPUMachineFunction(), and needsWaveLimiter().


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