18 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUTARGETTRANSFORMINFO_H 19 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUTARGETTRANSFORMINFO_H 36 class AMDGPUTargetLowering;
38 class ScalarEvolution;
53 TargetTriple(TM->getTargetTriple()) {}
68 bool IsGraphicsShader;
72 AMDGPU::FeatureEnableLoadStoreOpt,
73 AMDGPU::FeatureEnableSIScheduler,
74 AMDGPU::FeatureEnableUnsafeDSOffsetFolding,
75 AMDGPU::FeatureFlatForGlobal,
76 AMDGPU::FeaturePromoteAlloca,
77 AMDGPU::FeatureUnalignedBufferAccess,
78 AMDGPU::FeatureUnalignedScratchAccess,
80 AMDGPU::FeatureAutoWaitcntBeforeBarrier,
81 AMDGPU::FeatureDebuggerEmitPrologue,
82 AMDGPU::FeatureDebuggerInsertNops,
85 AMDGPU::FeatureSGPRInitBug,
87 AMDGPU::FeatureTrapHandler,
90 AMDGPU::FeatureFastFMAF32,
97 static inline int getFullRateInstrCost() {
101 static inline int getHalfRateInstrCost() {
107 static inline int getQuarterRateInstrCost() {
113 inline int get64BitInstrCost()
const {
115 getHalfRateInstrCost() : getQuarterRateInstrCost();
122 TLI(ST->getTargetLowering()),
136 unsigned getHardwareNumberOfRegisters(
bool Vector)
const;
141 unsigned ChainSizeInBytes,
144 unsigned ChainSizeInBytes,
148 bool isLegalToVectorizeMemChain(
unsigned ChainSizeInBytes,
150 unsigned AddrSpace)
const;
153 unsigned AddrSpace)
const;
156 unsigned AddrSpace)
const;
163 unsigned Opcode,
Type *Ty,
179 if (IsGraphicsShader)
217 TLI(ST->getTargetLowering()),
225 unsigned getHardwareNumberOfRegisters(
bool Vec)
const;
230 bool isLegalToVectorizeMemChain(
unsigned ChainSizeInBytes,
unsigned Alignment,
231 unsigned AddrSpace)
const;
234 unsigned AddrSpace)
const;
237 unsigned AddrSpace)
const;
245 #endif // LLVM_LIB_TARGET_AMDGPU_AMDGPUTARGETTRANSFORMINFO_H unsigned getArithmeticInstrCost(unsigned Opcode, Type *Ty, TTI::OperandValueKind Opd1Info=TTI::OK_AnyValue, TTI::OperandValueKind Opd2Info=TTI::OK_AnyValue, TTI::OperandValueProperties Opd1PropInfo=TTI::OP_None, TTI::OperandValueProperties Opd2PropInfo=TTI::OP_None, ArrayRef< const Value * > Args=ArrayRef< const Value * >())
Type
MessagePack types as defined in the standard, with the exception of Integer being divided into a sign...
AMDGPU specific subclass of TargetSubtarget.
This class represents lattice values for constants.
The main scalar evolution driver.
void getUnrollingPreferences(Loop *L, ScalarEvolution &SE, TTI::UnrollingPreferences &UP)
Base class which can be used to help build a TTI implementation.
unsigned getMaxInterleaveFactor(unsigned VF)
R600TTIImpl(const AMDGPUTargetMachine *TM, const Function &F)
unsigned getFlatAddressSpace() const
unsigned getArithmeticReductionCost(unsigned Opcode, Type *Ty, bool IsPairwise)
Try to calculate arithmetic and shuffle op costs for reduction operations.
unsigned getRegisterBitWidth(bool Vector) const
bool hasHalfRate64Ops() const
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
amdgpu Simplify well known AMD library false Value * Callee
Analysis containing CSE Info
const R600Subtarget * getST() const
Container class for subtarget features.
constexpr bool isPowerOf2_32(uint32_t Value)
Return true if the argument is a power of two > 0.
The instances of the Type class are immutable: once they are created, they are never changed...
Address space for flat memory.
unsigned getMinMaxReductionCost(Type *Ty, Type *CondTy, bool IsPairwise, bool)
Try to calculate op costs for min/max reduction operations.
const AMDGPUTargetLowering * getTLI() const
This file provides a helper that implements much of the TTI interface in terms of the target-independ...
The AMDGPU TargetMachine interface definition for hw codgen targets.
Triple - Helper class for working with autoconf configuration names.
bool hasFlatAddressSpace() const
unsigned getCFInstrCost(unsigned Opcode)
unsigned getShuffleCost(TTI::ShuffleKind Kind, Type *Tp, int Index, Type *SubTp)
unsigned getNumberOfRegisters(bool Vector)
Class to represent vector types.
bool isShader(CallingConv::ID cc)
bool isAlwaysUniform(const Value *V)
GCNTTIImpl(const AMDGPUTargetMachine *TM, const Function &F)
unsigned getVectorSplitCost()
Provides AMDGPU specific target descriptions.
bool hasBranchDivergence()
Represents a single loop in the control flow graph.
unsigned getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
TTI::PopcntSupportKind getPopcntSupport(unsigned TyWidth)
bool isSourceOfDivergence(const Value *V)
LLVM Value Representation.
static const Function * getParent(const Value *V)
unsigned getInliningThresholdMultiplier()
AMDGPUTTIImpl(const AMDGPUTargetMachine *TM, const Function &F)
Information about a load/store intrinsic defined by the target.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
A wrapper class for inspecting calls to intrinsic functions.