|
LLVM
7.0.0
|
#include "Target/AMDGPU/AMDGPUSubtarget.h"
Public Types | |
| enum | Generation { R600 = 0, R700 = 1, EVERGREEN = 2, NORTHERN_ISLANDS = 3, SOUTHERN_ISLANDS = 4, SEA_ISLANDS = 5, VOLCANIC_ISLANDS = 6, GFX9 = 7 } |
Static Public Member Functions | |
| static const AMDGPUSubtarget & | get (const MachineFunction &MF) |
| static const AMDGPUSubtarget & | get (const TargetMachine &TM, const Function &F) |
Definition at line 49 of file AMDGPUSubtarget.h.
| Enumerator | |
|---|---|
| R600 | |
| R700 | |
| EVERGREEN | |
| NORTHERN_ISLANDS | |
| SOUTHERN_ISLANDS | |
| SEA_ISLANDS | |
| VOLCANIC_ISLANDS | |
| GFX9 | |
Definition at line 51 of file AMDGPUSubtarget.h.
| AMDGPUSubtarget::AMDGPUSubtarget | ( | const Triple & | TT, |
| const FeatureBitset & | FeatureBits | ||
| ) |
Definition at line 127 of file AMDGPUSubtarget.cpp.
|
inlinevirtual |
Definition at line 246 of file AMDGPUSubtarget.h.
|
static |
Definition at line 682 of file AMDGPUSubtarget.cpp.
References llvm::Triple::amdgcn, llvm::Triple::getArch(), llvm::MachineFunction::getSubtarget(), llvm::MachineFunction::getTarget(), and llvm::TargetMachine::getTargetTriple().
Referenced by llvm::AMDGPUMachineFunction::AMDGPUMachineFunction(), llvm::AMDGPUTargetLowering::analyzeFormalArgumentsCompute(), llvm::createSIWholeQuadModePass(), llvm::AMDGPUTargetLowering::getImplicitParameterOffset(), getReassignedChan(), INITIALIZE_PASS(), isCallPromotable(), and readsVCCZ().
|
static |
Definition at line 689 of file AMDGPUSubtarget.cpp.
References llvm::Triple::amdgcn, F(), llvm::Triple::getArch(), llvm::TargetMachine::getSubtarget(), and llvm::TargetMachine::getTargetTriple().
|
inline |
Definition at line 189 of file AMDGPUSubtarget.h.
References isAmdHsaOS().
Referenced by getKernArgSegmentSize(), and llvm::SIMachineFunctionInfo::SIMachineFunctionInfo().
| std::pair< unsigned, unsigned > AMDGPUSubtarget::getDefaultFlatWorkGroupSize | ( | CallingConv::ID | CC | ) | const |
Definition at line 251 of file AMDGPUSubtarget.cpp.
References llvm::CallingConv::AMDGPU_CS, llvm::CallingConv::AMDGPU_ES, llvm::CallingConv::AMDGPU_GS, llvm::CallingConv::AMDGPU_HS, llvm::CallingConv::AMDGPU_KERNEL, llvm::CallingConv::AMDGPU_LS, llvm::CallingConv::AMDGPU_PS, llvm::CallingConv::AMDGPU_VS, getWavefrontSize(), and llvm::CallingConv::SPIR_KERNEL.
Referenced by getFlatWorkGroupSizes().
Definition at line 409 of file AMDGPUSubtarget.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::alignTo(), llvm::CallingConv::AMDGPU_KERNEL, Arg, llvm::Function::args(), assert(), llvm::Function::getCallingConv(), llvm::Module::getDataLayout(), llvm::GlobalValue::getParent(), llvm::Value::getType(), llvm::max(), and llvm::CallingConv::SPIR_KERNEL.
Referenced by llvm::AMDGPUMachineFunction::AMDGPUMachineFunction(), getImplicitArgNumBytes(), and getKernArgSegmentSize().
Returns the offset in bytes from the start of the input buffer of the first explicit kernel argument.
Definition at line 195 of file AMDGPUSubtarget.h.
References isAmdCodeObjectV2().
Referenced by llvm::AMDGPUTargetLowering::analyzeFormalArgumentsCompute(), llvm::AMDGPUTargetLowering::getImplicitParameterOffset(), getKernArgSegmentSize(), and llvm::AMDGPUCallLowering::lowerFormalArguments().
F, or minimum/maximum flat work group sizes explicitly requested using "amdgpu-flat-work-group-size" attribute attached to function F.Definition at line 269 of file AMDGPUSubtarget.cpp.
References llvm::Default, llvm::Function::getCallingConv(), getDefaultFlatWorkGroupSize(), llvm::AMDGPU::getIntegerAttribute(), llvm::AMDGPU::getIntegerPairAttribute(), getMaxFlatWorkGroupSize(), and getMinFlatWorkGroupSize().
Referenced by getMaxLocalMemSizeWithWaveCount(), getOccupancyWithLocalMemSize(), getWavesPerEU(), isCallPromotable(), makeLIDRangeMetadata(), parseCachePolicy(), and llvm::SIMachineFunctionInfo::SIMachineFunctionInfo().
Definition at line 236 of file AMDGPUSubtarget.h.
References F(), getExplicitKernArgSize(), llvm::AMDGPU::getIntegerAttribute(), getKernArgSegmentSize(), and isMesaKernel().
Referenced by getKernArgSegmentSize().
Definition at line 430 of file AMDGPUSubtarget.cpp.
References llvm::alignTo(), getAlignmentForImplicitArgPtr(), getExplicitKernArgSize(), getExplicitKernelArgOffset(), and getImplicitArgNumBytes().
Referenced by getImplicitArgNumBytes().
|
inline |
Definition at line 185 of file AMDGPUSubtarget.h.
References LocalMemorySize.
Referenced by getMaxLocalMemSizeWithWaveCount(), getOccupancyWithLocalMemSize(), hasAnyNonFlatUseOfReg(), and isCallPromotable().
|
inline |
Definition at line 212 of file AMDGPUSubtarget.h.
References llvm::AMDGPU::IsaInfo::getMaxFlatWorkGroupSize().
Referenced by getFlatWorkGroupSizes().
| unsigned AMDGPUSubtarget::getMaxLocalMemSizeWithWaveCount | ( | unsigned | WaveCount, |
| const Function & | F | ||
| ) | const |
Return the amount of LDS that can be used that will not restrict the occupancy lower than WaveCount.
Definition at line 222 of file AMDGPUSubtarget.cpp.
References getFlatWorkGroupSizes(), getLocalMemorySize(), llvm::GCNSubtarget::getMaxWavesPerEU(), and getMaxWorkGroupsPerCU().
Referenced by llvm::GCNSubtarget::dumpCode(), and isCallPromotable().
FlatWorkGroupSize. Definition at line 218 of file AMDGPUSubtarget.h.
References llvm::AMDGPU::IsaInfo::getMaxWavesPerEU().
Referenced by isCallPromotable().
|
inline |
Definition at line 229 of file AMDGPUSubtarget.h.
References I, and makeLIDRangeMetadata().
FlatWorkGroupSize. Definition at line 201 of file AMDGPUSubtarget.h.
References llvm::AMDGPU::IsaInfo::getMaxWorkGroupsPerCU().
Referenced by getMaxLocalMemSizeWithWaveCount(), and getOccupancyWithLocalMemSize().
|
inline |
Definition at line 207 of file AMDGPUSubtarget.h.
References llvm::AMDGPU::IsaInfo::getMinFlatWorkGroupSize().
Referenced by getFlatWorkGroupSizes().
|
inline |
Definition at line 225 of file AMDGPUSubtarget.h.
References llvm::AMDGPU::IsaInfo::getMinWavesPerEU().
Referenced by getWavesPerEU().
Inverse of getMaxLocalMemWithWaveCount.
Return the maximum wavecount if the given LDS memory size is the only constraint.
Definition at line 232 of file AMDGPUSubtarget.cpp.
References getFlatWorkGroupSizes(), getLocalMemorySize(), llvm::GCNSubtarget::getMaxWavesPerEU(), getMaxWorkGroupsPerCU(), and llvm::max().
Referenced by getOccupancyWithLocalMemSize(), llvm::SIRegisterInfo::getRegPressureLimit(), isCallPromotable(), and llvm::SIMachineFunctionInfo::limitOccupancy().
| unsigned AMDGPUSubtarget::getOccupancyWithLocalMemSize | ( | const MachineFunction & | MF | ) | const |
Definition at line 245 of file AMDGPUSubtarget.cpp.
References llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), and getOccupancyWithLocalMemSize().
|
inline |
Definition at line 181 of file AMDGPUSubtarget.h.
References WavefrontSize.
Referenced by llvm::SIMachineFunctionInfo::allocateSGPRSpillToVGPR(), buildMUBUFOffsetLoadStore(), llvm::SIFrameLowering::eliminateCallFramePseudoInstr(), llvm::SIRegisterInfo::eliminateFrameIndex(), llvm::SIFrameLowering::emitEntryFunctionPrologue(), llvm::SIFrameLowering::emitEpilogue(), llvm::SIFrameLowering::emitPrologue(), getDefaultFlatWorkGroupSize(), hasAnyNonFlatUseOfReg(), parseCachePolicy(), llvm::SIRegisterInfo::restoreSGPR(), and llvm::SIRegisterInfo::spillSGPR().
F, or minimum/maximum number of waves per execution unit explicitly requested using "amdgpu-waves-per-eu" attribute attached to function F.Definition at line 299 of file AMDGPUSubtarget.cpp.
References llvm::Default, getFlatWorkGroupSizes(), llvm::AMDGPU::getIntegerPairAttribute(), llvm::GCNSubtarget::getMaxWavesPerEU(), getMinWavesPerEU(), and llvm::Function::hasFnAttribute().
Referenced by isCallPromotable(), and llvm::SIMachineFunctionInfo::SIMachineFunctionInfo().
|
inline |
Definition at line 141 of file AMDGPUSubtarget.h.
References Has16BitInsts.
Referenced by fp16SrcZerosHighBits(), getMad64_32(), llvm::SITargetLowering::getNumRegistersForCallingConv(), llvm::SITargetLowering::getRegisterTypeForCallingConv(), getSplatConstantFP(), llvm::SITargetLowering::getVectorTypeBreakdownForCallingConv(), llvm::AMDGPUTargetLowering::isFAbsFree(), llvm::SITargetLowering::isFMAFasterThanFMulAndFAdd(), llvm::AMDGPUTargetLowering::isFNegFree(), llvm::AMDGPUTargetLowering::isFPImmLegal(), llvm::SIInstrInfo::isInlineConstant(), isNegativeOne(), llvm::AMDGPUTargetLowering::isTruncateFree(), llvm::SITargetLowering::isTypeDesirableForOp(), llvm::AMDGPUTargetLowering::isZExtFree(), llvm::AMDGPUTargetLowering::LowerFP_TO_SINT(), llvm::AMDGPUTargetLowering::LowerFP_TO_UINT(), llvm::AMDGPUTargetLowering::LowerSINT_TO_FP(), llvm::AMDGPUTargetLowering::LowerUINT_TO_FP(), llvm::AMDGPUTargetLowering::performFAbsCombine(), llvm::AMDGPUTargetLowering::performMulCombine(), and llvm::SITargetLowering::SITargetLowering().
|
inline |
Definition at line 173 of file AMDGPUSubtarget.h.
References HasFminFmaxLegacy.
Referenced by llvm::AMDGPUTargetLowering::performSelectCombine().
|
inline |
Definition at line 149 of file AMDGPUSubtarget.h.
References FP32Denormals.
Referenced by convertBuildVectorCastElt(), getFPMode(), getFPTernOp(), getLoadExtOrTrunc(), isCanonicalized(), llvm::SITargetLowering::isFMAFasterThanFMulAndFAdd(), llvm::SITargetLowering::isFPExtFoldable(), llvm::AMDGPUTargetLowering::LowerDIVREM24(), llvm::AMDGPUTargetLowering::LowerUDIVREM64(), llvm::R600TargetLowering::R600TargetLowering(), and llvm::SITargetLowering::SITargetLowering().
|
inline |
Definition at line 153 of file AMDGPUSubtarget.h.
References FPExceptions.
Referenced by llvm::SITargetLowering::SITargetLowering().
|
inline |
Definition at line 145 of file AMDGPUSubtarget.h.
References HasMadMixInsts.
Referenced by llvm::SITargetLowering::isFPExtFoldable().
|
inline |
Definition at line 165 of file AMDGPUSubtarget.h.
References HasMulI24.
Referenced by llvm::AMDGPUTargetLowering::performMulCombine(), and llvm::AMDGPUTargetLowering::performMulhsCombine().
|
inline |
Definition at line 169 of file AMDGPUSubtarget.h.
References HasMulU24.
Referenced by llvm::AMDGPUTargetLowering::performMulCombine(), and llvm::AMDGPUTargetLowering::performMulhuCombine().
|
inline |
Definition at line 157 of file AMDGPUSubtarget.h.
References HasSDWA.
Referenced by findSingleRegDef(), llvm::AMDGPUTargetLowering::PerformDAGCombine(), and llvm::SIInstrInfo::verifyInstruction().
|
inline |
Definition at line 161 of file AMDGPUSubtarget.h.
References HasVOP3PInsts.
Referenced by getSplatConstantFP(), llvm::AMDGPUTargetLowering::isFNegFree(), and llvm::SITargetLowering::SITargetLowering().
Definition at line 137 of file AMDGPUSubtarget.h.
References isAmdHsaOS(), and isMesaKernel().
Referenced by llvm::SIFrameLowering::emitEntryFunctionPrologue(), llvm::AMDGPUAsmPrinter::EmitFunctionBodyStart(), getExplicitKernelArgOffset(), parseCachePolicy(), reservePrivateMemoryRegs(), and llvm::SIMachineFunctionInfo::SIMachineFunctionInfo().
|
inline |
Definition at line 121 of file AMDGPUSubtarget.h.
References llvm::Triple::AMDHSA, and llvm::Triple::getOS().
Referenced by getAlignmentForImplicitArgPtr(), llvm::GCNSubtarget::getTrapHandlerAbi(), hasAnyNonFlatUseOfReg(), llvm::GCNSubtarget::initializeSubtargetDependencies(), isAmdCodeObjectV2(), llvm::SITargetLowering::LowerFormalArguments(), parseCachePolicy(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
|
inline |
Definition at line 125 of file AMDGPUSubtarget.h.
References llvm::Triple::AMDPAL, and llvm::Triple::getOS().
Referenced by llvm::SIFrameLowering::emitEntryFunctionPrologue(), llvm::SITargetLowering::LowerFormalArguments(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
|
inline |
Definition at line 129 of file AMDGPUSubtarget.h.
References llvm::Triple::getOS(), and llvm::Triple::Mesa3D.
Referenced by llvm::GCNSubtarget::isMesaGfxShader(), and isMesaKernel().
Definition at line 133 of file AMDGPUSubtarget.h.
References llvm::Function::getCallingConv(), isMesa3DOS(), and llvm::AMDGPU::isShader().
Referenced by getImplicitArgNumBytes(), and isAmdCodeObjectV2().
|
inline |
Definition at line 177 of file AMDGPUSubtarget.h.
References EnablePromoteAlloca.
| bool AMDGPUSubtarget::makeLIDRangeMetadata | ( | Instruction * | I | ) | const |
Creates value range metadata on an workitemid.* inrinsic call or load.
Definition at line 347 of file AMDGPUSubtarget.cpp.
References F(), llvm::Value::getContext(), getFlatWorkGroupSizes(), llvm::Function::getIntrinsicID(), llvm::GlobalObject::getMetadata(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), if(), llvm::CodeModel::Kernel, LLVM_FALLTHROUGH, llvm::LLVMContext::MD_range, and llvm::Instruction::setMetadata().
Referenced by getMaxWavesPerEU(), and INITIALIZE_PASS().
|
protected |
Definition at line 76 of file AMDGPUSubtarget.h.
Referenced by isPromoteAllocaEnabled().
|
protected |
Definition at line 69 of file AMDGPUSubtarget.h.
Referenced by hasFP32Denormals(), and llvm::R600Subtarget::initializeSubtargetDependencies().
|
protected |
Definition at line 70 of file AMDGPUSubtarget.h.
Referenced by hasFPExceptions().
|
protected |
Definition at line 67 of file AMDGPUSubtarget.h.
Referenced by has16BitInsts().
|
protected |
Definition at line 75 of file AMDGPUSubtarget.h.
Referenced by hasFminFmaxLegacy(), and llvm::GCNSubtarget::initializeSubtargetDependencies().
|
protected |
Definition at line 68 of file AMDGPUSubtarget.h.
Referenced by hasMadMixInsts().
|
protected |
Definition at line 73 of file AMDGPUSubtarget.h.
Referenced by hasMulI24(), and llvm::R600Subtarget::initializeSubtargetDependencies().
|
protected |
Definition at line 74 of file AMDGPUSubtarget.h.
Referenced by hasMulU24(), and llvm::R600Subtarget::initializeSubtargetDependencies().
|
protected |
Definition at line 71 of file AMDGPUSubtarget.h.
Referenced by hasSDWA().
|
protected |
Definition at line 72 of file AMDGPUSubtarget.h.
Referenced by hasVOP3PInsts().
|
protected |
Definition at line 77 of file AMDGPUSubtarget.h.
Referenced by getLocalMemorySize(), and llvm::GCNSubtarget::initializeSubtargetDependencies().
|
protected |
Definition at line 66 of file AMDGPUSubtarget.h.
|
protected |
Definition at line 78 of file AMDGPUSubtarget.h.
Referenced by getWavefrontSize(), and llvm::GCNSubtarget::getWavefrontSizeLog2().
1.8.13