LLVM  10.0.0svn
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 isSourceOfDivergence (const Value *V)
 
bool isAlwaysUniform (const Value *V)
 
unsigned getFlatAddressSpace ()
 
bool collectFlatAddressOperands (SmallVectorImpl< int > &OpIndexes, Intrinsic::ID IID) const
 
bool rewriteIntrinsicWithAddressSpace (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)
 
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)
 
int getExtCost (const Instruction *I, const Value *Src)
 
unsigned getIntrinsicCost (Intrinsic::ID IID, Type *RetTy, ArrayRef< const Value * > Arguments, const User *U)
 
unsigned getIntrinsicCost (Intrinsic::ID IID, Type *RetTy, ArrayRef< Type * > ParamTys, const User *U)
 
unsigned getEstimatedNumberOfCaseClusters (const SwitchInst &SI, unsigned &JumpTableSize)
 
bool shouldBuildLookupTables ()
 
bool haveFastSqrt (Type *Ty)
 
bool isFCmpOrdCheaperThanFCmpZero (Type *Ty)
 
unsigned getFPOpCost (Type *Ty)
 
unsigned getOperationCost (unsigned Opcode, Type *Ty, Type *OpTy)
 
unsigned getInliningThresholdMultiplier ()
 
int getInlinerVectorBonusPercent ()
 
void getUnrollingPreferences (Loop *L, ScalarEvolution &SE, TTI::UnrollingPreferences &UP)
 
bool isHardwareLoopProfitable (Loop *L, ScalarEvolution &SE, AssumptionCache &AC, TargetLibraryInfo *LibInfo, HardwareLoopInfo &HWLoopInfo)
 
int getInstructionLatency (const Instruction *I)
 
unsigned getNumberOfRegisters (bool Vector)
 
unsigned getRegisterBitWidth (bool Vector) const
 
unsigned getScalarizationOverhead (Type *Ty, bool Insert, bool Extract)
 Estimate the overhead of scalarizing an instruction. More...
 
unsigned getScalarizationOverhead (Type *VecTy, 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::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 * >())
 
unsigned getShuffleCost (TTI::ShuffleKind Kind, Type *Tp, int Index, Type *SubTp)
 
unsigned getCastInstrCost (unsigned Opcode, Type *Dst, Type *Src, const Instruction *I=nullptr)
 
unsigned getExtractWithExtendCost (unsigned Opcode, Type *Dst, VectorType *VecTy, unsigned Index)
 
unsigned getCFInstrCost (unsigned Opcode)
 
unsigned getCmpSelInstrCost (unsigned Opcode, Type *ValTy, Type *CondTy, const Instruction *I)
 
unsigned getVectorInstrCost (unsigned Opcode, Type *Val, unsigned Index)
 
unsigned getMemoryOpCost (unsigned Opcode, Type *Src, unsigned Alignment, unsigned AddressSpace, const Instruction *I=nullptr)
 
unsigned getInterleavedMemoryOpCost (unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, unsigned Alignment, unsigned AddressSpace, bool UseMaskForCond=false, bool UseMaskForGaps=false)
 
unsigned getIntrinsicInstrCost (Intrinsic::ID IID, Type *RetTy, ArrayRef< Value * > Args, FastMathFlags FMF, unsigned VF=1)
 Get intrinsic cost based on arguments. More...
 
unsigned getIntrinsicInstrCost (Intrinsic::ID IID, Type *RetTy, ArrayRef< Type * > Tys, FastMathFlags FMF, unsigned ScalarizationCostPassed=std::numeric_limits< unsigned >::max())
 Get intrinsic cost based on argument types. More...
 
unsigned getCallInstrCost (Function *F, Type *RetTy, ArrayRef< Type * > Tys)
 Compute a cost of the given call instruction. More...
 
unsigned getNumberOfParts (Type *Tp)
 
unsigned getAddressComputationCost (Type *Ty, ScalarEvolution *, const SCEV *)
 
unsigned getArithmeticReductionCost (unsigned Opcode, Type *Ty, bool IsPairwise)
 Try to calculate arithmetic and shuffle op costs for reduction operations. More...
 
unsigned getMinMaxReductionCost (Type *Ty, Type *CondTy, bool IsPairwise, bool)
 Try to calculate op costs for min/max reduction operations. More...
 
unsigned getVectorSplitCost ()
 
- Public Member Functions inherited from llvm::TargetTransformInfoImplCRTPBase< X86TTIImpl >
unsigned getCallCost (const Function *F, int NumArgs, const User *U)
 
unsigned getCallCost (const Function *F, ArrayRef< const Value * > Arguments, const User *U)
 
int getGEPCost (Type *PointeeType, const Value *Ptr, ArrayRef< const Value * > Operands)
 
unsigned getIntrinsicCost (Intrinsic::ID IID, Type *RetTy, ArrayRef< Type * > ParamTys, const User *U)
 
unsigned getIntrinsicCost (Intrinsic::ID IID, Type *RetTy, ArrayRef< const Value * > Arguments, const User *U)
 
unsigned getUserCost (const User *U, ArrayRef< const Value * > Operands)
 
int getInstructionLatency (const Instruction *I)
 
- Public Member Functions inherited from llvm::TargetTransformInfoImplBase
 TargetTransformInfoImplBase (const TargetTransformInfoImplBase &Arg)
 
 TargetTransformInfoImplBase (TargetTransformInfoImplBase &&Arg)
 
const DataLayoutgetDataLayout () const
 
unsigned getOperationCost (unsigned Opcode, Type *Ty, Type *OpTy)
 
int getGEPCost (Type *PointeeType, const Value *Ptr, ArrayRef< const Value *> Operands)
 
unsigned getEstimatedNumberOfCaseClusters (const SwitchInst &SI, unsigned &JTSize)
 
int getExtCost (const Instruction *I, const Value *Src)
 
unsigned getCallCost (FunctionType *FTy, int NumArgs, const User *U)
 
unsigned getInliningThresholdMultiplier ()
 
int getInlinerVectorBonusPercent ()
 
unsigned getMemcpyCost (const Instruction *I)
 
bool hasBranchDivergence ()
 
bool isSourceOfDivergence (const Value *V)
 
bool isAlwaysUniform (const Value *V)
 
unsigned getFlatAddressSpace ()
 
bool collectFlatAddressOperands (SmallVectorImpl< int > &OpIndexes, Intrinsic::ID IID) const
 
bool rewriteIntrinsicWithAddressSpace (IntrinsicInst *II, Value *OldV, Value *NewV) const
 
bool isLoweredToCall (const Function *F)
 
bool isHardwareLoopProfitable (Loop *L, ScalarEvolution &SE, AssumptionCache &AC, TargetLibraryInfo *LibInfo, HardwareLoopInfo &HWLoopInfo)
 
void getUnrollingPreferences (Loop *, ScalarEvolution &, TTI::UnrollingPreferences &)
 
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 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)
 
bool isLegalMaskedLoad (Type *DataType)
 
bool isLegalNTStore (Type *DataType, llvm::Align Alignment)
 
bool isLegalNTLoad (Type *DataType, llvm::Align Alignment)
 
bool isLegalMaskedScatter (Type *DataType)
 
bool isLegalMaskedGather (Type *DataType)
 
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 (Type *Ty, 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)
 
unsigned getIntImmCost (unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty)
 
unsigned getIntImmCost (Intrinsic::ID IID, unsigned Idx, const APInt &Imm, Type *Ty)
 
unsigned getNumberOfRegisters (bool Vector)
 
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 ()
 
llvm::Optional< unsignedgetCacheSize (TargetTransformInfo::CacheLevel Level)
 
llvm::Optional< unsignedgetCacheAssociativity (TargetTransformInfo::CacheLevel Level)
 
unsigned getPrefetchDistance ()
 
unsigned getMinPrefetchStride ()
 
unsigned getMaxPrefetchIterationsAhead ()
 
unsigned getMaxInterleaveFactor (unsigned VF)
 
unsigned getArithmeticInstrCost (unsigned Opcode, Type *Ty, TTI::OperandValueKind Opd1Info, TTI::OperandValueKind Opd2Info, TTI::OperandValueProperties Opd1PropInfo, TTI::OperandValueProperties Opd2PropInfo, ArrayRef< const Value *> Args)
 
unsigned getShuffleCost (TTI::ShuffleKind Kind, Type *Ty, int Index, Type *SubTp)
 
unsigned getCastInstrCost (unsigned Opcode, Type *Dst, Type *Src, const Instruction *I)
 
unsigned getExtractWithExtendCost (unsigned Opcode, Type *Dst, VectorType *VecTy, unsigned Index)
 
unsigned getCFInstrCost (unsigned Opcode)
 
unsigned getCmpSelInstrCost (unsigned Opcode, Type *ValTy, Type *CondTy, const Instruction *I)
 
unsigned getVectorInstrCost (unsigned Opcode, Type *Val, unsigned Index)
 
unsigned getMemoryOpCost (unsigned Opcode, Type *Src, unsigned Alignment, unsigned AddressSpace, const Instruction *I)
 
unsigned getMaskedMemoryOpCost (unsigned Opcode, Type *Src, unsigned Alignment, unsigned AddressSpace)
 
unsigned getGatherScatterOpCost (unsigned Opcode, Type *DataTy, Value *Ptr, bool VariableMask, unsigned Alignment)
 
unsigned getInterleavedMemoryOpCost (unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, unsigned Alignment, unsigned AddressSpace, bool UseMaskForCond=false, bool UseMaskForGaps=false)
 
unsigned getIntrinsicInstrCost (Intrinsic::ID ID, Type *RetTy, ArrayRef< Type *> Tys, FastMathFlags FMF, unsigned ScalarizationCostPassed)
 
unsigned getIntrinsicInstrCost (Intrinsic::ID ID, Type *RetTy, ArrayRef< Value *> Args, FastMathFlags FMF, unsigned VF)
 
unsigned getCallInstrCost (Function *F, Type *RetTy, ArrayRef< Type *> Tys)
 
unsigned getNumberOfParts (Type *Tp)
 
unsigned getAddressComputationCost (Type *Tp, ScalarEvolution *, const SCEV *)
 
unsigned getArithmeticReductionCost (unsigned, Type *, bool)
 
unsigned getMinMaxReductionCost (Type *, Type *, bool, bool)
 
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 SrcAlign, unsigned DestAlign) const
 
void getMemcpyLoopResidualLoweringType (SmallVectorImpl< Type *> &OpsOut, LLVMContext &Context, unsigned RemainingBytes, 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, unsigned Alignment, unsigned AddrSpace) const
 
bool isLegalToVectorizeStoreChain (unsigned ChainSizeInBytes, unsigned 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
 

Vector TTI Implementations

unsigned getNumberOfRegisters (bool Vector)
 
unsigned getRegisterBitWidth (bool Vector) const
 
unsigned getLoadStoreVecRegBitWidth (unsigned AS) const
 
unsigned getMaxInterleaveFactor (unsigned VF)
 
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 getShuffleCost (TTI::ShuffleKind Kind, Type *Tp, int Index, Type *SubTp)
 
int getCastInstrCost (unsigned Opcode, Type *Dst, Type *Src, const Instruction *I=nullptr)
 
int getCmpSelInstrCost (unsigned Opcode, Type *ValTy, Type *CondTy, const Instruction *I=nullptr)
 
int getVectorInstrCost (unsigned Opcode, Type *Val, unsigned Index)
 
int getMemoryOpCost (unsigned Opcode, Type *Src, unsigned Alignment, unsigned AddressSpace, const Instruction *I=nullptr)
 
int getMaskedMemoryOpCost (unsigned Opcode, Type *Src, unsigned Alignment, unsigned AddressSpace)
 
int getGatherScatterOpCost (unsigned Opcode, Type *DataTy, Value *Ptr, bool VariableMask, unsigned Alignment)
 Calculate the cost of Gather / Scatter operation. More...
 
int getAddressComputationCost (Type *PtrTy, ScalarEvolution *SE, const SCEV *Ptr)
 
unsigned getAtomicMemIntrinsicMaxElementSize () const
 
int getIntrinsicInstrCost (Intrinsic::ID IID, Type *RetTy, ArrayRef< Type *> Tys, FastMathFlags FMF, unsigned ScalarizationCostPassed=UINT_MAX)
 
int getIntrinsicInstrCost (Intrinsic::ID IID, Type *RetTy, ArrayRef< Value *> Args, FastMathFlags FMF, unsigned VF=1)
 
int getArithmeticReductionCost (unsigned Opcode, Type *Ty, bool IsPairwiseForm)
 
int getMinMaxReductionCost (Type *Ty, Type *CondTy, bool IsPairwiseForm, bool IsUnsigned)
 
int getInterleavedMemoryOpCost (unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, unsigned Alignment, unsigned AddressSpace, bool UseMaskForCond=false, bool UseMaskForGaps=false)
 
int getInterleavedMemoryOpCostAVX512 (unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, unsigned Alignment, unsigned AddressSpace, bool UseMaskForCond=false, bool UseMaskForGaps=false)
 
int getInterleavedMemoryOpCostAVX2 (unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, unsigned Alignment, unsigned AddressSpace, 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)
 
unsigned getUserCost (const User *U, ArrayRef< const Value *> Operands)
 
int getIntImmCost (unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty)
 
int getIntImmCost (Intrinsic::ID IID, unsigned Idx, const APInt &Imm, Type *Ty)
 
bool isLSRCostLess (TargetTransformInfo::LSRCost &C1, TargetTransformInfo::LSRCost &C2)
 
bool canMacroFuseCmp ()
 
bool isLegalMaskedLoad (Type *DataType)
 
bool isLegalMaskedStore (Type *DataType)
 
bool isLegalNTLoad (Type *DataType, llvm::Align Alignment)
 
bool isLegalNTStore (Type *DataType, llvm::Align Alignment)
 
bool isLegalMaskedGather (Type *DataType)
 
bool isLegalMaskedScatter (Type *DataType)
 
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 ()
 

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)
 
- 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 27 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 3452 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::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 *>() 
)

Definition at line 173 of file X86TargetTransformInfo.cpp.

References llvm::MCID::Add, llvm::ISD::ADD, llvm::AMDGPU::HSAMD::Kernel::Key::Args, assert(), llvm::CostTableLookup(), llvm::TargetTransformInfoImplBase::DL, llvm::MVT::f32, llvm::MVT::f64, llvm::ISD::FADD, llvm::ISD::FDIV, llvm::ISD::FMUL, llvm::ISD::FSUB, llvm::BasicTTIImplBase< X86TTIImpl >::getArithmeticInstrCost(), llvm::TargetLoweringBase::getTypeLegalizationCost(), llvm::X86Subtarget::hasAVX(), llvm::X86Subtarget::hasAVX2(), llvm::X86Subtarget::hasAVX512(), llvm::X86Subtarget::hasBWI(), llvm::X86Subtarget::hasDQI(), llvm::X86Subtarget::hasSSE1(), llvm::X86Subtarget::hasSSE2(), llvm::X86Subtarget::hasSSE41(), llvm::X86Subtarget::hasSSE42(), llvm::X86Subtarget::hasXOP(), llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i8, if(), llvm::TargetLoweringBase::InstructionOpcodeToISD(), llvm::X86Subtarget::isGLM(), llvm::X86Subtarget::isSLM(), llvm::AArch64CC::LT, llvm::max(), llvm::TargetTransformInfoImplBase::minRequiredElementSize(), llvm::ISD::MUL, llvm::TargetTransformInfo::OK_NonUniformConstantValue, llvm::TargetTransformInfo::OK_UniformConstantValue, llvm::TargetTransformInfo::OK_UniformValue, llvm::TargetTransformInfo::OP_None, llvm::TargetTransformInfo::OP_PowerOf2, llvm::ISD::SDIV, llvm::ISD::SHL, llvm::ISD::SRA, llvm::ISD::SREM, llvm::ISD::SRL, llvm::ISD::SUB, llvm::ISD::UDIV, llvm::ISD::UREM, llvm::MVT::v16f32, llvm::MVT::v16i16, llvm::MVT::v16i32, llvm::MVT::v16i8, llvm::MVT::v2f64, llvm::MVT::v2i64, llvm::MVT::v32i16, llvm::MVT::v32i8, llvm::MVT::v4f32, llvm::MVT::v4f64, llvm::MVT::v4i32, llvm::MVT::v4i64, llvm::MVT::v64i8, llvm::MVT::v8f32, llvm::MVT::v8f64, llvm::MVT::v8i16, llvm::MVT::v8i32, and llvm::MVT::v8i64.

Referenced by X86TTIImpl().

◆ getArithmeticReductionCost()

int X86TTIImpl::getArithmeticReductionCost ( unsigned  Opcode,
Type Ty,
bool  IsPairwiseForm 
)

◆ getAtomicMemIntrinsicMaxElementSize()

unsigned X86TTIImpl::getAtomicMemIntrinsicMaxElementSize ( ) const

Definition at line 1911 of file X86TargetTransformInfo.cpp.

Referenced by X86TTIImpl().

◆ getCacheAssociativity()

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

◆ getCacheSize()

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

◆ getCastInstrCost()

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

Definition at line 1274 of file X86TargetTransformInfo.cpp.

References assert(), llvm::ConvertCostTableLookup(), llvm::TargetTransformInfoImplBase::DL, ExperimentalVectorWideningLegalization, llvm::MVT::f32, llvm::MVT::f64, llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, llvm::BasicTTIImplBase< X86TTIImpl >::getCastInstrCost(), llvm::EVT::getSimpleVT(), llvm::TargetLoweringBase::getTypeAction(), llvm::TargetLoweringBase::getTypeLegalizationCost(), llvm::TargetLoweringBase::getValueType(), llvm::X86Subtarget::hasAVX(), llvm::X86Subtarget::hasAVX2(), llvm::X86Subtarget::hasAVX512(), llvm::X86Subtarget::hasBWI(), llvm::X86Subtarget::hasDQI(), llvm::X86Subtarget::hasSSE2(), llvm::X86Subtarget::hasSSE41(), llvm::MVT::i64, if(), llvm::TargetLoweringBase::InstructionOpcodeToISD(), llvm::EVT::isSimple(), llvm::ISD::SIGN_EXTEND, llvm::ISD::SINT_TO_FP, llvm::ISD::TRUNCATE, llvm::TargetLoweringBase::TypeSplitVector, llvm::ISD::UINT_TO_FP, llvm::MVT::v16f32, llvm::MVT::v16i1, llvm::MVT::v16i16, llvm::MVT::v16i32, llvm::MVT::v16i8, llvm::MVT::v2f32, llvm::MVT::v2f64, llvm::MVT::v2i16, llvm::MVT::v2i32, llvm::MVT::v2i64, llvm::MVT::v2i8, llvm::MVT::v32i1, llvm::MVT::v32i16, llvm::MVT::v32i8, llvm::MVT::v4f32, llvm::MVT::v4f64, llvm::MVT::v4i1, llvm::MVT::v4i16, llvm::MVT::v4i32, llvm::MVT::v4i64, llvm::MVT::v4i8, llvm::MVT::v64i1, llvm::MVT::v64i8, llvm::MVT::v8f32, llvm::MVT::v8f64, llvm::MVT::v8i1, llvm::MVT::v8i16, llvm::MVT::v8i32, llvm::MVT::v8i64, llvm::MVT::v8i8, and llvm::ISD::ZERO_EXTEND.

Referenced by X86TTIImpl().

◆ getCmpSelInstrCost()

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

◆ getGatherScatterOpCost()

int X86TTIImpl::getGatherScatterOpCost ( unsigned  Opcode,
Type DataTy,
Value Ptr,
bool  VariableMask,
unsigned  Alignment 
)

◆ getInterleavedMemoryOpCost()

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

◆ getInterleavedMemoryOpCostAVX2()

int X86TTIImpl::getInterleavedMemoryOpCostAVX2 ( unsigned  Opcode,
Type VecTy,
unsigned  Factor,
ArrayRef< unsigned Indices,
unsigned  Alignment,
unsigned  AddressSpace,
bool  UseMaskForCond = false,
bool  UseMaskForGaps = false 
)

◆ getInterleavedMemoryOpCostAVX512()

int X86TTIImpl::getInterleavedMemoryOpCostAVX512 ( unsigned  Opcode,
Type VecTy,
unsigned  Factor,
ArrayRef< unsigned Indices,
unsigned  Alignment,
unsigned  AddressSpace,
bool  UseMaskForCond = false,
bool  UseMaskForGaps = false 
)

◆ getIntImmCost() [1/4]

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 2905 of file X86TargetTransformInfo.cpp.

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

Referenced by getIntImmCost(), and X86TTIImpl().

◆ getIntImmCost() [2/4]

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

◆ getIntImmCost() [3/4]

int X86TTIImpl::getIntImmCost ( unsigned  Opcode,
unsigned  Idx,
const APInt Imm,
Type Ty 
)

◆ getIntImmCost() [4/4]

int X86TTIImpl::getIntImmCost ( Intrinsic::ID  IID,
unsigned  Idx,
const APInt Imm,
Type Ty 
)

◆ getIntrinsicInstrCost() [1/2]

int X86TTIImpl::getIntrinsicInstrCost ( Intrinsic::ID  IID,
Type RetTy,
ArrayRef< Type *>  Tys,
FastMathFlags  FMF,
unsigned  ScalarizationCostPassed = UINT_MAX 
)

◆ getIntrinsicInstrCost() [2/2]

int X86TTIImpl::getIntrinsicInstrCost ( Intrinsic::ID  IID,
Type RetTy,
ArrayRef< Value *>  Args,
FastMathFlags  FMF,
unsigned  VF = 1 
)

◆ getLoadStoreVecRegBitWidth()

unsigned X86TTIImpl::getLoadStoreVecRegBitWidth ( unsigned  AS) const

Definition at line 151 of file X86TargetTransformInfo.cpp.

References getRegisterBitWidth().

Referenced by X86TTIImpl().

◆ getMaskedMemoryOpCost()

int X86TTIImpl::getMaskedMemoryOpCost ( unsigned  Opcode,
Type Src,
unsigned  Alignment,
unsigned  AddressSpace 
)

◆ getMaxInterleaveFactor()

unsigned X86TTIImpl::getMaxInterleaveFactor ( unsigned  VF)

Definition at line 155 of file X86TargetTransformInfo.cpp.

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

Referenced by X86TTIImpl().

◆ getMemoryOpCost()

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

◆ getMinMaxReductionCost()

int X86TTIImpl::getMinMaxReductionCost ( Type Ty,
Type CondTy,
bool  IsPairwiseForm,
bool  IsUnsigned 
)

◆ getNumberOfRegisters()

unsigned X86TTIImpl::getNumberOfRegisters ( bool  Vector)

◆ getPopcntSupport()

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

◆ getRegisterBitWidth()

unsigned X86TTIImpl::getRegisterBitWidth ( bool  Vector) const

◆ getShuffleCost()

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

Definition at line 889 of file X86TargetTransformInfo.cpp.

References llvm::alignDown(), assert(), llvm::CostTableLookup(), llvm::TargetTransformInfoImplBase::DL, llvm::VectorType::get(), llvm::Type::getPrimitiveSizeInBits(), llvm::BasicTTIImplBase< X86TTIImpl >::getShuffleCost(), llvm::MVT::getSizeInBits(), llvm::MVT::getStoreSize(), llvm::TargetLoweringBase::getTypeLegalizationCost(), llvm::DataLayout::getTypeStoreSize(), llvm::Type::getVectorElementType(), llvm::MVT::getVectorElementType(), llvm::Type::getVectorNumElements(), llvm::MVT::getVectorNumElements(), llvm::X86Subtarget::hasAVX(), llvm::X86Subtarget::hasAVX2(), llvm::X86Subtarget::hasAVX512(), llvm::X86Subtarget::hasBWI(), llvm::X86Subtarget::hasSSE1(), llvm::X86Subtarget::hasSSE2(), llvm::X86Subtarget::hasSSE41(), llvm::X86Subtarget::hasSSSE3(), llvm::X86Subtarget::hasVBMI(), llvm::X86Subtarget::hasXOP(), llvm::MVT::isVector(), llvm::AArch64CC::LT, llvm::TargetTransformInfo::SK_Broadcast, llvm::TargetTransformInfo::SK_ExtractSubvector, llvm::TargetTransformInfo::SK_PermuteSingleSrc, llvm::TargetTransformInfo::SK_PermuteTwoSrc, llvm::TargetTransformInfo::SK_Reverse, llvm::TargetTransformInfo::SK_Select, llvm::TargetTransformInfo::SK_Transpose, llvm::MVT::v16f32, llvm::MVT::v16i16, llvm::MVT::v16i32, llvm::MVT::v16i8, llvm::MVT::v2f64, llvm::MVT::v2i64, llvm::MVT::v32i16, llvm::MVT::v32i8, llvm::MVT::v4f32, llvm::MVT::v4f64, llvm::MVT::v4i32, llvm::MVT::v4i64, llvm::MVT::v64i8, llvm::MVT::v8f32, llvm::MVT::v8f64, llvm::MVT::v8i16, llvm::MVT::v8i32, and llvm::MVT::v8i64.

Referenced by getInterleavedMemoryOpCostAVX512(), getMaskedMemoryOpCost(), and X86TTIImpl().

◆ getUserCost()

unsigned X86TTIImpl::getUserCost ( const User U,
ArrayRef< const Value *>  Operands 
)

◆ 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 3391 of file X86TargetTransformInfo.cpp.

Referenced by X86TTIImpl().

◆ isLegalMaskedCompressStore()

bool X86TTIImpl::isLegalMaskedCompressStore ( Type DataType)

Definition at line 3337 of file X86TargetTransformInfo.cpp.

References isLegalMaskedExpandLoad().

Referenced by X86TTIImpl().

◆ isLegalMaskedExpandLoad()

bool X86TTIImpl::isLegalMaskedExpandLoad ( Type DataType)

◆ isLegalMaskedGather()

bool X86TTIImpl::isLegalMaskedGather ( Type DataType)

◆ isLegalMaskedLoad()

bool X86TTIImpl::isLegalMaskedLoad ( Type DataType)

◆ isLegalMaskedScatter()

bool X86TTIImpl::isLegalMaskedScatter ( Type DataType)

◆ isLegalMaskedStore()

bool X86TTIImpl::isLegalMaskedStore ( Type DataType)

Definition at line 3274 of file X86TargetTransformInfo.cpp.

References isLegalMaskedLoad().

Referenced by getMaskedMemoryOpCost(), and X86TTIImpl().

◆ isLegalNTLoad()

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

◆ isLegalNTStore()

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

◆ isLSRCostLess()

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

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