LLVM  12.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
 
unsigned getMaxKernArgAlign () const
 
unsigned getLDSSize () 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)
 
Align getDynLDSAlign () const
 
void setDynLDSAlign (const DataLayout &DL, const GlobalVariable &GV)
 
- Public Member Functions inherited from llvm::MachineFunctionInfo
virtual ~MachineFunctionInfo ()
 

Protected Attributes

uint64_t ExplicitKernArgSize = 0
 
Align MaxKernArgAlign
 
unsigned LDSSize = 0
 Number of bytes in the LDS that are being used. More...
 
unsigned StaticLDSSize = 0
 Number of bytes in the LDS allocated statically. More...
 
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...
 

Detailed Description

Definition at line 20 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 43 of file AMDGPUMachineFunction.cpp.

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

◆ getDynLDSAlign()

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

Definition at line 98 of file AMDGPUMachineFunction.h.

References DynLDSAlign.

◆ getExplicitKernArgSize()

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

◆ getLDSSize()

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

◆ getMaxKernArgAlign()

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

Definition at line 68 of file AMDGPUMachineFunction.h.

References MaxKernArgAlign, and llvm::Align::value().

◆ getMode()

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

◆ hasNoSignedZerosFPMath()

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

Definition at line 84 of file AMDGPUMachineFunction.h.

References NoSignedZerosFPMath.

◆ isEntryFunction()

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

◆ isMemoryBound()

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

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

Referenced by getDynLDSAlign(), and setDynLDSAlign().

◆ ExplicitKernArgSize

uint64_t llvm::AMDGPUMachineFunction::ExplicitKernArgSize = 0
protected

Definition at line 26 of file AMDGPUMachineFunction.h.

Referenced by AMDGPUMachineFunction(), and getExplicitKernArgSize().

◆ IsEntryFunction

bool llvm::AMDGPUMachineFunction::IsEntryFunction = false
protected

Definition at line 48 of file AMDGPUMachineFunction.h.

Referenced by isEntryFunction().

◆ IsModuleEntryFunction

bool llvm::AMDGPUMachineFunction::IsModuleEntryFunction = false
protected

Definition at line 51 of file AMDGPUMachineFunction.h.

Referenced by isModuleEntryFunction().

◆ LDSSize

unsigned llvm::AMDGPUMachineFunction::LDSSize = 0
protected

Number of bytes in the LDS that are being used.

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

Referenced by hasNoSignedZerosFPMath().

◆ StaticLDSSize

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

Referenced by setDynLDSAlign().

◆ WaveLimiter

bool llvm::AMDGPUMachineFunction::WaveLimiter = false
protected

Definition at line 59 of file AMDGPUMachineFunction.h.

Referenced by AMDGPUMachineFunction(), and needsWaveLimiter().


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