LLVM  11.0.0git
Public Member Functions | List of all members
llvm::X86TTIImpl Class Reference

#include "Target/X86/X86TargetTransformInfo.h"

Inheritance diagram for llvm::X86TTIImpl:
Inheritance graph
[legend]
Collaboration diagram for llvm::X86TTIImpl:
Collaboration graph
[legend]

Public Member Functions

 X86TTIImpl (const X86TargetMachine *TM, const Function &F)
 
Scalar TTI Implementations
TTI::PopcntSupportKind getPopcntSupport (unsigned TyWidth)
 
Cache TTI Implementation
llvm::Optional< unsignedgetCacheSize (TargetTransformInfo::CacheLevel Level) const
 
llvm::Optional< unsignedgetCacheAssociativity (TargetTransformInfo::CacheLevel Level) const
 
- Public Member Functions inherited from llvm::BasicTTIImplBase< X86TTIImpl >
bool allowsMisalignedMemoryAccesses (LLVMContext &Context, unsigned BitWidth, unsigned AddressSpace, unsigned Alignment, bool *Fast) const
 
bool hasBranchDivergence ()
 
bool useGPUDivergenceAnalysis ()
 
bool isSourceOfDivergence (const Value *V)
 
bool isAlwaysUniform (const Value *V)
 
unsigned getFlatAddressSpace ()
 
bool collectFlatAddressOperands (SmallVectorImpl< int > &OpIndexes, Intrinsic::ID IID) const
 
bool isNoopAddrSpaceCast (unsigned FromAS, unsigned ToAS) const
 
ValuerewriteIntrinsicWithAddressSpace (IntrinsicInst *II, Value *OldV, Value *NewV) const
 
bool isLegalAddImmediate (int64_t imm)
 
bool isLegalICmpImmediate (int64_t imm)
 
bool isLegalAddressingMode (Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace, Instruction *I=nullptr)
 
bool isIndexedLoadLegal (TTI::MemIndexedMode M, Type *Ty, const DataLayout &DL) const
 
bool isIndexedStoreLegal (TTI::MemIndexedMode M, Type *Ty, const DataLayout &DL) const
 
bool isLSRCostLess (TTI::LSRCost C1, TTI::LSRCost C2)
 
bool isProfitableLSRChainElement (Instruction *I)
 
int getScalingFactorCost (Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace)
 
bool isTruncateFree (Type *Ty1, Type *Ty2)
 
bool isProfitableToHoist (Instruction *I)
 
bool useAA () const
 
bool isTypeLegal (Type *Ty)
 
int getGEPCost (Type *PointeeType, const Value *Ptr, ArrayRef< const Value * > Operands)
 
unsigned getEstimatedNumberOfCaseClusters (const SwitchInst &SI, unsigned &JumpTableSize, ProfileSummaryInfo *PSI, BlockFrequencyInfo *BFI)
 
bool shouldBuildLookupTables ()
 
bool haveFastSqrt (Type *Ty)
 
bool isFCmpOrdCheaperThanFCmpZero (Type *Ty)
 
unsigned getFPOpCost (Type *Ty)
 
unsigned getInliningThresholdMultiplier ()
 
int getInlinerVectorBonusPercent ()
 
void getUnrollingPreferences (Loop *L, ScalarEvolution &SE, TTI::UnrollingPreferences &UP)
 
void getPeelingPreferences (Loop *L, ScalarEvolution &SE, TTI::PeelingPreferences &PP)
 
bool isHardwareLoopProfitable (Loop *L, ScalarEvolution &SE, AssumptionCache &AC, TargetLibraryInfo *LibInfo, HardwareLoopInfo &HWLoopInfo)
 
bool preferPredicateOverEpilogue (Loop *L, LoopInfo *LI, ScalarEvolution &SE, AssumptionCache &AC, TargetLibraryInfo *TLI, DominatorTree *DT, const LoopAccessInfo *LAI)
 
bool emitGetActiveLaneMask ()
 
int getInstructionLatency (const Instruction *I)
 
virtual unsigned getCacheLineSize () const
 
virtual unsigned getPrefetchDistance () const
 
virtual unsigned getMinPrefetchStride (unsigned NumMemAccesses, unsigned NumStridedMemAccesses, unsigned NumPrefetches, bool HasCall) const
 
virtual unsigned getMaxPrefetchIterationsAhead () const
 
virtual bool enableWritePrefetching () const
 
unsigned getRegisterBitWidth (bool Vector) const
 
unsigned getScalarizationOverhead (VectorType *InTy, const APInt &DemandedElts, bool Insert, bool Extract)
 Estimate the overhead of scalarizing an instruction. More...
 
unsigned getScalarizationOverhead (VectorType *InTy, bool Insert, bool Extract)
 Helper wrapper for the DemandedElts variant of getScalarizationOverhead. More...
 
unsigned getScalarizationOverhead (VectorType *InTy, ArrayRef< const Value * > Args)
 
unsigned getOperandsScalarizationOverhead (ArrayRef< const Value * > Args, unsigned VF)
 Estimate the overhead of scalarizing an instructions unique non-constant operands. More...
 
unsigned getMaxInterleaveFactor (unsigned VF)
 
unsigned getArithmeticInstrCost (unsigned Opcode, Type *Ty, TTI::TargetCostKind CostKind=TTI::TCK_RecipThroughput, 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)
 
unsigned getShuffleCost (TTI::ShuffleKind Kind, VectorType *Tp, int Index, VectorType *SubTp)
 
unsigned getCastInstrCost (unsigned Opcode, Type *Dst, Type *Src, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
 
unsigned getExtractWithExtendCost (unsigned Opcode, Type *Dst, VectorType *VecTy, unsigned Index)
 
unsigned getCFInstrCost (unsigned Opcode, TTI::TargetCostKind CostKind)
 
unsigned getCmpSelInstrCost (unsigned Opcode, Type *ValTy, Type *CondTy, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
 
unsigned getVectorInstrCost (unsigned Opcode, Type *Val, unsigned Index)
 
unsigned getMemoryOpCost (unsigned Opcode, Type *Src, MaybeAlign Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
 
unsigned getInterleavedMemoryOpCost (unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, bool UseMaskForCond=false, bool UseMaskForGaps=false)
 
unsigned getIntrinsicInstrCost (const IntrinsicCostAttributes &ICA, TTI::TargetCostKind CostKind)
 Get intrinsic cost based on arguments. More...
 
unsigned getTypeBasedIntrinsicInstrCost (const IntrinsicCostAttributes &ICA, TTI::TargetCostKind CostKind)
 Get intrinsic cost based on argument types. More...
 
unsigned getCallInstrCost (Function *F, Type *RetTy, ArrayRef< Type * > Tys, TTI::TargetCostKind CostKind=TTI::TCK_SizeAndLatency)
 Compute a cost of the given call instruction. More...
 
unsigned getNumberOfParts (Type *Tp)
 
unsigned getAddressComputationCost (Type *Ty, ScalarEvolution *, const SCEV *)
 
unsigned getArithmeticReductionCost (unsigned Opcode, VectorType *Ty, bool IsPairwise, TTI::TargetCostKind CostKind)
 Try to calculate arithmetic and shuffle op costs for reduction operations. More...
 
unsigned getMinMaxReductionCost (VectorType *Ty, VectorType *CondTy, bool IsPairwise, bool IsUnsigned, TTI::TargetCostKind CostKind)
 Try to calculate op costs for min/max reduction operations. More...
 
unsigned getVectorSplitCost ()
 
- Public Member Functions inherited from llvm::TargetTransformInfoImplCRTPBase< X86TTIImpl >
int getGEPCost (Type *PointeeType, const Value *Ptr, ArrayRef< const Value * > Operands, TTI::TargetCostKind CostKind=TTI::TCK_SizeAndLatency)
 
int getUserCost (const User *U, ArrayRef< const Value * > Operands, TTI::TargetCostKind CostKind)
 
int getInstructionLatency (const Instruction *I)
 
- Public Member Functions inherited from llvm::TargetTransformInfoImplBase
 TargetTransformInfoImplBase (const TargetTransformInfoImplBase &Arg)
 
 TargetTransformInfoImplBase (TargetTransformInfoImplBase &&Arg)
 
const DataLayoutgetDataLayout () const
 
int getGEPCost (Type *PointeeType, const Value *Ptr, ArrayRef< const Value *> Operands, TTI::TargetCostKind CostKind=TTI::TCK_SizeAndLatency)
 
unsigned getEstimatedNumberOfCaseClusters (const SwitchInst &SI, unsigned &JTSize, ProfileSummaryInfo *PSI, BlockFrequencyInfo *BFI)
 
unsigned getInliningThresholdMultiplier ()
 
int getInlinerVectorBonusPercent ()
 
unsigned getMemcpyCost (const Instruction *I)
 
bool hasBranchDivergence ()
 
bool useGPUDivergenceAnalysis ()
 
bool isSourceOfDivergence (const Value *V)
 
bool isAlwaysUniform (const Value *V)
 
unsigned getFlatAddressSpace ()
 
bool collectFlatAddressOperands (SmallVectorImpl< int > &OpIndexes, Intrinsic::ID IID) const
 
bool isNoopAddrSpaceCast (unsigned, unsigned) const
 
ValuerewriteIntrinsicWithAddressSpace (IntrinsicInst *II, Value *OldV, Value *NewV) const
 
bool isLoweredToCall (const Function *F)
 
bool isHardwareLoopProfitable (Loop *L, ScalarEvolution &SE, AssumptionCache &AC, TargetLibraryInfo *LibInfo, HardwareLoopInfo &HWLoopInfo)
 
bool preferPredicateOverEpilogue (Loop *L, LoopInfo *LI, ScalarEvolution &SE, AssumptionCache &AC, TargetLibraryInfo *TLI, DominatorTree *DT, const LoopAccessInfo *LAI) const
 
bool emitGetActiveLaneMask () const
 
void getUnrollingPreferences (Loop *, ScalarEvolution &, TTI::UnrollingPreferences &)
 
void getPeelingPreferences (Loop *, ScalarEvolution &, TTI::PeelingPreferences &)
 
bool isLegalAddImmediate (int64_t Imm)
 
bool isLegalICmpImmediate (int64_t Imm)
 
bool isLegalAddressingMode (Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace, Instruction *I=nullptr)
 
bool isLSRCostLess (TTI::LSRCost &C1, TTI::LSRCost &C2)
 
bool isProfitableLSRChainElement (Instruction *I)
 
bool canMacroFuseCmp ()
 
bool canSaveCmp (Loop *L, BranchInst **BI, ScalarEvolution *SE, LoopInfo *LI, DominatorTree *DT, AssumptionCache *AC, TargetLibraryInfo *LibInfo)
 
bool shouldFavorPostInc () const
 
bool shouldFavorBackedgeIndex (const Loop *L) const
 
bool isLegalMaskedStore (Type *DataType, Align Alignment)
 
bool isLegalMaskedLoad (Type *DataType, Align Alignment)
 
bool isLegalNTStore (Type *DataType, Align Alignment)
 
bool isLegalNTLoad (Type *DataType, Align Alignment)
 
bool isLegalMaskedScatter (Type *DataType, Align Alignment)
 
bool isLegalMaskedGather (Type *DataType, Align Alignment)
 
bool isLegalMaskedCompressStore (Type *DataType)
 
bool isLegalMaskedExpandLoad (Type *DataType)
 
bool hasDivRemOp (Type *DataType, bool IsSigned)
 
bool hasVolatileVariant (Instruction *I, unsigned AddrSpace)
 
bool prefersVectorizedAddressing ()
 
int getScalingFactorCost (Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace)
 
bool LSRWithInstrQueries ()
 
bool isTruncateFree (Type *Ty1, Type *Ty2)
 
bool isProfitableToHoist (Instruction *I)
 
bool useAA ()
 
bool isTypeLegal (Type *Ty)
 
bool shouldBuildLookupTables ()
 
bool shouldBuildLookupTablesForConstant (Constant *C)
 
bool useColdCCForColdCall (Function &F)
 
unsigned getScalarizationOverhead (VectorType *Ty, const APInt &DemandedElts, bool Insert, bool Extract)
 
unsigned getOperandsScalarizationOverhead (ArrayRef< const Value *> Args, unsigned VF)
 
bool supportsEfficientVectorElementLoadStore ()
 
bool enableAggressiveInterleaving (bool LoopHasReductions)
 
TTI::MemCmpExpansionOptions enableMemCmpExpansion (bool OptSize, bool IsZeroCmp) const
 
bool enableInterleavedAccessVectorization ()
 
bool enableMaskedInterleavedAccessVectorization ()
 
bool isFPVectorizationPotentiallyUnsafe ()
 
bool allowsMisalignedMemoryAccesses (LLVMContext &Context, unsigned BitWidth, unsigned AddressSpace, unsigned Alignment, bool *Fast)
 
TTI::PopcntSupportKind getPopcntSupport (unsigned IntTyWidthInBit)
 
bool haveFastSqrt (Type *Ty)
 
bool isFCmpOrdCheaperThanFCmpZero (Type *Ty)
 
unsigned getFPOpCost (Type *Ty)
 
int getIntImmCodeSizeCost (unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty)
 
unsigned getIntImmCost (const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind)
 
unsigned getIntImmCostInst (unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind)
 
unsigned getIntImmCostIntrin (Intrinsic::ID IID, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind)
 
unsigned getNumberOfRegisters (unsigned ClassID) const
 
unsigned getRegisterClassForType (bool Vector, Type *Ty=nullptr) const
 
const chargetRegisterClassName (unsigned ClassID) const
 
unsigned getRegisterBitWidth (bool Vector) const
 
unsigned getMinVectorRegisterBitWidth ()
 
bool shouldMaximizeVectorBandwidth (bool OptSize) const
 
unsigned getMinimumVF (unsigned ElemWidth) const
 
bool shouldConsiderAddressTypePromotion (const Instruction &I, bool &AllowPromotionWithoutCommonHeader)
 
unsigned getCacheLineSize () const
 
llvm::Optional< unsignedgetCacheSize (TargetTransformInfo::CacheLevel Level) const
 
llvm::Optional< unsignedgetCacheAssociativity (TargetTransformInfo::CacheLevel Level) const
 
unsigned getPrefetchDistance () const
 
unsigned getMinPrefetchStride (unsigned NumMemAccesses, unsigned NumStridedMemAccesses, unsigned NumPrefetches, bool HasCall) const
 
unsigned getMaxPrefetchIterationsAhead () const
 
bool enableWritePrefetching () const
 
unsigned getMaxInterleaveFactor (unsigned VF)
 
unsigned getArithmeticInstrCost (unsigned Opcode, Type *Ty, TTI::TargetCostKind CostKind, TTI::OperandValueKind Opd1Info, TTI::OperandValueKind Opd2Info, TTI::OperandValueProperties Opd1PropInfo, TTI::OperandValueProperties Opd2PropInfo, ArrayRef< const Value *> Args, const Instruction *CxtI=nullptr)
 
unsigned getShuffleCost (TTI::ShuffleKind Kind, VectorType *Ty, int Index, VectorType *SubTp)
 
unsigned getCastInstrCost (unsigned Opcode, Type *Dst, Type *Src, TTI::TargetCostKind CostKind, const Instruction *I)
 
unsigned getExtractWithExtendCost (unsigned Opcode, Type *Dst, VectorType *VecTy, unsigned Index)
 
unsigned getCFInstrCost (unsigned Opcode, TTI::TargetCostKind CostKind)
 
unsigned getCmpSelInstrCost (unsigned Opcode, Type *ValTy, Type *CondTy, TTI::TargetCostKind CostKind, const Instruction *I) const
 
unsigned getVectorInstrCost (unsigned Opcode, Type *Val, unsigned Index)
 
unsigned getMemoryOpCost (unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, const Instruction *I) const
 
unsigned getMaskedMemoryOpCost (unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind)
 
unsigned getGatherScatterOpCost (unsigned Opcode, Type *DataTy, const Value *Ptr, bool VariableMask, Align Alignment, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
 
unsigned getInterleavedMemoryOpCost (unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, bool UseMaskForCond, bool UseMaskForGaps)
 
unsigned getIntrinsicInstrCost (const IntrinsicCostAttributes &ICA, TTI::TargetCostKind CostKind)
 
unsigned getCallInstrCost (Function *F, Type *RetTy, ArrayRef< Type *> Tys, TTI::TargetCostKind CostKind)
 
unsigned getNumberOfParts (Type *Tp)
 
unsigned getAddressComputationCost (Type *Tp, ScalarEvolution *, const SCEV *)
 
unsigned getArithmeticReductionCost (unsigned, VectorType *, bool, TTI::TargetCostKind)
 
unsigned getMinMaxReductionCost (VectorType *, VectorType *, bool, bool, TTI::TargetCostKind)
 
unsigned getCostOfKeepingLiveOverCall (ArrayRef< Type *> Tys)
 
bool getTgtMemIntrinsic (IntrinsicInst *Inst, MemIntrinsicInfo &Info)
 
unsigned getAtomicMemIntrinsicMaxElementSize () const
 
ValuegetOrCreateResultFromMemIntrinsic (IntrinsicInst *Inst, Type *ExpectedType)
 
TypegetMemcpyLoopLoweringType (LLVMContext &Context, Value *Length, unsigned SrcAddrSpace, unsigned DestAddrSpace, unsigned SrcAlign, unsigned DestAlign) const
 
void getMemcpyLoopResidualLoweringType (SmallVectorImpl< Type *> &OpsOut, LLVMContext &Context, unsigned RemainingBytes, unsigned SrcAddrSpace, unsigned DestAddrSpace, unsigned SrcAlign, unsigned DestAlign) const
 
bool areInlineCompatible (const Function *Caller, const Function *Callee) const
 
bool areFunctionArgsABICompatible (const Function *Caller, const Function *Callee, SmallPtrSetImpl< Argument *> &Args) const
 
bool isIndexedLoadLegal (TTI::MemIndexedMode Mode, Type *Ty, const DataLayout &DL) const
 
bool isIndexedStoreLegal (TTI::MemIndexedMode Mode, Type *Ty, const DataLayout &DL) const
 
unsigned getLoadStoreVecRegBitWidth (unsigned AddrSpace) const
 
bool isLegalToVectorizeLoad (LoadInst *LI) const
 
bool isLegalToVectorizeStore (StoreInst *SI) const
 
bool isLegalToVectorizeLoadChain (unsigned ChainSizeInBytes, Align Alignment, unsigned AddrSpace) const
 
bool isLegalToVectorizeStoreChain (unsigned ChainSizeInBytes, Align Alignment, unsigned AddrSpace) const
 
unsigned getLoadVectorFactor (unsigned VF, unsigned LoadSize, unsigned ChainSizeInBytes, VectorType *VecTy) const
 
unsigned getStoreVectorFactor (unsigned VF, unsigned StoreSize, unsigned ChainSizeInBytes, VectorType *VecTy) const
 
bool useReductionIntrinsic (unsigned Opcode, Type *Ty, TTI::ReductionFlags Flags) const
 
bool shouldExpandReduction (const IntrinsicInst *II) const
 
unsigned getGISelRematGlobalCost () const
 
bool hasActiveVectorLength () const
 

Vector TTI Implementations

unsigned getNumberOfRegisters (unsigned ClassID) const
 
unsigned getRegisterBitWidth (bool Vector) const
 
unsigned getLoadStoreVecRegBitWidth (unsigned AS) const
 
unsigned getMaxInterleaveFactor (unsigned VF)
 
int getArithmeticInstrCost (unsigned Opcode, Type *Ty, TTI::TargetCostKind CostKind=TTI::TCK_RecipThroughput, 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)
 
int getShuffleCost (TTI::ShuffleKind Kind, VectorType *Tp, int Index, VectorType *SubTp)
 
int getCastInstrCost (unsigned Opcode, Type *Dst, Type *Src, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
 
int getCmpSelInstrCost (unsigned Opcode, Type *ValTy, Type *CondTy, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
 
int getVectorInstrCost (unsigned Opcode, Type *Val, unsigned Index)
 
unsigned getScalarizationOverhead (VectorType *Ty, const APInt &DemandedElts, bool Insert, bool Extract)
 
int getMemoryOpCost (unsigned Opcode, Type *Src, MaybeAlign Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
 
int getMaskedMemoryOpCost (unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind=TTI::TCK_SizeAndLatency)
 
int getGatherScatterOpCost (unsigned Opcode, Type *DataTy, const Value *Ptr, bool VariableMask, Align Alignment, TTI::TargetCostKind CostKind, const Instruction *I)
 Calculate the cost of Gather / Scatter operation. More...
 
int getAddressComputationCost (Type *PtrTy, ScalarEvolution *SE, const SCEV *Ptr)
 
unsigned getAtomicMemIntrinsicMaxElementSize () const
 
int getTypeBasedIntrinsicInstrCost (const IntrinsicCostAttributes &ICA, TTI::TargetCostKind CostKind)
 
int getIntrinsicInstrCost (const IntrinsicCostAttributes &ICA, TTI::TargetCostKind CostKind)
 
int getArithmeticReductionCost (unsigned Opcode, VectorType *Ty, bool IsPairwiseForm, TTI::TargetCostKind CostKind=TTI::TCK_SizeAndLatency)
 
int getMinMaxCost (Type *Ty, Type *CondTy, bool IsUnsigned)
 
int getMinMaxReductionCost (VectorType *Ty, VectorType *CondTy, bool IsPairwiseForm, bool IsUnsigned, TTI::TargetCostKind CostKind)
 
int getInterleavedMemoryOpCost (unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind=TTI::TCK_SizeAndLatency, bool UseMaskForCond=false, bool UseMaskForGaps=false)
 
int getInterleavedMemoryOpCostAVX512 (unsigned Opcode, FixedVectorType *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind=TTI::TCK_SizeAndLatency, bool UseMaskForCond=false, bool UseMaskForGaps=false)
 
int getInterleavedMemoryOpCostAVX2 (unsigned Opcode, FixedVectorType *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind=TTI::TCK_SizeAndLatency, bool UseMaskForCond=false, bool UseMaskForGaps=false)
 
int getIntImmCost (int64_t)
 Calculate the cost of materializing a 64-bit value. More...
 
int getIntImmCost (const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind)
 
unsigned getCFInstrCost (unsigned Opcode, TTI::TargetCostKind CostKind)
 
int getIntImmCostInst (unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind)
 
int getIntImmCostIntrin (Intrinsic::ID IID, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind)
 
bool isLSRCostLess (TargetTransformInfo::LSRCost &C1, TargetTransformInfo::LSRCost &C2)
 
bool canMacroFuseCmp ()
 
bool isLegalMaskedLoad (Type *DataType, Align Alignment)
 
bool isLegalMaskedStore (Type *DataType, Align Alignment)
 
bool isLegalNTLoad (Type *DataType, Align Alignment)
 
bool isLegalNTStore (Type *DataType, Align Alignment)
 
bool isLegalMaskedGather (Type *DataType, Align Alignment)
 
bool isLegalMaskedScatter (Type *DataType, Align Alignment)
 
bool isLegalMaskedExpandLoad (Type *DataType)
 
bool isLegalMaskedCompressStore (Type *DataType)
 
bool hasDivRemOp (Type *DataType, bool IsSigned)
 
bool isFCmpOrdCheaperThanFCmpZero (Type *Ty)
 
bool areInlineCompatible (const Function *Caller, const Function *Callee) const
 
bool areFunctionArgsABICompatible (const Function *Caller, const Function *Callee, SmallPtrSetImpl< Argument *> &Args) const
 
TTI::MemCmpExpansionOptions enableMemCmpExpansion (bool OptSize, bool IsZeroCmp) const
 
bool enableInterleavedAccessVectorization ()
 
bool useReductionIntrinsic (unsigned Opcode, Type *Ty, TTI::ReductionFlags Flags) const
 Allow vectorizers to form reduction intrinsics in IR. More...
 

Additional Inherited Members

- Protected Types inherited from llvm::TargetTransformInfoImplBase
typedef TargetTransformInfo TTI
 
- Protected Member Functions inherited from llvm::BasicTTIImplBase< X86TTIImpl >
 BasicTTIImplBase (const TargetMachine *TM, const DataLayout &DL)
 
virtual ~BasicTTIImplBase ()=default
 
- Protected Member Functions inherited from llvm::TargetTransformInfoImplCRTPBase< X86TTIImpl >
 TargetTransformInfoImplCRTPBase (const DataLayout &DL)
 
- Protected Member Functions inherited from llvm::TargetTransformInfoImplBase
 TargetTransformInfoImplBase (const DataLayout &DL)
 
unsigned minRequiredElementSize (const Value *Val, bool &isSigned)
 
bool isStridedAccess (const SCEV *Ptr)
 
const SCEVConstantgetConstantStrideStep (ScalarEvolution *SE, const SCEV *Ptr)
 
bool isConstantStridedAccessLessThan (ScalarEvolution *SE, const SCEV *Ptr, int64_t MergeDistance)
 
- Protected Attributes inherited from llvm::TargetTransformInfoImplBase
const DataLayoutDL
 

Detailed Description

Definition at line 25 of file X86TargetTransformInfo.h.

Constructor & Destructor Documentation

◆ X86TTIImpl()

llvm::X86TTIImpl::X86TTIImpl ( const X86TargetMachine TM,
const Function F 
)
inlineexplicit

Member Function Documentation

◆ areFunctionArgsABICompatible()

bool X86TTIImpl::areFunctionArgsABICompatible ( const Function Caller,
const Function Callee,
SmallPtrSetImpl< Argument *> &  Args 
) const

◆ areInlineCompatible()

bool X86TTIImpl::areInlineCompatible ( const Function Caller,
const Function Callee 
) const

◆ canMacroFuseCmp()

bool X86TTIImpl::canMacroFuseCmp ( )

◆ enableInterleavedAccessVectorization()

bool X86TTIImpl::enableInterleavedAccessVectorization ( )

Definition at line 4231 of file X86TargetTransformInfo.cpp.

References llvm::X86Subtarget::isAtom().

Referenced by X86TTIImpl().

◆ enableMemCmpExpansion()

X86TTIImpl::TTI::MemCmpExpansionOptions X86TTIImpl::enableMemCmpExpansion ( bool  OptSize,
bool  IsZeroCmp 
) const

◆ getAddressComputationCost()

int X86TTIImpl::getAddressComputationCost ( Type PtrTy,
ScalarEvolution SE,
const SCEV Ptr 
)

◆ getArithmeticInstrCost()

int X86TTIImpl::getArithmeticInstrCost ( unsigned  Opcode,
Type Ty,
TTI::TargetCostKind  CostKind = TTI::TCK_RecipThroughput,
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 
)

◆ getArithmeticReductionCost()

int X86TTIImpl::getArithmeticReductionCost ( unsigned  Opcode,
VectorType Ty,
bool  IsPairwiseForm,
TTI::TargetCostKind  CostKind = TTI::TCK_SizeAndLatency 
)

◆ getAtomicMemIntrinsicMaxElementSize()

unsigned X86TTIImpl::getAtomicMemIntrinsicMaxElementSize ( ) const

Definition at line 2247 of file X86TargetTransformInfo.cpp.

Referenced by X86TTIImpl().

◆ getCacheAssociativity()

llvm::Optional< unsigned > X86TTIImpl::getCacheAssociativity ( TargetTransformInfo::CacheLevel  Level) const
virtual

◆ getCacheSize()

llvm::Optional< unsigned > X86TTIImpl::getCacheSize ( TargetTransformInfo::CacheLevel  Level) const
virtual

◆ getCastInstrCost()

int X86TTIImpl::getCastInstrCost ( unsigned  Opcode,
Type Dst,
Type Src,
TTI::TargetCostKind  CostKind,
const Instruction I = nullptr 
)

◆ getCFInstrCost()

unsigned X86TTIImpl::getCFInstrCost ( unsigned  Opcode,
TTI::TargetCostKind  CostKind 
)

◆ getCmpSelInstrCost()

int X86TTIImpl::getCmpSelInstrCost ( unsigned  Opcode,
Type ValTy,
Type CondTy,
TTI::TargetCostKind  CostKind,
const Instruction I = nullptr 
)

◆ getGatherScatterOpCost()

int X86TTIImpl::getGatherScatterOpCost ( unsigned  Opcode,
Type DataTy,
const Value Ptr,
bool  VariableMask,
Align  Alignment,
TTI::TargetCostKind  CostKind,
const Instruction I = nullptr 
)

◆ getInterleavedMemoryOpCost()

int X86TTIImpl::getInterleavedMemoryOpCost ( unsigned  Opcode,
Type VecTy,
unsigned  Factor,
ArrayRef< unsigned Indices,
Align  Alignment,
unsigned  AddressSpace,
TTI::TargetCostKind  CostKind = TTI::TCK_SizeAndLatency,
bool  UseMaskForCond = false,
bool  UseMaskForGaps = false 
)

◆ getInterleavedMemoryOpCostAVX2()

int X86TTIImpl::getInterleavedMemoryOpCostAVX2 ( unsigned  Opcode,
FixedVectorType VecTy,
unsigned  Factor,
ArrayRef< unsigned Indices,
Align  Alignment,
unsigned  AddressSpace,
TTI::TargetCostKind  CostKind = TTI::TCK_SizeAndLatency,
bool  UseMaskForCond = false,
bool  UseMaskForGaps = false 
)

◆ getInterleavedMemoryOpCostAVX512()

int X86TTIImpl::getInterleavedMemoryOpCostAVX512 ( unsigned  Opcode,
FixedVectorType VecTy,
unsigned  Factor,
ArrayRef< unsigned Indices,
Align  Alignment,
unsigned  AddressSpace,
TTI::TargetCostKind  CostKind = TTI::TCK_SizeAndLatency,
bool  UseMaskForCond = false,
bool  UseMaskForGaps = false 
)

◆ getIntImmCost() [1/2]

int X86TTIImpl::getIntImmCost ( int64_t  Val)

Calculate the cost of materializing a 64-bit value.

This helper method might only calculate a fraction of a larger immediate. Therefore it is valid to return a cost of ZERO.

Definition at line 3665 of file X86TargetTransformInfo.cpp.

References llvm::isInt< 32 >(), llvm::TargetTransformInfo::TCC_Basic, and llvm::TargetTransformInfo::TCC_Free.

Referenced by getIntImmCost(), getIntImmCostInst(), getIntImmCostIntrin(), and X86TTIImpl().

◆ getIntImmCost() [2/2]

int X86TTIImpl::getIntImmCost ( const APInt Imm,
Type Ty,
TTI::TargetCostKind  CostKind 
)

◆ getIntImmCostInst()

int X86TTIImpl::getIntImmCostInst ( unsigned  Opcode,
unsigned  Idx,
const APInt Imm,
Type Ty,
TTI::TargetCostKind  CostKind 
)

◆ getIntImmCostIntrin()

int X86TTIImpl::getIntImmCostIntrin ( Intrinsic::ID  IID,
unsigned  Idx,
const APInt Imm,
Type Ty,
TTI::TargetCostKind  CostKind 
)

◆ getIntrinsicInstrCost()

int X86TTIImpl::getIntrinsicInstrCost ( const IntrinsicCostAttributes ICA,
TTI::TargetCostKind  CostKind 
)

◆ getLoadStoreVecRegBitWidth()

unsigned X86TTIImpl::getLoadStoreVecRegBitWidth ( unsigned  AS) const

Definition at line 150 of file X86TargetTransformInfo.cpp.

References getRegisterBitWidth().

Referenced by X86TTIImpl().

◆ getMaskedMemoryOpCost()

int X86TTIImpl::getMaskedMemoryOpCost ( unsigned  Opcode,
Type Src,
Align  Alignment,
unsigned  AddressSpace,
TTI::TargetCostKind  CostKind = TTI::TCK_SizeAndLatency 
)

◆ getMaxInterleaveFactor()

unsigned X86TTIImpl::getMaxInterleaveFactor ( unsigned  VF)

Definition at line 154 of file X86TargetTransformInfo.cpp.

References llvm::X86Subtarget::hasAVX(), and llvm::X86Subtarget::isAtom().

Referenced by X86TTIImpl().

◆ getMemoryOpCost()

int X86TTIImpl::getMemoryOpCost ( unsigned  Opcode,
Type Src,
MaybeAlign  Alignment,
unsigned  AddressSpace,
TTI::TargetCostKind  CostKind,
const Instruction I = nullptr 
)

◆ getMinMaxCost()

int X86TTIImpl::getMinMaxCost ( Type Ty,
Type CondTy,
bool  IsUnsigned 
)

◆ getMinMaxReductionCost()

int X86TTIImpl::getMinMaxReductionCost ( VectorType Ty,
VectorType CondTy,
bool  IsPairwiseForm,
bool  IsUnsigned,
TTI::TargetCostKind  CostKind 
)

◆ getNumberOfRegisters()

unsigned X86TTIImpl::getNumberOfRegisters ( unsigned  ClassID) const

◆ getPopcntSupport()

TargetTransformInfo::PopcntSupportKind X86TTIImpl::getPopcntSupport ( unsigned  TyWidth)

◆ getRegisterBitWidth()

unsigned X86TTIImpl::getRegisterBitWidth ( bool  Vector) const

◆ getScalarizationOverhead()

unsigned X86TTIImpl::getScalarizationOverhead ( VectorType Ty,
const APInt DemandedElts,
bool  Insert,
bool  Extract 
)

◆ getShuffleCost()

int X86TTIImpl::getShuffleCost ( TTI::ShuffleKind  Kind,
VectorType Tp,
int  Index,
VectorType SubTp 
)

◆ getTypeBasedIntrinsicInstrCost()

int X86TTIImpl::getTypeBasedIntrinsicInstrCost ( const IntrinsicCostAttributes ICA,
TTI::TargetCostKind  CostKind 
)

◆ getVectorInstrCost()

int X86TTIImpl::getVectorInstrCost ( unsigned  Opcode,
Type Val,
unsigned  Index 
)

◆ hasDivRemOp()

bool X86TTIImpl::hasDivRemOp ( Type DataType,
bool  IsSigned 
)

◆ isFCmpOrdCheaperThanFCmpZero()

bool X86TTIImpl::isFCmpOrdCheaperThanFCmpZero ( Type Ty)

Definition at line 4161 of file X86TargetTransformInfo.cpp.

Referenced by X86TTIImpl().

◆ isLegalMaskedCompressStore()

bool X86TTIImpl::isLegalMaskedCompressStore ( Type DataType)

Definition at line 4107 of file X86TargetTransformInfo.cpp.

References isLegalMaskedExpandLoad().

Referenced by X86TTIImpl().

◆ isLegalMaskedExpandLoad()

bool X86TTIImpl::isLegalMaskedExpandLoad ( Type DataType)

◆ isLegalMaskedGather()

bool X86TTIImpl::isLegalMaskedGather ( Type DataType,
Align  Alignment 
)

◆ isLegalMaskedLoad()

bool X86TTIImpl::isLegalMaskedLoad ( Type DataType,
Align  Alignment 
)

◆ isLegalMaskedScatter()

bool X86TTIImpl::isLegalMaskedScatter ( Type DataType,
Align  Alignment 
)

◆ isLegalMaskedStore()

bool X86TTIImpl::isLegalMaskedStore ( Type DataType,
Align  Alignment 
)

Definition at line 4044 of file X86TargetTransformInfo.cpp.

References isLegalMaskedLoad().

Referenced by getMaskedMemoryOpCost(), and X86TTIImpl().

◆ isLegalNTLoad()

bool X86TTIImpl::isLegalNTLoad ( Type DataType,
Align  Alignment 
)

◆ isLegalNTStore()

bool X86TTIImpl::isLegalNTStore ( Type DataType,
Align  Alignment 
)

◆ isLSRCostLess()

bool X86TTIImpl::isLSRCostLess ( TargetTransformInfo::LSRCost C1,
TargetTransformInfo::LSRCost C2 
)

◆ useReductionIntrinsic()

bool llvm::X86TTIImpl::useReductionIntrinsic ( unsigned  Opcode,
Type Ty,
TTI::ReductionFlags  Flags 
) const
inline

Allow vectorizers to form reduction intrinsics in IR.

The IR is expanded into shuffles and vector math/logic by the backend (see TTI::shouldExpandReduction)

Definition at line 222 of file X86TargetTransformInfo.h.


The documentation for this class was generated from the following files: