|
LLVM
10.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, GFX10 = 8 } |
Static Public Member Functions | |
| static const AMDGPUSubtarget & | get (const MachineFunction &MF) |
| static const AMDGPUSubtarget & | get (const TargetMachine &TM, const Function &F) |
Definition at line 48 of file AMDGPUSubtarget.h.
| Enumerator | |
|---|---|
| R600 | |
| R700 | |
| EVERGREEN | |
| NORTHERN_ISLANDS | |
| SOUTHERN_ISLANDS | |
| SEA_ISLANDS | |
| VOLCANIC_ISLANDS | |
| GFX9 | |
| GFX10 | |
Definition at line 50 of file AMDGPUSubtarget.h.
Definition at line 169 of file AMDGPUSubtarget.cpp.
|
inlinevirtual |
Definition at line 249 of file AMDGPUSubtarget.h.
|
static |
Definition at line 934 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(), callWaitsOnFunctionReturn(), llvm::createSIWholeQuadModePass(), llvm::AMDGPUTargetLowering::getImplicitParameterOffset(), getReassignedChan(), INITIALIZE_PASS(), and isCallPromotable().
|
static |
Definition at line 941 of file AMDGPUSubtarget.cpp.
References llvm::Triple::amdgcn, F(), llvm::Triple::getArch(), llvm::TargetMachine::getSubtarget(), and llvm::TargetMachine::getTargetTriple().
|
inline |
Definition at line 204 of file AMDGPUSubtarget.h.
References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, and isAmdHsaOS().
Referenced by getKernArgSegmentSize(), and llvm::SIMachineFunctionInfo::SIMachineFunctionInfo().
| std::pair< unsigned, unsigned > AMDGPUSubtarget::getDefaultFlatWorkGroupSize | ( | CallingConv::ID | CC | ) | const |
Definition at line 349 of file AMDGPUSubtarget.cpp.
References llvm::CallingConv::AMDGPU_ES, llvm::CallingConv::AMDGPU_GS, llvm::CallingConv::AMDGPU_HS, llvm::CallingConv::AMDGPU_LS, llvm::CallingConv::AMDGPU_PS, llvm::CallingConv::AMDGPU_VS, llvm::GCNSubtarget::getMaxFlatWorkGroupSize(), and getWavefrontSize().
Referenced by getFlatWorkGroupSizes().
Definition at line 493 of file AMDGPUSubtarget.cpp.
References llvm::alignTo(), llvm::CallingConv::AMDGPU_KERNEL, Arg, llvm::Function::args(), assert(), llvm::Function::getCallingConv(), llvm::Module::getDataLayout(), llvm::GlobalValue::getParent(), llvm::max(), llvm::Align::None(), 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 210 of file AMDGPUSubtarget.h.
References getMaxFlatWorkGroupSize(), getMaxWavesPerEU(), getMaxWorkGroupsPerCU(), getMinFlatWorkGroupSize(), getMinWavesPerEU(), and isAmdHsaOrMesa().
Referenced by llvm::AMDGPUTargetLowering::analyzeFormalArgumentsCompute(), llvm::AMDGPUTargetLowering::getImplicitParameterOffset(), getKernArgSegmentSize(), and llvm::AMDGPUCallLowering::lowerFormalArgumentsKernel().
F, or minimum/maximum flat work group sizes explicitly requested using "amdgpu-flat-work-group-size" attribute attached to function F.Definition at line 363 of file AMDGPUSubtarget.cpp.
References llvm::Default, llvm::Function::getCallingConv(), getDefaultFlatWorkGroupSize(), llvm::AMDGPU::getIntegerPairAttribute(), llvm::GCNSubtarget::getMaxFlatWorkGroupSize(), and llvm::GCNSubtarget::getMinFlatWorkGroupSize().
Referenced by getBufferOffsetForMMO(), getMaxLocalMemSizeWithWaveCount(), getOccupancyWithLocalMemSize(), getWavesPerEU(), isCallPromotable(), makeLIDRangeMetadata(), and llvm::SIMachineFunctionInfo::SIMachineFunctionInfo().
Definition at line 241 of file AMDGPUSubtarget.h.
References F(), getExplicitKernArgSize(), llvm::AMDGPU::getIntegerAttribute(), getKernArgSegmentSize(), and isMesaKernel().
Referenced by getKernArgSegmentSize().
Definition at line 514 of file AMDGPUSubtarget.cpp.
References llvm::alignTo(), getAlignmentForImplicitArgPtr(), getExplicitKernArgSize(), getExplicitKernelArgOffset(), and getImplicitArgNumBytes().
Referenced by getImplicitArgNumBytes().
|
inline |
Definition at line 200 of file AMDGPUSubtarget.h.
References LocalMemorySize.
Referenced by getMaxLocalMemSizeWithWaveCount(), getOccupancyWithLocalMemSize(), hasAnyNonFlatUseOfReg(), and isCallPromotable().
|
pure virtual |
Implemented in llvm::R600Subtarget, and llvm::GCNSubtarget.
Referenced by getExplicitKernelArgOffset().
| 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 316 of file AMDGPUSubtarget.cpp.
References getFlatWorkGroupSizes(), getLocalMemorySize(), getMaxWavesPerEU(), and llvm::GCNSubtarget::getMaxWorkGroupsPerCU().
Referenced by llvm::GCNSubtarget::dumpCode(), and isCallPromotable().
|
pure virtual |
FlatWorkGroupSize. Implemented in llvm::R600Subtarget, and llvm::GCNSubtarget.
Referenced by isCallPromotable().
|
inline |
Definition at line 234 of file AMDGPUSubtarget.h.
References I, makeLIDRangeMetadata(), and MaxWavesPerEU.
Referenced by llvm::GCNSubtarget::computeOccupancy(), getExplicitKernelArgOffset(), getMaxLocalMemSizeWithWaveCount(), getOccupancyWithLocalMemSize(), llvm::GCNSubtarget::getOccupancyWithNumSGPRs(), llvm::GCNSubtarget::getOccupancyWithNumVGPRs(), and getWavesPerEU().
|
pure virtual |
FlatWorkGroupSize. Implemented in llvm::R600Subtarget, and llvm::GCNSubtarget.
Referenced by getExplicitKernelArgOffset().
|
pure virtual |
Implemented in llvm::R600Subtarget, and llvm::GCNSubtarget.
Referenced by getExplicitKernelArgOffset().
|
pure virtual |
Implemented in llvm::R600Subtarget, and llvm::GCNSubtarget.
Referenced by getExplicitKernelArgOffset().
Inverse of getMaxLocalMemWithWaveCount.
Return the maximum wavecount if the given LDS memory size is the only constraint.
Definition at line 328 of file AMDGPUSubtarget.cpp.
References getFlatWorkGroupSizes(), getLocalMemorySize(), getMaxWavesPerEU(), llvm::GCNSubtarget::getMaxWorkGroupsPerCU(), and llvm::max().
Referenced by llvm::GCNSubtarget::computeOccupancy(), getOccupancyWithLocalMemSize(), llvm::SIRegisterInfo::getRegPressureLimit(), isCallPromotable(), and llvm::SIMachineFunctionInfo::limitOccupancy().
| unsigned AMDGPUSubtarget::getOccupancyWithLocalMemSize | ( | const MachineFunction & | MF | ) | const |
Definition at line 343 of file AMDGPUSubtarget.cpp.
References llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), and getOccupancyWithLocalMemSize().
|
inline |
Definition at line 196 of file AMDGPUSubtarget.h.
References WavefrontSize.
Referenced by llvm::SIMachineFunctionInfo::allocateSGPRSpillToVGPR(), buildMUBUFOffsetLoadStore(), llvm::SIFrameLowering::eliminateCallFramePseudoInstr(), llvm::SIFrameLowering::emitEpilogue(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), llvm::SIFrameLowering::emitPrologue(), getBufferOffsetForMMO(), getDefaultFlatWorkGroupSize(), llvm::SITargetLowering::getRegClassFor(), hasAnyNonFlatUseOfReg(), llvm::SIMachineFunctionInfo::haveFreeLanesForSGPRSpill(), lowerFCMPIntrinsic(), lowerICMPIntrinsic(), and parseTexFail().
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 386 of file AMDGPUSubtarget.cpp.
References llvm::Default, getFlatWorkGroupSizes(), llvm::AMDGPU::getIntegerPairAttribute(), getMaxWavesPerEU(), llvm::GCNSubtarget::getMinWavesPerEU(), and llvm::Function::hasFnAttribute().
Referenced by isCallPromotable(), and llvm::SIMachineFunctionInfo::SIMachineFunctionInfo().
|
inline |
Definition at line 143 of file AMDGPUSubtarget.h.
References Has16BitInsts.
Referenced by fp16SrcZerosHighBits(), llvm::GCNTTIImpl::getArithmeticInstrCost(), llvm::GCNTTIImpl::getIntrinsicInstrCost(), llvm::SITargetLowering::getNumRegistersForCallingConv(), llvm::SITargetLowering::getRegisterTypeForCallingConv(), getSplatConstantFP(), llvm::GCNTTIImpl::getVectorInstrCost(), 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 184 of file AMDGPUSubtarget.h.
References HasFminFmaxLegacy.
Definition at line 151 of file AMDGPUSubtarget.h.
References FP32Denormals.
Referenced by llvm::AMDGPU::SIModeRegisterDefaults::SIModeRegisterDefaults().
|
inline |
Definition at line 160 of file AMDGPUSubtarget.h.
References FPExceptions.
|
inline |
Definition at line 180 of file AMDGPUSubtarget.h.
References HasInv2PiInlineImm.
Referenced by llvm::SIRegisterInfo::eliminateFrameIndex(), llvm::AMDGPUTargetLowering::isConstantCostlierToNegate(), llvm::SIInstrInfo::isInlineConstant(), isStackPtrRelative(), shrinkScalarLogicOp(), and updateOperand().
|
inline |
Definition at line 147 of file AMDGPUSubtarget.h.
References HasMadMixInsts.
Referenced by llvm::SITargetLowering::isFPExtFoldable().
|
inline |
Definition at line 172 of file AMDGPUSubtarget.h.
References HasMulI24.
Referenced by llvm::AMDGPUTargetLowering::performMulCombine(), and llvm::AMDGPUTargetLowering::performMulhsCombine().
|
inline |
Definition at line 176 of file AMDGPUSubtarget.h.
References HasMulU24.
Referenced by llvm::AMDGPUTargetLowering::performMulCombine(), and llvm::AMDGPUTargetLowering::performMulhuCombine().
|
inline |
Definition at line 164 of file AMDGPUSubtarget.h.
References HasSDWA.
Referenced by operator<<(), llvm::AMDGPUTargetLowering::PerformDAGCombine(), and llvm::SIInstrInfo::verifyInstruction().
|
inline |
Definition at line 188 of file AMDGPUSubtarget.h.
References HasTrigReducedRange.
Referenced by getSPDenormModeValue().
|
inline |
Definition at line 168 of file AMDGPUSubtarget.h.
References HasVOP3PInsts.
Referenced by elementPairIsContiguous(), llvm::GCNTTIImpl::getArithmeticReductionCost(), llvm::GCNTTIImpl::getMinMaxReductionCost(), llvm::GCNTTIImpl::getShuffleCost(), getSplatConstantFP(), llvm::AMDGPUTargetLowering::isFNegFree(), and llvm::SITargetLowering::SITargetLowering().
Definition at line 139 of file AMDGPUSubtarget.h.
References isAmdHsaOS(), and isMesaKernel().
Referenced by llvm::SIFrameLowering::emitEntryFunctionPrologue(), llvm::AMDGPUAsmPrinter::EmitFunctionBodyStart(), getExplicitKernelArgOffset(), parseTexFail(), reservePrivateMemoryRegs(), and llvm::SIMachineFunctionInfo::SIMachineFunctionInfo().
|
inline |
Definition at line 123 of file AMDGPUSubtarget.h.
References llvm::Triple::AMDHSA, and llvm::Triple::getOS().
Referenced by llvm::AMDGPUAsmPrinter::EmitFunctionBodyStart(), getAlignmentForImplicitArgPtr(), llvm::GCNSubtarget::getTrapHandlerAbi(), hasAnyNonFlatUseOfReg(), llvm::GCNSubtarget::hasCodeObjectV3(), llvm::GCNSubtarget::initializeSubtargetDependencies(), isAmdHsaOrMesa(), llvm::SITargetLowering::LowerFormalArguments(), parseTexFail(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
|
inline |
Definition at line 127 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 131 of file AMDGPUSubtarget.h.
References llvm::Triple::getOS(), and llvm::Triple::Mesa3D.
Referenced by llvm::GCNSubtarget::isMesaGfxShader(), and isMesaKernel().
Definition at line 135 of file AMDGPUSubtarget.h.
References llvm::Function::getCallingConv(), isMesa3DOS(), and llvm::AMDGPU::isShader().
Referenced by getImplicitArgNumBytes(), and isAmdHsaOrMesa().
|
inline |
Definition at line 192 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 431 of file AMDGPUSubtarget.cpp.
References F(), getFlatWorkGroupSizes(), llvm::Function::getIntrinsicID(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), if(), llvm::CodeModel::Kernel, and LLVM_FALLTHROUGH.
Referenced by getMaxWavesPerEU(), and INITIALIZE_PASS().
|
protected |
Definition at line 76 of file AMDGPUSubtarget.h.
Referenced by isPromoteAllocaEnabled().
|
protected |
Definition at line 68 of file AMDGPUSubtarget.h.
Referenced by hasFP32Denormals(), and llvm::R600Subtarget::initializeSubtargetDependencies().
|
protected |
Definition at line 69 of file AMDGPUSubtarget.h.
Referenced by hasFPExceptions().
|
protected |
Definition at line 66 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 74 of file AMDGPUSubtarget.h.
Referenced by hasInv2PiInlineImm().
|
protected |
Definition at line 67 of file AMDGPUSubtarget.h.
Referenced by hasMadMixInsts().
|
protected |
Definition at line 72 of file AMDGPUSubtarget.h.
Referenced by hasMulI24(), and llvm::R600Subtarget::initializeSubtargetDependencies().
|
protected |
Definition at line 73 of file AMDGPUSubtarget.h.
Referenced by hasMulU24(), and llvm::R600Subtarget::initializeSubtargetDependencies().
|
protected |
Definition at line 70 of file AMDGPUSubtarget.h.
Referenced by hasSDWA().
|
protected |
Definition at line 77 of file AMDGPUSubtarget.h.
Referenced by hasTrigReducedRange().
|
protected |
Definition at line 71 of file AMDGPUSubtarget.h.
Referenced by hasVOP3PInsts().
|
protected |
Definition at line 79 of file AMDGPUSubtarget.h.
Referenced by getLocalMemorySize(), and llvm::GCNSubtarget::initializeSubtargetDependencies().
|
protected |
Definition at line 78 of file AMDGPUSubtarget.h.
Referenced by llvm::GCNSubtarget::GCNSubtarget(), and getMaxWavesPerEU().
|
protected |
Definition at line 80 of file AMDGPUSubtarget.h.
Referenced by getWavefrontSize(), llvm::GCNSubtarget::getWavefrontSizeLog2(), llvm::GCNSubtarget::initializeSubtargetDependencies(), and llvm::GCNSubtarget::isWave32().
1.8.13