17 #ifndef LLVM_LIB_TARGET_X86_X86TARGETTRANSFORMINFO_H 18 #define LLVM_LIB_TARGET_X86_X86TARGETTRANSFORMINFO_H 42 TLI(ST->getTargetLowering()) {}
66 unsigned Opcode,
Type *Ty,
81 unsigned AddressSpace);
83 bool VariableMask,
unsigned Alignment);
91 unsigned ScalarizationCostPassed = UINT_MAX);
104 unsigned Alignment,
unsigned AddressSpace,
105 bool UseMaskForCond =
false,
106 bool UseMaskForGaps =
false);
109 unsigned Alignment,
unsigned AddressSpace,
110 bool UseMaskForCond =
false,
111 bool UseMaskForGaps =
false);
114 unsigned Alignment,
unsigned AddressSpace,
115 bool UseMaskForCond =
false,
116 bool UseMaskForGaps =
false);
139 bool IsZeroCmp)
const;
142 int getGSScalarCost(
unsigned Opcode,
Type *DataTy,
bool VariableMask,
143 unsigned Alignment,
unsigned AddressSpace);
144 int getGSVectorCost(
unsigned Opcode,
Type *DataTy,
Value *Ptr,
145 unsigned Alignment,
unsigned AddressSpace);
llvm::Optional< unsigned > getCacheSize(TargetTransformInfo::CacheLevel Level) const
This class represents lattice values for constants.
int getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index)
bool isFCmpOrdCheaperThanFCmpZero(Type *Ty)
int getGatherScatterOpCost(unsigned Opcode, Type *DataTy, Value *Ptr, bool VariableMask, unsigned Alignment)
Calculate the cost of Gather / Scatter operation.
The main scalar evolution driver.
unsigned getRegisterBitWidth(bool Vector) const
bool isLegalMaskedScatter(Type *DataType)
Base class which can be used to help build a TTI implementation.
unsigned getAtomicMemIntrinsicMaxElementSize() const
unsigned getNumberOfRegisters(bool Vector)
unsigned getMaxInterleaveFactor(unsigned VF)
bool areInlineCompatible(const Function *Caller, const Function *Callee) const
bool isLegalMaskedStore(Type *DataType)
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 *>())
int getInterleavedMemoryOpCostAVX2(unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, unsigned Alignment, unsigned AddressSpace, bool UseMaskForCond=false, bool UseMaskForGaps=false)
bool isLSRCostLess(TargetTransformInfo::LSRCost &C1, TargetTransformInfo::LSRCost &C2)
llvm::Optional< unsigned > getCacheAssociativity(TargetTransformInfo::CacheLevel Level) const
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
int getAddressComputationCost(Type *PtrTy, ScalarEvolution *SE, const SCEV *Ptr)
amdgpu Simplify well known AMD library false Value * Callee
The instances of the Type class are immutable: once they are created, they are never changed...
bool isLegalMaskedGather(Type *DataType)
int getInterleavedMemoryOpCostAVX512(unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, unsigned Alignment, unsigned AddressSpace, bool UseMaskForCond=false, bool UseMaskForGaps=false)
bool isLegalMaskedLoad(Type *DataType)
const TTI::MemCmpExpansionOptions * enableMemCmpExpansion(bool IsZeroCmp) const
int getMaskedMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment, unsigned AddressSpace)
This file provides a helper that implements much of the TTI interface in terms of the target-independ...
int getArithmeticReductionCost(unsigned Opcode, Type *Ty, bool IsPairwiseForm)
unsigned getUserCost(const User *U, ArrayRef< const Value *> Operands)
bool enableInterleavedAccessVectorization()
int getMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment, unsigned AddressSpace, const Instruction *I=nullptr)
int getShuffleCost(TTI::ShuffleKind Kind, Type *Tp, int Index, Type *SubTp)
TTI::PopcntSupportKind getPopcntSupport(unsigned TyWidth)
int getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy, const Instruction *I=nullptr)
int getMinMaxReductionCost(Type *Ty, Type *CondTy, bool IsPairwiseForm, bool IsUnsigned)
Class for arbitrary precision integers.
unsigned getLoadStoreVecRegBitWidth(unsigned AS) const
This class represents an analyzed expression in the program.
int getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src, const Instruction *I=nullptr)
LLVM Value Representation.
bool hasDivRemOp(Type *DataType, bool IsSigned)
static const Function * getParent(const Value *V)
Convenience struct for specifying and reasoning about fast-math flags.
X86TTIImpl(const X86TargetMachine *TM, const Function &F)
int getIntrinsicInstrCost(Intrinsic::ID IID, Type *RetTy, ArrayRef< Type *> Tys, FastMathFlags FMF, unsigned ScalarizationCostPassed=UINT_MAX)
int getInterleavedMemoryOpCost(unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, unsigned Alignment, unsigned AddressSpace, bool UseMaskForCond=false, bool UseMaskForGaps=false)
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
int getIntImmCost(int64_t)
Calculate the cost of materializing a 64-bit value.
This file describes how to lower LLVM code to machine code.