16 #ifndef LLVM_LIB_TARGET_X86_X86TARGETTRANSFORMINFO_H 17 #define LLVM_LIB_TARGET_X86_X86TARGETTRANSFORMINFO_H 45 X86::FeatureCMPXCHG16B,
49 X86::FeatureFast11ByteNOP,
50 X86::FeatureFast15ByteNOP,
51 X86::FeatureFastBEXTR,
52 X86::FeatureFastHorizontalOps,
53 X86::FeatureFastLZCNT,
54 X86::FeatureFastScalarFSQRT,
55 X86::FeatureFastSHLDRotate,
56 X86::FeatureFastScalarShiftMasks,
57 X86::FeatureFastVectorShiftMasks,
58 X86::FeatureFastVariableShuffle,
59 X86::FeatureFastVectorFSQRT,
61 X86::FeatureLEAUsesAG,
62 X86::FeatureLZCNTFalseDeps,
63 X86::FeatureBranchFusion,
64 X86::FeatureMacroFusion,
65 X86::FeatureMergeToThreeWayBranch,
66 X86::FeaturePadShortFunctions,
67 X86::FeaturePOPCNTFalseDeps,
68 X86::FeatureSSEUnalignedMem,
69 X86::FeatureSlow3OpsLEA,
70 X86::FeatureSlowDivide32,
71 X86::FeatureSlowDivide64,
72 X86::FeatureSlowIncDec,
74 X86::FeatureSlowPMADDWD,
75 X86::FeatureSlowPMULLD,
77 X86::FeatureSlowTwoMemOps,
78 X86::FeatureSlowUAMem16,
79 X86::FeaturePreferMaskRegisters,
80 X86::FeatureInsertVZEROUPPER,
81 X86::FeatureUseGLMDivSqrtCosts,
84 X86::FeatureHasFastGather,
85 X86::FeatureSlowUAMem32,
88 X86::FeaturePrefer128Bit,
89 X86::FeaturePrefer256Bit,
99 TLI(ST->getTargetLowering()) {}
123 unsigned Opcode,
Type *Ty,
139 unsigned AddressSpace);
141 bool VariableMask,
unsigned Alignment);
149 unsigned ScalarizationCostPassed = UINT_MAX);
155 bool IsPairwiseForm);
162 unsigned Alignment,
unsigned AddressSpace,
163 bool UseMaskForCond =
false,
164 bool UseMaskForGaps =
false);
167 unsigned Alignment,
unsigned AddressSpace,
168 bool UseMaskForCond =
false,
169 bool UseMaskForGaps =
false);
172 unsigned Alignment,
unsigned AddressSpace,
173 bool UseMaskForCond =
false,
174 bool UseMaskForGaps =
false);
204 bool IsZeroCmp)
const;
207 int getGSScalarCost(
unsigned Opcode,
Type *DataTy,
bool VariableMask,
208 unsigned Alignment,
unsigned AddressSpace);
209 int getGSVectorCost(
unsigned Opcode,
Type *DataTy,
Value *Ptr,
210 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 getNumberOfRegisters(unsigned ClassID) const
unsigned getRegisterBitWidth(bool Vector) const
bool isLegalMaskedLoad(Type *DataType, MaybeAlign Alignment)
bool isLegalMaskedStore(Type *DataType, MaybeAlign Alignment)
Base class which can be used to help build a TTI implementation.
bool isLegalNTLoad(Type *DataType, Align Alignment)
bool isLegalNTStore(Type *DataType, Align Alignment)
unsigned getAtomicMemIntrinsicMaxElementSize() const
A templated base class for SmallPtrSet which provides the typesafe interface that is common across al...
unsigned getMaxInterleaveFactor(unsigned VF)
bool areInlineCompatible(const Function *Caller, const Function *Callee) const
int getInterleavedMemoryOpCostAVX2(unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, unsigned Alignment, unsigned AddressSpace, bool UseMaskForCond=false, bool UseMaskForGaps=false)
mir Rename Register Operands
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)
Container class for subtarget features.
The instances of the Type class are immutable: once they are created, they are never changed...
int getInterleavedMemoryOpCostAVX512(unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, unsigned Alignment, unsigned AddressSpace, bool UseMaskForCond=false, bool UseMaskForGaps=false)
bool isLegalMaskedGather(Type *DataType, MaybeAlign Alignment)
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()
This struct is a compact representation of a valid (non-zero power of two) alignment.
int getShuffleCost(TTI::ShuffleKind Kind, Type *Tp, int Index, Type *SubTp)
TTI::PopcntSupportKind getPopcntSupport(unsigned TyWidth)
This struct is a compact representation of a valid (power of two) or undefined (0) alignment...
bool areFunctionArgsABICompatible(const Function *Caller, const Function *Callee, SmallPtrSetImpl< Argument *> &Args) const
TTI::MemCmpExpansionOptions enableMemCmpExpansion(bool OptSize, bool IsZeroCmp) const
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.
int getMemoryOpCost(unsigned Opcode, Type *Src, MaybeAlign Alignment, unsigned AddressSpace, const Instruction *I=nullptr)
amdgpu Simplify well known AMD library false FunctionCallee Callee
bool isLegalMaskedScatter(Type *DataType, MaybeAlign Alignment)
unsigned getLoadStoreVecRegBitWidth(unsigned AS) const
This class represents an analyzed expression in the program.
int getIntImmCostInst(unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty)
int getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src, const Instruction *I=nullptr)
bool isLegalMaskedCompressStore(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 *>(), const Instruction *CxtI=nullptr)
LLVM Value Representation.
bool isLegalMaskedExpandLoad(Type *DataType)
bool hasDivRemOp(Type *DataType, bool IsSigned)
static const Function * getParent(const Value *V)
int getIntImmCostIntrin(Intrinsic::ID IID, unsigned Idx, const APInt &Imm, Type *Ty)
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.