17 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUTARGETTRANSFORMINFO_H
18 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUTARGETTRANSFORMINFO_H
26 class AMDGPUTargetLowering;
35 bool IsGraphicsShader;
41 static inline int getFullRateInstrCost() {
45 static inline int getHalfRateInstrCost() {
51 static inline int getQuarterRateInstrCost() {
57 inline int get64BitInstrCost()
const {
59 getHalfRateInstrCost() : getQuarterRateInstrCost();
65 ST(TM->getSubtargetImpl(F)),
66 TLI(ST->getTargetLowering()),
67 IsGraphicsShader(AMDGPU::
isShader(F.getCallingConv())) {}
72 TTI::UnrollingPreferences &UP);
87 unsigned AddrSpace)
const;
90 unsigned AddrSpace)
const;
93 unsigned AddrSpace)
const;
98 unsigned Opcode,
Type *Ty,
114 if (IsGraphicsShader)
static const unsigned UNKNOWN_ADDRESS_SPACE
unsigned getFlatAddressSpace() const
The main scalar evolution driver.
unsigned getMinVectorRegisterBitWidth() const
void getUnrollingPreferences(Loop *L, ScalarEvolution &SE, TTI::UnrollingPreferences &UP)
Base class which can be used to help build a TTI implementation.
bool isSourceOfDivergence(const Value *V) const
unsigned getVectorSplitCost()
unsigned getLoadStoreVecRegBitWidth(unsigned AddrSpace) const
unsigned getMaxInterleaveFactor(unsigned VF)
TTI::PopcntSupportKind getPopcntSupport(unsigned TyWidth)
bool hasFlatAddressSpace() const
bool isLegalToVectorizeStoreChain(unsigned ChainSizeInBytes, unsigned Alignment, unsigned AddrSpace) const
unsigned getHardwareNumberOfRegisters(bool Vector) const
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
bool hasHalfRate64Ops() const
unsigned getRegisterBitWidth(bool Vector) const
unsigned getShuffleCost(TTI::ShuffleKind Kind, Type *Tp, int Index, Type *SubTp)
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...
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
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.
bool isAlwaysUniform(const Value *V) const
bool isLegalToVectorizeMemChain(unsigned ChainSizeInBytes, unsigned Alignment, unsigned AddrSpace) const
bool isLegalToVectorizeLoadChain(unsigned ChainSizeInBytes, unsigned Alignment, unsigned AddrSpace) const
AMDGPUAS getAMDGPUAS() const
unsigned getCFInstrCost(unsigned Opcode)
bool isShader(CallingConv::ID cc)
int getVectorInstrCost(unsigned Opcode, Type *ValTy, unsigned Index)
unsigned getNumberOfRegisters(bool Vector) const
bool hasBranchDivergence()
Represents a single loop in the control flow graph.
unsigned FLAT_ADDRESS
Address space for flat memory.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
int 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 * >())
LLVM Value Representation.
static const Function * getParent(const Value *V)
AMDGPUTTIImpl(const AMDGPUTargetMachine *TM, const Function &F)