LLVM  14.0.0git
Protected Member Functions | Protected Attributes | List of all members
llvm::BasicTTIImplBase< T > Class Template Reference

Base class which can be used to help build a TTI implementation. More...

#include "llvm/CodeGen/BasicTTIImpl.h"

Inheritance diagram for llvm::BasicTTIImplBase< T >:
Inheritance graph
[legend]
Collaboration diagram for llvm::BasicTTIImplBase< T >:
Collaboration graph
[legend]

Public Member Functions

Scalar TTI Implementations
bool allowsMisalignedMemoryAccesses (LLVMContext &Context, unsigned BitWidth, unsigned AddressSpace, Align 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
 
unsigned getAssumedAddrSpace (const Value *V) 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 isNumRegsMajorCostOfLSR ()
 
bool isProfitableLSRChainElement (Instruction *I)
 
InstructionCost 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)
 
InstructionCost getRegUsageForType (Type *Ty)
 
InstructionCost getGEPCost (Type *PointeeType, const Value *Ptr, ArrayRef< const Value * > Operands)
 
unsigned getEstimatedNumberOfCaseClusters (const SwitchInst &SI, unsigned &JumpTableSize, ProfileSummaryInfo *PSI, BlockFrequencyInfo *BFI)
 
bool shouldBuildLookupTables ()
 
bool shouldBuildRelLookupTables () const
 
bool haveFastSqrt (Type *Ty)
 
bool isFCmpOrdCheaperThanFCmpZero (Type *Ty)
 
InstructionCost getFPOpCost (Type *Ty)
 
unsigned getInliningThresholdMultiplier ()
 
unsigned adjustInliningThreshold (const CallBase *CB)
 
int getInlinerVectorBonusPercent ()
 
void getUnrollingPreferences (Loop *L, ScalarEvolution &SE, TTI::UnrollingPreferences &UP, OptimizationRemarkEmitter *ORE)
 
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 ()
 
Optional< Instruction * > instCombineIntrinsic (InstCombiner &IC, IntrinsicInst &II)
 
Optional< Value * > simplifyDemandedUseBitsIntrinsic (InstCombiner &IC, IntrinsicInst &II, APInt DemandedMask, KnownBits &Known, bool &KnownBitsComputed)
 
Optional< Value * > simplifyDemandedVectorEltsIntrinsic (InstCombiner &IC, IntrinsicInst &II, APInt DemandedElts, APInt &UndefElts, APInt &UndefElts2, APInt &UndefElts3, std::function< void(Instruction *, unsigned, APInt, APInt &)> SimplifyAndSetOp)
 
InstructionCost getInstructionLatency (const Instruction *I)
 
virtual Optional< unsigned > getCacheSize (TargetTransformInfo::CacheLevel Level) const
 
virtual Optional< unsigned > getCacheAssociativity (TargetTransformInfo::CacheLevel Level) const
 
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
 
Vector TTI Implementations
TypeSize getRegisterBitWidth (TargetTransformInfo::RegisterKind K) const
 
Optional< unsigned > getMaxVScale () const
 
InstructionCost getScalarizationOverhead (VectorType *InTy, const APInt &DemandedElts, bool Insert, bool Extract)
 Estimate the overhead of scalarizing an instruction. More...
 
InstructionCost getScalarizationOverhead (VectorType *InTy, bool Insert, bool Extract)
 Helper wrapper for the DemandedElts variant of getScalarizationOverhead. More...
 
InstructionCost getOperandsScalarizationOverhead (ArrayRef< const Value * > Args, ArrayRef< Type * > Tys)
 Estimate the overhead of scalarizing an instructions unique non-constant operands. More...
 
InstructionCost getScalarizationOverhead (VectorType *RetTy, ArrayRef< const Value * > Args, ArrayRef< Type * > Tys)
 Estimate the overhead of scalarizing the inputs and outputs of an instruction, with return type RetTy and arguments Args of type Tys. More...
 
unsigned getMaxInterleaveFactor (unsigned VF)
 
InstructionCost 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)
 
TTI::ShuffleKind improveShuffleKindFromMask (TTI::ShuffleKind Kind, ArrayRef< int > Mask) const
 
InstructionCost getShuffleCost (TTI::ShuffleKind Kind, VectorType *Tp, ArrayRef< int > Mask, int Index, VectorType *SubTp)
 
InstructionCost getCastInstrCost (unsigned Opcode, Type *Dst, Type *Src, TTI::CastContextHint CCH, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
 
InstructionCost getExtractWithExtendCost (unsigned Opcode, Type *Dst, VectorType *VecTy, unsigned Index)
 
InstructionCost getCFInstrCost (unsigned Opcode, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
 
InstructionCost getCmpSelInstrCost (unsigned Opcode, Type *ValTy, Type *CondTy, CmpInst::Predicate VecPred, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
 
InstructionCost getVectorInstrCost (unsigned Opcode, Type *Val, unsigned Index)
 
InstructionCost getMemoryOpCost (unsigned Opcode, Type *Src, MaybeAlign Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
 
InstructionCost getMaskedMemoryOpCost (unsigned Opcode, Type *DataTy, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind)
 
InstructionCost getGatherScatterOpCost (unsigned Opcode, Type *DataTy, const Value *Ptr, bool VariableMask, Align Alignment, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
 
InstructionCost getInterleavedMemoryOpCost (unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, bool UseMaskForCond=false, bool UseMaskForGaps=false)
 
InstructionCost getIntrinsicInstrCost (const IntrinsicCostAttributes &ICA, TTI::TargetCostKind CostKind)
 Get intrinsic cost based on arguments. More...
 
InstructionCost getTypeBasedIntrinsicInstrCost (const IntrinsicCostAttributes &ICA, TTI::TargetCostKind CostKind)
 Get intrinsic cost based on argument types. More...
 
InstructionCost 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)
 
InstructionCost getAddressComputationCost (Type *Ty, ScalarEvolution *, const SCEV *)
 
InstructionCost getTreeReductionCost (unsigned Opcode, VectorType *Ty, TTI::TargetCostKind CostKind)
 Try to calculate arithmetic and shuffle op costs for reduction intrinsics. More...
 
InstructionCost getOrderedReductionCost (unsigned Opcode, VectorType *Ty, TTI::TargetCostKind CostKind)
 Try to calculate the cost of performing strict (in-order) reductions, which involves doing a sequence of floating point additions in lane order, starting with an initial value. More...
 
InstructionCost getArithmeticReductionCost (unsigned Opcode, VectorType *Ty, Optional< FastMathFlags > FMF, TTI::TargetCostKind CostKind)
 
InstructionCost getMinMaxReductionCost (VectorType *Ty, VectorType *CondTy, bool IsUnsigned, TTI::TargetCostKind CostKind)
 Try to calculate op costs for min/max reduction operations. More...
 
InstructionCost getExtendedAddReductionCost (bool IsMLA, bool IsUnsigned, Type *ResTy, VectorType *Ty, TTI::TargetCostKind CostKind)
 
InstructionCost getVectorSplitCost ()
 
- Public Member Functions inherited from llvm::TargetTransformInfoImplCRTPBase< T >
InstructionCost getGEPCost (Type *PointeeType, const Value *Ptr, ArrayRef< const Value * > Operands, TTI::TargetCostKind CostKind=TTI::TCK_SizeAndLatency)
 
InstructionCost getUserCost (const User *U, ArrayRef< const Value * > Operands, TTI::TargetCostKind CostKind)
 
InstructionCost getInstructionLatency (const Instruction *I)
 
InstructionCost getGEPCost (Type *PointeeType, const Value *Ptr, ArrayRef< const Value * > Operands, TTI::TargetCostKind CostKind=TTI::TCK_SizeAndLatency) const
 
- Public Member Functions inherited from llvm::TargetTransformInfoImplBase
 TargetTransformInfoImplBase (const TargetTransformInfoImplBase &Arg)
 
 TargetTransformInfoImplBase (TargetTransformInfoImplBase &&Arg)
 
const DataLayoutgetDataLayout () const
 
InstructionCost getGEPCost (Type *PointeeType, const Value *Ptr, ArrayRef< const Value * > Operands, TTI::TargetCostKind CostKind=TTI::TCK_SizeAndLatency) const
 
unsigned getEstimatedNumberOfCaseClusters (const SwitchInst &SI, unsigned &JTSize, ProfileSummaryInfo *PSI, BlockFrequencyInfo *BFI) const
 
unsigned getInliningThresholdMultiplier () const
 
unsigned adjustInliningThreshold (const CallBase *CB) const
 
int getInlinerVectorBonusPercent () const
 
InstructionCost getMemcpyCost (const Instruction *I) const
 
BranchProbability getPredictableBranchThreshold () const
 
bool hasBranchDivergence () const
 
bool useGPUDivergenceAnalysis () const
 
bool isSourceOfDivergence (const Value *V) const
 
bool isAlwaysUniform (const Value *V) const
 
unsigned getFlatAddressSpace () const
 
bool collectFlatAddressOperands (SmallVectorImpl< int > &OpIndexes, Intrinsic::ID IID) const
 
bool isNoopAddrSpaceCast (unsigned, unsigned) const
 
bool canHaveNonUndefGlobalInitializerInAddressSpace (unsigned AS) const
 
unsigned getAssumedAddrSpace (const Value *V) const
 
ValuerewriteIntrinsicWithAddressSpace (IntrinsicInst *II, Value *OldV, Value *NewV) const
 
bool isLoweredToCall (const Function *F) const
 
bool isHardwareLoopProfitable (Loop *L, ScalarEvolution &SE, AssumptionCache &AC, TargetLibraryInfo *LibInfo, HardwareLoopInfo &HWLoopInfo) const
 
bool preferPredicateOverEpilogue (Loop *L, LoopInfo *LI, ScalarEvolution &SE, AssumptionCache &AC, TargetLibraryInfo *TLI, DominatorTree *DT, const LoopAccessInfo *LAI) const
 
bool emitGetActiveLaneMask () const
 
Optional< Instruction * > instCombineIntrinsic (InstCombiner &IC, IntrinsicInst &II) const
 
Optional< Value * > simplifyDemandedUseBitsIntrinsic (InstCombiner &IC, IntrinsicInst &II, APInt DemandedMask, KnownBits &Known, bool &KnownBitsComputed) const
 
Optional< Value * > simplifyDemandedVectorEltsIntrinsic (InstCombiner &IC, IntrinsicInst &II, APInt DemandedElts, APInt &UndefElts, APInt &UndefElts2, APInt &UndefElts3, std::function< void(Instruction *, unsigned, APInt, APInt &)> SimplifyAndSetOp) const
 
void getUnrollingPreferences (Loop *, ScalarEvolution &, TTI::UnrollingPreferences &, OptimizationRemarkEmitter *) const
 
void getPeelingPreferences (Loop *, ScalarEvolution &, TTI::PeelingPreferences &) const
 
bool isLegalAddImmediate (int64_t Imm) const
 
bool isLegalICmpImmediate (int64_t Imm) const
 
bool isLegalAddressingMode (Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace, Instruction *I=nullptr) const
 
bool isLSRCostLess (TTI::LSRCost &C1, TTI::LSRCost &C2) const
 
bool isNumRegsMajorCostOfLSR () const
 
bool isProfitableLSRChainElement (Instruction *I) const
 
bool canMacroFuseCmp () const
 
bool canSaveCmp (Loop *L, BranchInst **BI, ScalarEvolution *SE, LoopInfo *LI, DominatorTree *DT, AssumptionCache *AC, TargetLibraryInfo *LibInfo) const
 
TTI::AddressingModeKind getPreferredAddressingMode (const Loop *L, ScalarEvolution *SE) const
 
bool isLegalMaskedStore (Type *DataType, Align Alignment) const
 
bool isLegalMaskedLoad (Type *DataType, Align Alignment) const
 
bool isLegalNTStore (Type *DataType, Align Alignment) const
 
bool isLegalNTLoad (Type *DataType, Align Alignment) const
 
bool isLegalMaskedScatter (Type *DataType, Align Alignment) const
 
bool isLegalMaskedGather (Type *DataType, Align Alignment) const
 
bool isLegalMaskedCompressStore (Type *DataType) const
 
bool isLegalMaskedExpandLoad (Type *DataType) const
 
bool enableOrderedReductions () const
 
bool hasDivRemOp (Type *DataType, bool IsSigned) const
 
bool hasVolatileVariant (Instruction *I, unsigned AddrSpace) const
 
bool prefersVectorizedAddressing () const
 
InstructionCost getScalingFactorCost (Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace) const
 
bool LSRWithInstrQueries () const
 
bool isTruncateFree (Type *Ty1, Type *Ty2) const
 
bool isProfitableToHoist (Instruction *I) const
 
bool useAA () const
 
bool isTypeLegal (Type *Ty) const
 
InstructionCost getRegUsageForType (Type *Ty) const
 
bool shouldBuildLookupTables () const
 
bool shouldBuildLookupTablesForConstant (Constant *C) const
 
bool shouldBuildRelLookupTables () const
 
bool useColdCCForColdCall (Function &F) const
 
InstructionCost getScalarizationOverhead (VectorType *Ty, const APInt &DemandedElts, bool Insert, bool Extract) const
 
InstructionCost getOperandsScalarizationOverhead (ArrayRef< const Value * > Args, ArrayRef< Type * > Tys) const
 
bool supportsEfficientVectorElementLoadStore () const
 
bool enableAggressiveInterleaving (bool LoopHasReductions) const
 
TTI::MemCmpExpansionOptions enableMemCmpExpansion (bool OptSize, bool IsZeroCmp) const
 
bool enableInterleavedAccessVectorization () const
 
bool enableMaskedInterleavedAccessVectorization () const
 
bool isFPVectorizationPotentiallyUnsafe () const
 
bool allowsMisalignedMemoryAccesses (LLVMContext &Context, unsigned BitWidth, unsigned AddressSpace, Align Alignment, bool *Fast) const
 
TTI::PopcntSupportKind getPopcntSupport (unsigned IntTyWidthInBit) const
 
bool haveFastSqrt (Type *Ty) const
 
bool isFCmpOrdCheaperThanFCmpZero (Type *Ty) const
 
InstructionCost getFPOpCost (Type *Ty) const
 
InstructionCost getIntImmCodeSizeCost (unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty) const
 
InstructionCost getIntImmCost (const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind) const
 
InstructionCost getIntImmCostInst (unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind, Instruction *Inst=nullptr) const
 
InstructionCost getIntImmCostIntrin (Intrinsic::ID IID, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind) const
 
unsigned getNumberOfRegisters (unsigned ClassID) const
 
unsigned getRegisterClassForType (bool Vector, Type *Ty=nullptr) const
 
const char * getRegisterClassName (unsigned ClassID) const
 
TypeSize getRegisterBitWidth (TargetTransformInfo::RegisterKind K) const
 
unsigned getMinVectorRegisterBitWidth () const
 
Optional< unsigned > getMaxVScale () const
 
bool shouldMaximizeVectorBandwidth () const
 
ElementCount getMinimumVF (unsigned ElemWidth, bool IsScalable) const
 
unsigned getMaximumVF (unsigned ElemWidth, unsigned Opcode) const
 
bool shouldConsiderAddressTypePromotion (const Instruction &I, bool &AllowPromotionWithoutCommonHeader) const
 
unsigned getCacheLineSize () const
 
llvm::Optional< unsigned > getCacheSize (TargetTransformInfo::CacheLevel Level) const
 
llvm::Optional< unsigned > getCacheAssociativity (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) const
 
InstructionCost 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) const
 
InstructionCost getShuffleCost (TTI::ShuffleKind Kind, VectorType *Ty, ArrayRef< int > Mask, int Index, VectorType *SubTp) const
 
InstructionCost getCastInstrCost (unsigned Opcode, Type *Dst, Type *Src, TTI::CastContextHint CCH, TTI::TargetCostKind CostKind, const Instruction *I) const
 
InstructionCost getExtractWithExtendCost (unsigned Opcode, Type *Dst, VectorType *VecTy, unsigned Index) const
 
InstructionCost getCFInstrCost (unsigned Opcode, TTI::TargetCostKind CostKind, const Instruction *I=nullptr) const
 
InstructionCost getCmpSelInstrCost (unsigned Opcode, Type *ValTy, Type *CondTy, CmpInst::Predicate VecPred, TTI::TargetCostKind CostKind, const Instruction *I) const
 
InstructionCost getVectorInstrCost (unsigned Opcode, Type *Val, unsigned Index) const
 
InstructionCost getMemoryOpCost (unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, const Instruction *I) const
 
InstructionCost getMaskedMemoryOpCost (unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind) const
 
InstructionCost getGatherScatterOpCost (unsigned Opcode, Type *DataTy, const Value *Ptr, bool VariableMask, Align Alignment, TTI::TargetCostKind CostKind, const Instruction *I=nullptr) const
 
unsigned getInterleavedMemoryOpCost (unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, bool UseMaskForCond, bool UseMaskForGaps) const
 
InstructionCost getIntrinsicInstrCost (const IntrinsicCostAttributes &ICA, TTI::TargetCostKind CostKind) const
 
InstructionCost getCallInstrCost (Function *F, Type *RetTy, ArrayRef< Type * > Tys, TTI::TargetCostKind CostKind) const
 
unsigned getNumberOfParts (Type *Tp) const
 
InstructionCost getAddressComputationCost (Type *Tp, ScalarEvolution *, const SCEV *) const
 
InstructionCost getArithmeticReductionCost (unsigned, VectorType *, Optional< FastMathFlags > FMF, TTI::TargetCostKind) const
 
InstructionCost getMinMaxReductionCost (VectorType *, VectorType *, bool, TTI::TargetCostKind) const
 
InstructionCost getExtendedAddReductionCost (bool IsMLA, bool IsUnsigned, Type *ResTy, VectorType *Ty, TTI::TargetCostKind CostKind=TTI::TCK_RecipThroughput) const
 
InstructionCost getCostOfKeepingLiveOverCall (ArrayRef< Type * > Tys) const
 
bool getTgtMemIntrinsic (IntrinsicInst *Inst, MemIntrinsicInfo &Info) const
 
unsigned getAtomicMemIntrinsicMaxElementSize () const
 
ValuegetOrCreateResultFromMemIntrinsic (IntrinsicInst *Inst, Type *ExpectedType) const
 
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
 
bool isLegalToVectorizeReduction (const RecurrenceDescriptor &RdxDesc, ElementCount VF) const
 
bool isElementTypeLegalForScalableVector (Type *Ty) const
 
unsigned getLoadVectorFactor (unsigned VF, unsigned LoadSize, unsigned ChainSizeInBytes, VectorType *VecTy) const
 
unsigned getStoreVectorFactor (unsigned VF, unsigned StoreSize, unsigned ChainSizeInBytes, VectorType *VecTy) const
 
bool preferInLoopReduction (unsigned Opcode, Type *Ty, TTI::ReductionFlags Flags) const
 
bool preferPredicatedReductionSelect (unsigned Opcode, Type *Ty, TTI::ReductionFlags Flags) const
 
bool shouldExpandReduction (const IntrinsicInst *II) const
 
unsigned getGISelRematGlobalCost () const
 
bool supportsScalableVectors () const
 
bool hasActiveVectorLength () const
 
TargetTransformInfo::VPLegalization getVPLegalizationStrategy (const VPIntrinsic &PI) const
 

Protected Member Functions

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

Protected Attributes

const DataLayoutDL
 
- Protected Attributes inherited from llvm::TargetTransformInfoImplBase
const DataLayoutDL
 

Additional Inherited Members

- Protected Types inherited from llvm::TargetTransformInfoImplBase
typedef TargetTransformInfo TTI
 

Detailed Description

template<typename T>
class llvm::BasicTTIImplBase< T >

Base class which can be used to help build a TTI implementation.

This class provides as much implementation of the TTI interface as is possible using the target independent parts of the code generator.

In order to subclass it, your class must implement a getST() method to return the subtarget, and a getTLI() method to return the target lowering. We need these methods implemented in the derived class so that this class doesn't have to duplicate storage for them.

Definition at line 77 of file BasicTTIImpl.h.

Constructor & Destructor Documentation

◆ BasicTTIImplBase()

template<typename T >
llvm::BasicTTIImplBase< T >::BasicTTIImplBase ( const TargetMachine TM,
const DataLayout DL 
)
inlineexplicitprotected

Definition at line 243 of file BasicTTIImpl.h.

◆ ~BasicTTIImplBase()

template<typename T >
virtual llvm::BasicTTIImplBase< T >::~BasicTTIImplBase ( )
protectedvirtualdefault

Member Function Documentation

◆ adjustInliningThreshold()

template<typename T >
unsigned llvm::BasicTTIImplBase< T >::adjustInliningThreshold ( const CallBase CB)
inline

Definition at line 483 of file BasicTTIImpl.h.

◆ allowsMisalignedMemoryAccesses()

template<typename T >
bool llvm::BasicTTIImplBase< T >::allowsMisalignedMemoryAccesses ( LLVMContext Context,
unsigned  BitWidth,
unsigned  AddressSpace,
Align  Alignment,
bool *  Fast 
) const
inline

Definition at line 252 of file BasicTTIImpl.h.

◆ collectFlatAddressOperands()

template<typename T >
bool llvm::BasicTTIImplBase< T >::collectFlatAddressOperands ( SmallVectorImpl< int > &  OpIndexes,
Intrinsic::ID  IID 
) const
inline

Definition at line 273 of file BasicTTIImpl.h.

◆ emitGetActiveLaneMask()

template<typename T >
bool llvm::BasicTTIImplBase< T >::emitGetActiveLaneMask ( )
inline

Definition at line 581 of file BasicTTIImpl.h.

◆ enableWritePrefetching()

template<typename T >
virtual bool llvm::BasicTTIImplBase< T >::enableWritePrefetching ( ) const
inlinevirtual

Definition at line 653 of file BasicTTIImpl.h.

◆ getAddressComputationCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getAddressComputationCost ( Type Ty,
ScalarEvolution ,
const SCEV  
)
inline

Definition at line 2007 of file BasicTTIImpl.h.

◆ getArithmeticInstrCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::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 
)
inline

Definition at line 750 of file BasicTTIImpl.h.

Referenced by llvm::WebAssemblyTTIImpl::getArithmeticInstrCost().

◆ getArithmeticReductionCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getArithmeticReductionCost ( unsigned  Opcode,
VectorType Ty,
Optional< FastMathFlags FMF,
TTI::TargetCostKind  CostKind 
)
inline

Definition at line 2119 of file BasicTTIImpl.h.

◆ getAssumedAddrSpace()

template<typename T >
unsigned llvm::BasicTTIImplBase< T >::getAssumedAddrSpace ( const Value V) const
inline

Definition at line 282 of file BasicTTIImpl.h.

◆ getCacheAssociativity()

template<typename T >
virtual Optional<unsigned> llvm::BasicTTIImplBase< T >::getCacheAssociativity ( TargetTransformInfo::CacheLevel  Level) const
inlinevirtual

Reimplemented in llvm::X86TTIImpl.

Definition at line 623 of file BasicTTIImpl.h.

◆ getCacheLineSize()

template<typename T >
virtual unsigned llvm::BasicTTIImplBase< T >::getCacheLineSize ( ) const
inlinevirtual

Definition at line 633 of file BasicTTIImpl.h.

◆ getCacheSize()

template<typename T >
virtual Optional<unsigned> llvm::BasicTTIImplBase< T >::getCacheSize ( TargetTransformInfo::CacheLevel  Level) const
inlinevirtual

Reimplemented in llvm::X86TTIImpl.

Definition at line 617 of file BasicTTIImpl.h.

Referenced by llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCacheSize().

◆ getCallInstrCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getCallInstrCost ( Function F,
Type RetTy,
ArrayRef< Type * >  Tys,
TTI::TargetCostKind  CostKind = TTI::TCK_SizeAndLatency 
)
inline

Compute a cost of the given call instruction.

Compute the cost of calling function F with return type RetTy and argument types Tys. F might be nullptr, in this case the cost of an arbitrary call with the specified signature will be returned. This is used, for instance, when we estimate call of a vector counterpart of the given function.

Parameters
FCalled function, might be nullptr.
RetTyReturn value types.
TysArgument types.
Returns
The cost of Call instruction.

Definition at line 1996 of file BasicTTIImpl.h.

◆ getCastInstrCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getCastInstrCost ( unsigned  Opcode,
Type Dst,
Type Src,
TTI::CastContextHint  CCH,
TTI::TargetCostKind  CostKind,
const Instruction I = nullptr 
)
inline

Definition at line 890 of file BasicTTIImpl.h.

◆ getCFInstrCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getCFInstrCost ( unsigned  Opcode,
TTI::TargetCostKind  CostKind,
const Instruction I = nullptr 
)
inline

Definition at line 1055 of file BasicTTIImpl.h.

◆ getCmpSelInstrCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getCmpSelInstrCost ( unsigned  Opcode,
Type ValTy,
Type CondTy,
CmpInst::Predicate  VecPred,
TTI::TargetCostKind  CostKind,
const Instruction I = nullptr 
)
inline

Definition at line 1060 of file BasicTTIImpl.h.

◆ getEstimatedNumberOfCaseClusters()

template<typename T >
unsigned llvm::BasicTTIImplBase< T >::getEstimatedNumberOfCaseClusters ( const SwitchInst SI,
unsigned &  JumpTableSize,
ProfileSummaryInfo PSI,
BlockFrequencyInfo BFI 
)
inline

Try to find the estimated number of clusters. Note that the number of clusters identified in this function could be different from the actual numbers found in lowering. This function ignore switches that are lowered with a mix of jump table / bit test / BTree. This function was initially intended to be used when estimating the cost of switch in inline cost heuristic, but it's a generic cost model to be used in other places (e.g., in loop unrolling).

Definition at line 371 of file BasicTTIImpl.h.

◆ getExtendedAddReductionCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getExtendedAddReductionCost ( bool  IsMLA,
bool  IsUnsigned,
Type ResTy,
VectorType Ty,
TTI::TargetCostKind  CostKind 
)
inline

Definition at line 2187 of file BasicTTIImpl.h.

◆ getExtractWithExtendCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getExtractWithExtendCost ( unsigned  Opcode,
Type Dst,
VectorType VecTy,
unsigned  Index 
)
inline

Definition at line 1046 of file BasicTTIImpl.h.

◆ getFlatAddressSpace()

template<typename T >
unsigned llvm::BasicTTIImplBase< T >::getFlatAddressSpace ( )
inline

Definition at line 268 of file BasicTTIImpl.h.

◆ getFPOpCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getFPOpCost ( Type Ty)
inline

Definition at line 472 of file BasicTTIImpl.h.

◆ getGatherScatterOpCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getGatherScatterOpCost ( unsigned  Opcode,
Type DataTy,
const Value Ptr,
bool  VariableMask,
Align  Alignment,
TTI::TargetCostKind  CostKind,
const Instruction I = nullptr 
)
inline

Definition at line 1167 of file BasicTTIImpl.h.

◆ getGEPCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getGEPCost ( Type PointeeType,
const Value Ptr,
ArrayRef< const Value * >  Operands 
)
inline

Definition at line 366 of file BasicTTIImpl.h.

◆ getInlinerVectorBonusPercent()

template<typename T >
int llvm::BasicTTIImplBase< T >::getInlinerVectorBonusPercent ( )
inline

Definition at line 485 of file BasicTTIImpl.h.

◆ getInliningThresholdMultiplier()

template<typename T >
unsigned llvm::BasicTTIImplBase< T >::getInliningThresholdMultiplier ( )
inline

Definition at line 482 of file BasicTTIImpl.h.

◆ getInstructionLatency()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getInstructionLatency ( const Instruction I)
inline

Definition at line 609 of file BasicTTIImpl.h.

◆ getInterleavedMemoryOpCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getInterleavedMemoryOpCost ( unsigned  Opcode,
Type VecTy,
unsigned  Factor,
ArrayRef< unsigned >  Indices,
Align  Alignment,
unsigned  AddressSpace,
TTI::TargetCostKind  CostKind,
bool  UseMaskForCond = false,
bool  UseMaskForGaps = false 
)
inline

Definition at line 1176 of file BasicTTIImpl.h.

◆ getIntrinsicInstrCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getIntrinsicInstrCost ( const IntrinsicCostAttributes ICA,
TTI::TargetCostKind  CostKind 
)
inline

Get intrinsic cost based on arguments.

Definition at line 1332 of file BasicTTIImpl.h.

◆ getMaskedMemoryOpCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getMaskedMemoryOpCost ( unsigned  Opcode,
Type DataTy,
Align  Alignment,
unsigned  AddressSpace,
TTI::TargetCostKind  CostKind 
)
inline

Definition at line 1160 of file BasicTTIImpl.h.

◆ getMaxInterleaveFactor()

template<typename T >
unsigned llvm::BasicTTIImplBase< T >::getMaxInterleaveFactor ( unsigned  VF)
inline

Definition at line 748 of file BasicTTIImpl.h.

◆ getMaxPrefetchIterationsAhead()

template<typename T >
virtual unsigned llvm::BasicTTIImplBase< T >::getMaxPrefetchIterationsAhead ( ) const
inlinevirtual

Definition at line 649 of file BasicTTIImpl.h.

◆ getMaxVScale()

template<typename T >
Optional<unsigned> llvm::BasicTTIImplBase< T >::getMaxVScale ( ) const
inline

Definition at line 666 of file BasicTTIImpl.h.

◆ getMemoryOpCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getMemoryOpCost ( unsigned  Opcode,
Type Src,
MaybeAlign  Alignment,
unsigned  AddressSpace,
TTI::TargetCostKind  CostKind,
const Instruction I = nullptr 
)
inline

Definition at line 1116 of file BasicTTIImpl.h.

◆ getMinMaxReductionCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getMinMaxReductionCost ( VectorType Ty,
VectorType CondTy,
bool  IsUnsigned,
TTI::TargetCostKind  CostKind 
)
inline

Try to calculate op costs for min/max reduction operations.

Parameters
CondTyConditional type for the Select instruction.

Definition at line 2129 of file BasicTTIImpl.h.

◆ getMinPrefetchStride()

template<typename T >
virtual unsigned llvm::BasicTTIImplBase< T >::getMinPrefetchStride ( unsigned  NumMemAccesses,
unsigned  NumStridedMemAccesses,
unsigned  NumPrefetches,
bool  HasCall 
) const
inlinevirtual

Reimplemented in llvm::SystemZTTIImpl.

Definition at line 641 of file BasicTTIImpl.h.

◆ getNumberOfParts()

template<typename T >
unsigned llvm::BasicTTIImplBase< T >::getNumberOfParts ( Type Tp)
inline

Definition at line 2001 of file BasicTTIImpl.h.

◆ getOperandsScalarizationOverhead()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getOperandsScalarizationOverhead ( ArrayRef< const Value * >  Args,
ArrayRef< Type * >  Tys 
)
inline

Estimate the overhead of scalarizing an instructions unique non-constant operands.

The (potentially vector) types to use for each of argument are passes via Tys.

Definition at line 707 of file BasicTTIImpl.h.

Referenced by llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getIntrinsicInstrCost(), and llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getScalarizationOverhead().

◆ getOrderedReductionCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getOrderedReductionCost ( unsigned  Opcode,
VectorType Ty,
TTI::TargetCostKind  CostKind 
)
inline

Try to calculate the cost of performing strict (in-order) reductions, which involves doing a sequence of floating point additions in lane order, starting with an initial value.

For example, consider a scalar initial value 'InitVal' of type float and a vector of type <4 x float>:

Vector = <float v0, float v1, float v2, float v3>

add1 = InitVal + v0 add2 = add1 + v1 add3 = add2 + v2 add4 = add3 + v3

As a simple estimate we can say the cost of such a reduction is 4 times the cost of a scalar FP addition. We can only estimate the costs for fixed-width vectors here because for scalable vectors we do not know the runtime number of operations.

Definition at line 2102 of file BasicTTIImpl.h.

Referenced by llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getArithmeticReductionCost().

◆ getPeelingPreferences()

template<typename T >
void llvm::BasicTTIImplBase< T >::getPeelingPreferences ( Loop L,
ScalarEvolution SE,
TTI::PeelingPreferences PP 
)
inline

Definition at line 559 of file BasicTTIImpl.h.

◆ getPrefetchDistance()

template<typename T >
virtual unsigned llvm::BasicTTIImplBase< T >::getPrefetchDistance ( ) const
inlinevirtual

Definition at line 637 of file BasicTTIImpl.h.

◆ getRegisterBitWidth()

template<typename T >
TypeSize llvm::BasicTTIImplBase< T >::getRegisterBitWidth ( TargetTransformInfo::RegisterKind  K) const
inline

Definition at line 662 of file BasicTTIImpl.h.

◆ getRegUsageForType()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getRegUsageForType ( Type Ty)
inline

Definition at line 360 of file BasicTTIImpl.h.

◆ getScalarizationOverhead() [1/3]

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getScalarizationOverhead ( VectorType InTy,
bool  Insert,
bool  Extract 
)
inline

Helper wrapper for the DemandedElts variant of getScalarizationOverhead.

Definition at line 696 of file BasicTTIImpl.h.

◆ getScalarizationOverhead() [2/3]

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getScalarizationOverhead ( VectorType InTy,
const APInt DemandedElts,
bool  Insert,
bool  Extract 
)
inline

◆ getScalarizationOverhead() [3/3]

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getScalarizationOverhead ( VectorType RetTy,
ArrayRef< const Value * >  Args,
ArrayRef< Type * >  Tys 
)
inline

Estimate the overhead of scalarizing the inputs and outputs of an instruction, with return type RetTy and arguments Args of type Tys.

If Args are unknown (empty), then the cost associated with one argument is added as a heuristic.

Definition at line 734 of file BasicTTIImpl.h.

◆ getScalingFactorCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getScalingFactorCost ( Type Ty,
GlobalValue BaseGV,
int64_t  BaseOffset,
bool  HasBaseReg,
int64_t  Scale,
unsigned  AddrSpace 
)
inline

Definition at line 334 of file BasicTTIImpl.h.

◆ getShuffleCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getShuffleCost ( TTI::ShuffleKind  Kind,
VectorType Tp,
ArrayRef< int Mask,
int  Index,
VectorType SubTp 
)
inline

Definition at line 866 of file BasicTTIImpl.h.

◆ getTreeReductionCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getTreeReductionCost ( unsigned  Opcode,
VectorType Ty,
TTI::TargetCostKind  CostKind 
)
inline

Try to calculate arithmetic and shuffle op costs for reduction intrinsics.

We're assuming that reduction operation are performing the following way:

val1 = shufflevector<n x t> val, <n x t> undef, <n x i32> <i32 n/2, i32 n/2 + 1, ..., i32 n, i32 undef, ..., i32 undef> -------------—v----------—/ -------—v---------—/ n/2 elements n/2 elements red1 = op <n x t> val, <n x t> val1 After this operation we have a vector red1 where only the first n/2 elements are meaningful, the second n/2 elements are undefined and can be dropped. All other operations are actually working with the vector of length n/2, not n, though the real vector length is still n. val2 = shufflevector<n x t> red1, <n x t> undef, <n x i32> <i32 n/4, i32 n/4 + 1, ..., i32 n/2, i32 undef, ..., i32 undef> -------------—v----------—/ -------—v---------—/ n/4 elements 3*n/4 elements red2 = op <n x t> red1, <n x t> val2 - working with the vector of length n/2, the resulting vector has length n/4 etc.

The cost model should take into account that the actual length of the vector is reduced on each iteration.

Definition at line 2033 of file BasicTTIImpl.h.

Referenced by llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getArithmeticReductionCost().

◆ getTypeBasedIntrinsicInstrCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getTypeBasedIntrinsicInstrCost ( const IntrinsicCostAttributes ICA,
TTI::TargetCostKind  CostKind 
)
inline

Get intrinsic cost based on argument types.

If ScalarizationCostPassed is std::numeric_limits<unsigned>::max(), the cost of scalarizing the arguments and the return value will be computed based on types.

Definition at line 1513 of file BasicTTIImpl.h.

Referenced by llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getIntrinsicInstrCost().

◆ getUnrollingPreferences()

template<typename T >
void llvm::BasicTTIImplBase< T >::getUnrollingPreferences ( Loop L,
ScalarEvolution SE,
TTI::UnrollingPreferences UP,
OptimizationRemarkEmitter ORE 
)
inline

Definition at line 487 of file BasicTTIImpl.h.

Referenced by llvm::ARMTTIImpl::getUnrollingPreferences().

◆ getVectorInstrCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getVectorInstrCost ( unsigned  Opcode,
Type Val,
unsigned  Index 
)
inline

Definition at line 1108 of file BasicTTIImpl.h.

Referenced by llvm::WebAssemblyTTIImpl::getVectorInstrCost().

◆ getVectorSplitCost()

template<typename T >
InstructionCost llvm::BasicTTIImplBase< T >::getVectorSplitCost ( )
inline

Definition at line 2208 of file BasicTTIImpl.h.

◆ hasBranchDivergence()

template<typename T >
bool llvm::BasicTTIImplBase< T >::hasBranchDivergence ( )
inline

Definition at line 260 of file BasicTTIImpl.h.

◆ haveFastSqrt()

template<typename T >
bool llvm::BasicTTIImplBase< T >::haveFastSqrt ( Type Ty)
inline

Definition at line 461 of file BasicTTIImpl.h.

◆ improveShuffleKindFromMask()

template<typename T >
TTI::ShuffleKind llvm::BasicTTIImplBase< T >::improveShuffleKindFromMask ( TTI::ShuffleKind  Kind,
ArrayRef< int Mask 
) const
inline

◆ instCombineIntrinsic()

template<typename T >
Optional<Instruction *> llvm::BasicTTIImplBase< T >::instCombineIntrinsic ( InstCombiner IC,
IntrinsicInst II 
)
inline

Definition at line 585 of file BasicTTIImpl.h.

◆ isAlwaysUniform()

template<typename T >
bool llvm::BasicTTIImplBase< T >::isAlwaysUniform ( const Value V)
inline

Definition at line 266 of file BasicTTIImpl.h.

◆ isFCmpOrdCheaperThanFCmpZero()

template<typename T >
bool llvm::BasicTTIImplBase< T >::isFCmpOrdCheaperThanFCmpZero ( Type Ty)
inline

Definition at line 468 of file BasicTTIImpl.h.

◆ isHardwareLoopProfitable()

template<typename T >
bool llvm::BasicTTIImplBase< T >::isHardwareLoopProfitable ( Loop L,
ScalarEvolution SE,
AssumptionCache AC,
TargetLibraryInfo LibInfo,
HardwareLoopInfo HWLoopInfo 
)
inline

Definition at line 567 of file BasicTTIImpl.h.

◆ isIndexedLoadLegal()

template<typename T >
bool llvm::BasicTTIImplBase< T >::isIndexedLoadLegal ( TTI::MemIndexedMode  M,
Type Ty,
const DataLayout DL 
) const
inline

Definition at line 310 of file BasicTTIImpl.h.

◆ isIndexedStoreLegal()

template<typename T >
bool llvm::BasicTTIImplBase< T >::isIndexedStoreLegal ( TTI::MemIndexedMode  M,
Type Ty,
const DataLayout DL 
) const
inline

Definition at line 316 of file BasicTTIImpl.h.

◆ isLegalAddImmediate()

template<typename T >
bool llvm::BasicTTIImplBase< T >::isLegalAddImmediate ( int64_t  imm)
inline

Definition at line 291 of file BasicTTIImpl.h.

◆ isLegalAddressingMode()

template<typename T >
bool llvm::BasicTTIImplBase< T >::isLegalAddressingMode ( Type Ty,
GlobalValue BaseGV,
int64_t  BaseOffset,
bool  HasBaseReg,
int64_t  Scale,
unsigned  AddrSpace,
Instruction I = nullptr 
)
inline

Definition at line 299 of file BasicTTIImpl.h.

◆ isLegalICmpImmediate()

template<typename T >
bool llvm::BasicTTIImplBase< T >::isLegalICmpImmediate ( int64_t  imm)
inline

Definition at line 295 of file BasicTTIImpl.h.

◆ isLSRCostLess()

template<typename T >
bool llvm::BasicTTIImplBase< T >::isLSRCostLess ( TTI::LSRCost  C1,
TTI::LSRCost  C2 
)
inline

Definition at line 322 of file BasicTTIImpl.h.

◆ isNoopAddrSpaceCast()

template<typename T >
bool llvm::BasicTTIImplBase< T >::isNoopAddrSpaceCast ( unsigned  FromAS,
unsigned  ToAS 
) const
inline

Definition at line 278 of file BasicTTIImpl.h.

◆ isNumRegsMajorCostOfLSR()

template<typename T >
bool llvm::BasicTTIImplBase< T >::isNumRegsMajorCostOfLSR ( )
inline

Definition at line 326 of file BasicTTIImpl.h.

◆ isProfitableLSRChainElement()

template<typename T >
bool llvm::BasicTTIImplBase< T >::isProfitableLSRChainElement ( Instruction I)
inline

Definition at line 330 of file BasicTTIImpl.h.

◆ isProfitableToHoist()

template<typename T >
bool llvm::BasicTTIImplBase< T >::isProfitableToHoist ( Instruction I)
inline

Definition at line 349 of file BasicTTIImpl.h.

◆ isSourceOfDivergence()

template<typename T >
bool llvm::BasicTTIImplBase< T >::isSourceOfDivergence ( const Value V)
inline

Definition at line 264 of file BasicTTIImpl.h.

◆ isTruncateFree()

template<typename T >
bool llvm::BasicTTIImplBase< T >::isTruncateFree ( Type Ty1,
Type Ty2 
)
inline

Definition at line 345 of file BasicTTIImpl.h.

◆ isTypeLegal()

template<typename T >
bool llvm::BasicTTIImplBase< T >::isTypeLegal ( Type Ty)
inline

Definition at line 355 of file BasicTTIImpl.h.

◆ preferPredicateOverEpilogue()

template<typename T >
bool llvm::BasicTTIImplBase< T >::preferPredicateOverEpilogue ( Loop L,
LoopInfo LI,
ScalarEvolution SE,
AssumptionCache AC,
TargetLibraryInfo TLI,
DominatorTree DT,
const LoopAccessInfo LAI 
)
inline

Definition at line 574 of file BasicTTIImpl.h.

◆ rewriteIntrinsicWithAddressSpace()

template<typename T >
Value* llvm::BasicTTIImplBase< T >::rewriteIntrinsicWithAddressSpace ( IntrinsicInst II,
Value OldV,
Value NewV 
) const
inline

Definition at line 286 of file BasicTTIImpl.h.

◆ shouldBuildLookupTables()

template<typename T >
bool llvm::BasicTTIImplBase< T >::shouldBuildLookupTables ( )
inline

Definition at line 430 of file BasicTTIImpl.h.

◆ shouldBuildRelLookupTables()

template<typename T >
bool llvm::BasicTTIImplBase< T >::shouldBuildRelLookupTables ( ) const
inline

Relative lookup table entries consist of 32-bit offsets. Do not generate relative lookup tables for large code models in 64-bit achitectures where 32-bit offsets might not be enough.

Definition at line 436 of file BasicTTIImpl.h.

◆ simplifyDemandedUseBitsIntrinsic()

template<typename T >
Optional<Value *> llvm::BasicTTIImplBase< T >::simplifyDemandedUseBitsIntrinsic ( InstCombiner IC,
IntrinsicInst II,
APInt  DemandedMask,
KnownBits Known,
bool &  KnownBitsComputed 
)
inline

Definition at line 590 of file BasicTTIImpl.h.

◆ simplifyDemandedVectorEltsIntrinsic()

template<typename T >
Optional<Value *> llvm::BasicTTIImplBase< T >::simplifyDemandedVectorEltsIntrinsic ( InstCombiner IC,
IntrinsicInst II,
APInt  DemandedElts,
APInt UndefElts,
APInt UndefElts2,
APInt UndefElts3,
std::function< void(Instruction *, unsigned, APInt, APInt &)>  SimplifyAndSetOp 
)
inline

Definition at line 599 of file BasicTTIImpl.h.

◆ useAA()

template<typename T >
bool llvm::BasicTTIImplBase< T >::useAA ( ) const
inline

Definition at line 353 of file BasicTTIImpl.h.

◆ useGPUDivergenceAnalysis()

template<typename T >
bool llvm::BasicTTIImplBase< T >::useGPUDivergenceAnalysis ( )
inline

Definition at line 262 of file BasicTTIImpl.h.

Member Data Documentation

◆ DL

template<typename T >
const DataLayout& llvm::TargetTransformInfoImplBase::DL
protected

Definition at line 38 of file TargetTransformInfoImpl.h.


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