LLVM  16.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]
Collaboration diagram for llvm::AMDGPUMachineFunction:
Collaboration graph
[legend]

Public Member Functions

 AMDGPUMachineFunction (const MachineFunction &MF)
 
uint64_t getExplicitKernArgSize () const
 
Align getMaxKernArgAlign () const
 
uint32_t getLDSSize () const
 
uint32_t getGDSSize () const
 
bool isEntryFunction () const
 
bool isModuleEntryFunction () const
 
bool hasNoSignedZerosFPMath () const
 
bool isMemoryBound () const
 
bool needsWaveLimiter () const
 
unsigned allocateLDSGlobal (const DataLayout &DL, const GlobalVariable &GV)
 
unsigned allocateLDSGlobal (const DataLayout &DL, const GlobalVariable &GV, Align Trailing)
 
void allocateKnownAddressLDSGlobal (const Function &F)
 
Align getDynLDSAlign () const
 
void setDynLDSAlign (const DataLayout &DL, const GlobalVariable &GV)
 
- 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. More...
 

Static Public Member Functions

static const GlobalVariablegetKernelLDSGlobalFromFunction (const Function &F)
 
static Optional< uint32_tgetLDSKernelIdMetadata (const Function &F)
 
- Static Public Member Functions inherited from llvm::MachineFunctionInfo
template<typename Ty >
static Ty * create (BumpPtrAllocator &Allocator, MachineFunction &MF)
 Factory function: default behavior is to call new using the supplied allocator. More...
 
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. More...
 
uint32_t GDSSize = 0
 
uint32_t StaticLDSSize = 0
 Number of bytes in the LDS allocated statically. More...
 
uint32_t StaticGDSSize = 0
 
Align DynLDSAlign
 Align for dynamic shared memory if any. More...
 
bool IsEntryFunction = false
 
bool IsModuleEntryFunction = false
 
bool NoSignedZerosFPMath = false
 
bool MemoryBound = false
 
bool WaveLimiter = false
 

Detailed Description

Definition at line 23 of file AMDGPUMachineFunction.h.

Constructor & Destructor Documentation

◆ AMDGPUMachineFunction()

AMDGPUMachineFunction::AMDGPUMachineFunction ( const MachineFunction MF)

Member Function Documentation

◆ allocateKnownAddressLDSGlobal()

void AMDGPUMachineFunction::allocateKnownAddressLDSGlobal ( const Function F)

◆ 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 
)

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 51 of file AMDGPUMachineFunction.cpp.

◆ getDynLDSAlign()

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

Definition at line 113 of file AMDGPUMachineFunction.h.

References DynLDSAlign.

Referenced by allocateKnownAddressLDSGlobal().

◆ getExplicitKernArgSize()

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

◆ getGDSSize()

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

Definition at line 76 of file AMDGPUMachineFunction.h.

References GDSSize.

◆ getKernelLDSGlobalFromFunction()

const GlobalVariable * AMDGPUMachineFunction::getKernelLDSGlobalFromFunction ( const Function F)
static

Definition at line 88 of file AMDGPUMachineFunction.cpp.

References F, and M.

Referenced by allocateKnownAddressLDSGlobal().

◆ getLDSKernelIdMetadata()

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 70 of file AMDGPUMachineFunction.h.

References MaxKernArgAlign.

◆ hasNoSignedZerosFPMath()

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

Definition at line 86 of file AMDGPUMachineFunction.h.

References NoSignedZerosFPMath.

◆ isEntryFunction()

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

◆ isMemoryBound()

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

Definition at line 90 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 DataLayout DL,
const GlobalVariable GV 
)

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 46 of file AMDGPUMachineFunction.h.

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

◆ ExplicitKernArgSize

uint64_t llvm::AMDGPUMachineFunction::ExplicitKernArgSize = 0
protected

Definition at line 29 of file AMDGPUMachineFunction.h.

Referenced by AMDGPUMachineFunction(), and getExplicitKernArgSize().

◆ GDSSize

uint32_t llvm::AMDGPUMachineFunction::GDSSize = 0
protected

Definition at line 34 of file AMDGPUMachineFunction.h.

Referenced by AMDGPUMachineFunction(), and getGDSSize().

◆ IsEntryFunction

bool llvm::AMDGPUMachineFunction::IsEntryFunction = false
protected

Definition at line 50 of file AMDGPUMachineFunction.h.

Referenced by isEntryFunction().

◆ IsModuleEntryFunction

bool llvm::AMDGPUMachineFunction::IsModuleEntryFunction = false
protected

Definition at line 53 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 33 of file AMDGPUMachineFunction.h.

Referenced by getLDSSize(), and setDynLDSAlign().

◆ MaxKernArgAlign

Align llvm::AMDGPUMachineFunction::MaxKernArgAlign
protected

◆ MemoryBound

bool llvm::AMDGPUMachineFunction::MemoryBound = false
protected

Definition at line 58 of file AMDGPUMachineFunction.h.

Referenced by AMDGPUMachineFunction(), and isMemoryBound().

◆ NoSignedZerosFPMath

bool llvm::AMDGPUMachineFunction::NoSignedZerosFPMath = false
protected

Definition at line 55 of file AMDGPUMachineFunction.h.

Referenced by hasNoSignedZerosFPMath().

◆ StaticGDSSize

uint32_t llvm::AMDGPUMachineFunction::StaticGDSSize = 0
protected

Definition at line 39 of file AMDGPUMachineFunction.h.

Referenced by 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 38 of file AMDGPUMachineFunction.h.

Referenced by setDynLDSAlign().

◆ WaveLimiter

bool llvm::AMDGPUMachineFunction::WaveLimiter = false
protected

Definition at line 61 of file AMDGPUMachineFunction.h.

Referenced by AMDGPUMachineFunction(), and needsWaveLimiter().


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