LLVM
12.0.0git
|
#include "Target/AMDGPU/AMDGPUMachineFunction.h"
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) |
![]() | |
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 | |
![]() | |
template<typename Ty > | |
static Ty * | create (BumpPtrAllocator &Allocator, MachineFunction &MF) |
Factory function: default behavior is to call new using the supplied allocator. More... | |
Definition at line 20 of file AMDGPUMachineFunction.h.
AMDGPUMachineFunction::AMDGPUMachineFunction | ( | const MachineFunction & | MF | ) |
Definition at line 17 of file AMDGPUMachineFunction.cpp.
References llvm::CallingConv::AMDGPU_KERNEL, ExplicitKernArgSize, F(), llvm::AMDGPUSubtarget::get(), llvm::MachineFunction::getFunction(), llvm::Attribute::getValueAsString(), llvm::Attribute::isStringAttribute(), MaxKernArgAlign, MemoryBound, llvm::CallingConv::SPIR_KERNEL, llvm::ARM_MB::ST, and WaveLimiter.
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().
|
inline |
Definition at line 98 of file AMDGPUMachineFunction.h.
References DynLDSAlign.
|
inline |
Definition at line 64 of file AMDGPUMachineFunction.h.
References ExplicitKernArgSize.
Referenced by llvm::AMDGPUTargetLowering::getImplicitParameterOffset().
|
inline |
Definition at line 70 of file AMDGPUMachineFunction.h.
References LDSSize.
Referenced by llvm::SITargetLowering::EmitInstrWithCustomInserter(), llvm::SIRegisterInfo::getRegPressureLimit(), llvm::SIMachineFunctionInfo::limitOccupancy(), and llvm::SIMachineFunctionInfo::SIMachineFunctionInfo().
|
inline |
Definition at line 68 of file AMDGPUMachineFunction.h.
References MaxKernArgAlign, and llvm::Align::value().
|
inline |
Definition at line 74 of file AMDGPUMachineFunction.h.
References Mode.
Referenced by llvm::AMDGPULegalizerInfo::legalizeFDIV32(), llvm::AMDGPULegalizerInfo::legalizeFFloor(), llvm::AMDGPULegalizerInfo::legalizeFMad(), llvm::AMDGPULegalizerInfo::legalizeMinNumMaxNum(), llvm::AMDGPULegalizerInfo::legalizeRsqClampIntrinsic(), llvm::AMDGPUTargetLowering::LowerDIVREM24(), and llvm::AMDGPUTargetLowering::LowerUDIVREM64().
|
inline |
Definition at line 84 of file AMDGPUMachineFunction.h.
References NoSignedZerosFPMath.
|
inline |
Definition at line 78 of file AMDGPUMachineFunction.h.
References IsEntryFunction.
Referenced by llvm::SIMachineFunctionInfo::allocateSGPRSpillToVGPR(), llvm::SIFrameLowering::determineCalleeSaves(), llvm::SIFrameLowering::determineCalleeSavesSGPR(), llvm::SIRegisterInfo::eliminateFrameIndex(), llvm::SIFrameLowering::emitEpilogue(), llvm::AMDGPUAsmPrinter::emitFunctionBodyEnd(), llvm::AMDGPUAsmPrinter::emitFunctionBodyStart(), llvm::AMDGPUAsmPrinter::emitFunctionEntryLabel(), llvm::SIFrameLowering::emitPrologue(), llvm::SIRegisterInfo::getFrameRegister(), llvm::AMDGPULegalizerInfo::legalizeImplicitArgPtr(), llvm::SIFrameLowering::processFunctionBeforeFrameFinalized(), llvm::SIFrameLowering::requiresStackPointerReference(), llvm::AMDGPUAsmPrinter::runOnMachineFunction(), and llvm::SIMachineFunctionInfo::SIMachineFunctionInfo().
|
inline |
Definition at line 88 of file AMDGPUMachineFunction.h.
References MemoryBound.
Referenced by llvm::SIMachineFunctionInfo::getMinAllowedOccupancy().
|
inline |
Definition at line 82 of file AMDGPUMachineFunction.h.
References IsModuleEntryFunction.
Referenced by llvm::AMDGPULegalizerInfo::legalizeGlobalValue(), llvm::AMDGPUTargetLowering::LowerGlobalAddress(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
|
inline |
Definition at line 92 of file AMDGPUMachineFunction.h.
References WaveLimiter.
Referenced by llvm::SIMachineFunctionInfo::getMinAllowedOccupancy(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
void AMDGPUMachineFunction::setDynLDSAlign | ( | const DataLayout & | DL, |
const GlobalVariable & | GV | ||
) |
Definition at line 67 of file AMDGPUMachineFunction.cpp.
References llvm::alignTo(), assert(), DL, DynLDSAlign, llvm::GlobalObject::getAlign(), llvm::GlobalValue::getValueType(), isZero(), LDSSize, and StaticLDSSize.
Referenced by llvm::AMDGPULegalizerInfo::legalizeGlobalValue().
|
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().
|
protected |
Definition at line 26 of file AMDGPUMachineFunction.h.
Referenced by AMDGPUMachineFunction(), and getExplicitKernArgSize().
Definition at line 48 of file AMDGPUMachineFunction.h.
Referenced by isEntryFunction().
Definition at line 51 of file AMDGPUMachineFunction.h.
Referenced by isModuleEntryFunction().
|
protected |
Number of bytes in the LDS that are being used.
Definition at line 30 of file AMDGPUMachineFunction.h.
Referenced by getLDSSize(), and setDynLDSAlign().
|
protected |
Definition at line 27 of file AMDGPUMachineFunction.h.
Referenced by AMDGPUMachineFunction(), getMaxKernArgAlign(), and llvm::SIMachineFunctionInfo::SIMachineFunctionInfo().
Definition at line 56 of file AMDGPUMachineFunction.h.
Referenced by AMDGPUMachineFunction(), and isMemoryBound().
|
protected |
Definition at line 44 of file AMDGPUMachineFunction.h.
Referenced by getMode(), and llvm::GCNTargetMachine::parseMachineFunctionInfo().
Definition at line 53 of file AMDGPUMachineFunction.h.
Referenced by hasNoSignedZerosFPMath().
|
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().
Definition at line 59 of file AMDGPUMachineFunction.h.
Referenced by AMDGPUMachineFunction(), and needsWaveLimiter().