15 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUSUBTARGET_H
16 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUSUBTARGET_H
38 #define GET_SUBTARGETINFO_HEADER
39 #include "AMDGPUGenSubtargetInfo.inc"
600 return &FrameLowering;
629 std::unique_ptr<GISelAccessor> GISel;
640 return &FrameLowering;
648 assert(GISel &&
"Access to GlobalISel APIs not set");
649 return GISel->getCallLowering();
653 assert(GISel &&
"Access to GlobalISel APIs not set");
654 return GISel->getInstructionSelector();
658 assert(GISel &&
"Access to GlobalISel APIs not set");
659 return GISel->getLegalizerInfo();
663 assert(GISel &&
"Access to GlobalISel APIs not set");
664 return GISel->getRegBankInfo();
672 this->GISel.reset(&GISel);
681 unsigned NumRegionInstrs)
const override;
872 #endif // LLVM_LIB_TARGET_AMDGPU_AMDGPUSUBTARGET_H
OSType getOS() const
getOS - Get the parsed operating system type of this triple.
unsigned getAddressableNumVGPRs() const
unsigned getMinNumVGPRs(const FeatureBitset &Features, unsigned WavesPerEU)
bool hasCaymanISA() const
const AMDGPURegisterInfo * getRegisterInfo() const override=0
bool hasSMovFedHazard() const
The goal of this helper class is to gather the accessor to all the APIs related to GlobalISel...
unsigned getAddressableNumVGPRs(const FeatureBitset &Features)
bool isTrapHandlerEnabled() const
bool makeLIDRangeMetadata(Instruction *I) const
Creates value range metadata on an workitemid.* inrinsic call or load.
bool hasVertexCache() const
Interface definition for R600InstrInfo.
bool isVGPRSpillingEnabled(const Function &F) const
unsigned getMinNumSGPRs(unsigned WavesPerEU) const
bool hasUnalignedBufferAccess() const
unsigned getMaxNumVGPRs(unsigned WavesPerEU) const
int getLDSBankCount() const
bool hasFlatGlobalInsts() const
bool hasFastFMAF32() const
bool useVGPRIndexMode(bool UserEnable) const
AMDGPUSubtarget & initializeSubtargetDependencies(const Triple &TT, StringRef GPU, StringRef FS)
unsigned getVGPREncodingGranule() const
unsigned getMaxWorkGroupsPerCU(const FeatureBitset &Features, unsigned FlatWorkGroupSize)
const SIInstrInfo * getInstrInfo() const override
bool enableIEEEBit(const MachineFunction &MF) const
SelectionDAGTargetInfo TSInfo
const Function * getFunction() const
getFunction - Return the LLVM function that this machine code represents
unsigned getTotalNumVGPRs(const FeatureBitset &Features)
unsigned getMinWavesPerEU(const FeatureBitset &Features)
int getLocalMemorySize() const
bool loadStoreOptEnabled() const
bool hasFPExceptions() const
bool isAmdCodeObjectV2(const MachineFunction &MF) const
bool hasSDWAScalar() const
unsigned getWavesPerWorkGroup(const FeatureBitset &Features, unsigned FlatWorkGroupSize)
unsigned getImplicitArgNumBytes(const MachineFunction &MF) const
unsigned getMinNumVGPRs(unsigned WavesPerEU) const
CallingConv::ID getCallingConv() const
getCallingConv()/setCallingConv(CC) - These method get and set the calling convention of this functio...
unsigned getVGPREncodingGranule(const FeatureBitset &Features)
unsigned getMaxWavesPerEU(unsigned FlatWorkGroupSize) const
bool isMesaKernel(const MachineFunction &MF) const
unsigned getTotalNumVGPRs() const
unsigned getMaxWorkGroupsPerCU(unsigned FlatWorkGroupSize) const
unsigned getEUsPerCU(const FeatureBitset &Features)
Holds all the information related to register banks.
unsigned getOccupancyWithNumSGPRs(unsigned SGPRs) const
Return the maximum number of waves per SIMD for kernels using SGPRs SGPRs.
bool enableSIScheduler() const
unsigned getVGPRAllocGranule(const FeatureBitset &Features)
OpenCL uses address spaces to differentiate between various memory regions on the hardware...
bool useFlatForGlobal() const
unsigned getSGPREncodingGranule() const
bool flatScratchIsPointer() const
std::pair< unsigned, unsigned > getWavesPerEU(const Function &F) const
const InstrItineraryData * getInstrItineraryData() const override
bool hasSDWAOutModsVOPC() const
const InstructionSelector * getInstructionSelector() const override
unsigned getMinFlatWorkGroupSize(const FeatureBitset &Features)
bool getScalarizeGlobalBehavior() const
unsigned getMaxWavesPerCU(const FeatureBitset &Features)
bool isMesaGfxShader(const MachineFunction &MF) const
unsigned getMaxNumSGPRs(const FeatureBitset &Features, unsigned WavesPerEU, bool Addressable)
unsigned getMaxNumUserSGPRs() const
bool isXNACKEnabled() const
bool hasFlatAddressSpace() const
bool hasVGPRIndexMode() const
const LegalizerInfo * getLegalizerInfo() const override
SISubtarget(const Triple &TT, StringRef CPU, StringRef FS, const TargetMachine &TM)
TrapHandlerAbi getTrapHandlerAbi() const
unsigned getMaxWavesPerEU(const FeatureBitset &Features)
const AMDGPUFrameLowering * getFrameLowering() const override=0
Itinerary data supplied by a subtarget to be used by a target.
unsigned getMaxFlatWorkGroupSize(const FeatureBitset &Features)
const RegisterBankInfo * getRegBankInfo() const override
Generation getGeneration() const
bool EnableUnsafeDSOffsetFolding
const SIRegisterInfo & getRegisterInfo() const
bool hasHalfRate64Ops() const
void ParseSubtargetFeatures(StringRef CPU, StringRef FS)
bool hasSGPRInitBug() const
const R600FrameLowering * getFrameLowering() const override
unsigned getMaxWavesPerCU(unsigned FlatWorkGroupSize) const
StringRef getEnvironmentName() const
getEnvironmentName - Get the optional environment (fourth) component of the triple, or "" if empty.
bool isCompute(CallingConv::ID cc)
unsigned getMaxWavesPerEU() const
unsigned getKernArgSegmentSize(const MachineFunction &MF, unsigned ExplictArgBytes) const
unsigned getTotalNumSGPRs(const FeatureBitset &Features)
bool hasFlatScratchInsts() const
unsigned getMaxWavesPerCU() const
bool DebuggerEmitPrologue
R600Subtarget(const Triple &TT, StringRef CPU, StringRef FS, const TargetMachine &TM)
bool hasUnalignedScratchAccess() const
unsigned getMinFlatWorkGroupSize() const
unsigned getMinNumSGPRs(const FeatureBitset &Features, unsigned WavesPerEU)
SI DAG Lowering interface definition.
unsigned getOccupancyWithNumVGPRs(unsigned VGPRs) const
Return the maximum number of waves per SIMD for kernels using VGPRs VGPRs.
const R600InstrInfo * getInstrInfo() const override
bool hasScalarStores() const
Ty * getInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
bool hasFP32Denormals() const
bool debuggerReserveRegs() const
bool debuggerSupported() const
unsigned getReservedNumSGPRs(const MachineFunction &MF) const
unsigned getMaxFlatWorkGroupSize() const
bool AutoWaitcntBeforeBarrier
bool has16BitInsts() const
Targets can subclass this to parameterize the SelectionDAG lowering and instruction selection process...
unsigned getOccupancyWithLocalMemSize(uint32_t Bytes, const Function &) const
Inverse of getMaxLocalMemWithWaveCount.
const AMDGPUInstrInfo * getInstrInfo() const override=0
bool hasScalarCompareEq64() const
unsigned getAddressableNumSGPRs() const
bool hasInv2PiInlineImm() const
bool isPromoteAllocaEnabled() const
bool hasFP64Denormals() const
bool hasFlatInstOffsets() const
Triple - Helper class for working with autoconf configuration names.
const R600RegisterInfo * getRegisterInfo() const override
const AMDGPUTargetLowering * getTargetLowering() const override=0
unsigned getMinWavesPerEU() const
const SIRegisterInfo * getRegisterInfo() const override
unsigned getSGPRAllocGranule() const
bool debuggerInsertNops() const
AMDGPUAS getAMDGPUAS() const
void setScalarizeGlobalBehavior(bool b)
bool hasApertureRegs() const
bool isShader(CallingConv::ID cc)
void setGISelAccessor(GISelAccessor &GISel)
short getTexVTXClauseSize() const
unsigned getMaxLocalMemSizeWithWaveCount(unsigned WaveCount, const Function &) const
Return the amount of LDS that can be used that will not restrict the occupancy lower than WaveCount...
bool enableSubRegLiveness() const override
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
bool supportsMinMaxDenormModes() const
Provides the logic to select generic machine instructions.
Define a generic scheduling policy for targets that don't provide their own MachineSchedStrategy.
This class keeps track of the SPI_SP_INPUT_ADDR config register, which tells the hardware which inter...
Interface definition for SIInstrInfo.
bool unsafeDSOffsetFoldingEnabled() const
unsigned getMaxPrivateElementSize() const
R600 DAG Lowering interface definition.
bool enableEarlyIfConversion() const override
unsigned getReservedNumVGPRs(const MachineFunction &MF) const
Information about the stack frame layout on the AMDGPU targets.
const R600RegisterInfo & getRegisterInfo() const
const CallLowering * getCallLowering() const override
void overrideSchedPolicy(MachineSchedPolicy &Policy, unsigned NumRegionInstrs) const override
const SIFrameLowering * getFrameLowering() const override
bool enableDX10Clamp() const
unsigned getTotalNumSGPRs() const
unsigned getExplicitKernelArgOffset(const MachineFunction &MF) const
Returns the offset in bytes from the start of the input buffer of the first explicit kernel argument...
bool UnalignedScratchAccess
~AMDGPUSubtarget() override
unsigned getWavefrontSize() const
unsigned getAddressableNumSGPRs(const FeatureBitset &Features)
AMDGPUSubtarget(const Triple &TT, StringRef GPU, StringRef FS, const TargetMachine &TM)
const SITargetLowering * getTargetLowering() const override
bool hasReadM0Hazard() const
unsigned getSGPREncodingGranule(const FeatureBitset &Features)
unsigned getEUsPerCU() const
EnvironmentType getEnvironment() const
getEnvironment - Get the parsed environment type of this triple.
unsigned getStackAlignment() const
unsigned getWavesPerWorkGroup(unsigned FlatWorkGroupSize) const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool hasSMemRealTime() const
const SelectionDAGTargetInfo * getSelectionDAGInfo() const override
bool UnalignedBufferAccess
InstrItineraryData InstrItins
unsigned MaxPrivateElementSize
bool hasVOP3PInsts() const
const R600TargetLowering * getTargetLowering() const override
bool hasFminFmaxLegacy() const
unsigned getSGPRAllocGranule(const FeatureBitset &Features)
Primary interface to the complete machine description for the target machine.
unsigned getMaxNumSGPRs(unsigned WavesPerEU, bool Addressable) const
bool hasBCNT(unsigned Size) const
StringRef - Represent a constant reference to a string, i.e.
std::pair< unsigned, unsigned > getFlatWorkGroupSizes(const Function &F) const
bool hasMin3Max3_16() const
bool hasFP16Denormals() const
unsigned getMaxNumVGPRs(const FeatureBitset &Features, unsigned WavesPerEU)
bool hasAutoWaitcntBeforeBarrier() const
bool enableMachineScheduler() const override
bool debuggerEmitPrologue() const
unsigned getVGPRAllocGranule() const
bool has12DWordStoreHazard() const
unsigned getOccupancyWithLocalMemSize(const MachineFunction &MF) const
unsigned getAlignmentForImplicitArgPtr() const