LLVM  15.0.0git
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
 
AMDGPU::SIModeRegisterDefaults getMode () const
 
bool isEntryFunction () const
 
bool isModuleEntryFunction () const
 
bool hasNoSignedZerosFPMath () const
 
bool isMemoryBound () const
 
bool needsWaveLimiter () const
 
unsigned allocateLDSGlobal (const DataLayout &DL, const GlobalVariable &GV)
 
void allocateModuleLDSGlobal (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...
 

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...
 
AMDGPU::SIModeRegisterDefaults Mode
 
bool IsEntryFunction = false
 
bool IsModuleEntryFunction = false
 
bool NoSignedZerosFPMath = false
 
bool MemoryBound = false
 
bool WaveLimiter = false
 

Additional Inherited Members

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

Detailed Description

Definition at line 22 of file AMDGPUMachineFunction.h.

Constructor & Destructor Documentation

◆ AMDGPUMachineFunction()

AMDGPUMachineFunction::AMDGPUMachineFunction ( const MachineFunction MF)

Member Function Documentation

◆ allocateLDSGlobal()

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

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

Referenced by allocateModuleLDSGlobal(), llvm::AMDGPULegalizerInfo::legalizeGlobalValue(), and llvm::AMDGPUTargetLowering::LowerGlobalAddress().

◆ allocateModuleLDSGlobal()

void AMDGPUMachineFunction::allocateModuleLDSGlobal ( const Function F)

◆ getDynLDSAlign()

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

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

References GDSSize.

◆ getLDSSize()

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

◆ getMaxKernArgAlign()

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

Definition at line 72 of file AMDGPUMachineFunction.h.

References MaxKernArgAlign.

◆ getMode()

AMDGPU::SIModeRegisterDefaults llvm::AMDGPUMachineFunction::getMode ( ) const
inline

◆ hasNoSignedZerosFPMath()

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

Definition at line 92 of file AMDGPUMachineFunction.h.

References NoSignedZerosFPMath.

◆ isEntryFunction()

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

◆ isMemoryBound()

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

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

Referenced by getDynLDSAlign(), and setDynLDSAlign().

◆ ExplicitKernArgSize

uint64_t llvm::AMDGPUMachineFunction::ExplicitKernArgSize = 0
protected

Definition at line 28 of file AMDGPUMachineFunction.h.

Referenced by AMDGPUMachineFunction(), and getExplicitKernArgSize().

◆ GDSSize

uint32_t llvm::AMDGPUMachineFunction::GDSSize = 0
protected

Definition at line 33 of file AMDGPUMachineFunction.h.

Referenced by AMDGPUMachineFunction(), and getGDSSize().

◆ IsEntryFunction

bool llvm::AMDGPUMachineFunction::IsEntryFunction = false
protected

Definition at line 52 of file AMDGPUMachineFunction.h.

Referenced by isEntryFunction().

◆ IsModuleEntryFunction

bool llvm::AMDGPUMachineFunction::IsModuleEntryFunction = false
protected

Definition at line 55 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 32 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 60 of file AMDGPUMachineFunction.h.

Referenced by AMDGPUMachineFunction(), and isMemoryBound().

◆ Mode

AMDGPU::SIModeRegisterDefaults llvm::AMDGPUMachineFunction::Mode
protected

◆ NoSignedZerosFPMath

bool llvm::AMDGPUMachineFunction::NoSignedZerosFPMath = false
protected

Definition at line 57 of file AMDGPUMachineFunction.h.

Referenced by hasNoSignedZerosFPMath().

◆ StaticGDSSize

uint32_t llvm::AMDGPUMachineFunction::StaticGDSSize = 0
protected

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

Referenced by setDynLDSAlign().

◆ WaveLimiter

bool llvm::AMDGPUMachineFunction::WaveLimiter = false
protected

Definition at line 63 of file AMDGPUMachineFunction.h.

Referenced by AMDGPUMachineFunction(), and needsWaveLimiter().


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