LLVM 22.0.0git
llvm::TargetTransformInfoImplBase Class Reference

Base class for use as a mix-in that aids implementing a TargetTransformInfo-compatible class. More...

#include "llvm/Analysis/TargetTransformInfoImpl.h"

Inheritance diagram for llvm::TargetTransformInfoImplBase:
[legend]

Public Member Functions

virtual ~TargetTransformInfoImplBase ()
 TargetTransformInfoImplBase (const TargetTransformInfoImplBase &Arg)=default
 TargetTransformInfoImplBase (TargetTransformInfoImplBase &&Arg)
virtual const DataLayoutgetDataLayout () const
virtual InstructionCost getGEPCost (Type *PointeeType, const Value *Ptr, ArrayRef< const Value * > Operands, Type *AccessType, TTI::TargetCostKind CostKind) const
virtual InstructionCost getPointersChainCost (ArrayRef< const Value * > Ptrs, const Value *Base, const TTI::PointersChainInfo &Info, Type *AccessTy, TTI::TargetCostKind CostKind) const
virtual unsigned getEstimatedNumberOfCaseClusters (const SwitchInst &SI, unsigned &JTSize, ProfileSummaryInfo *PSI, BlockFrequencyInfo *BFI) const
virtual InstructionCost getInstructionCost (const User *U, ArrayRef< const Value * > Operands, TTI::TargetCostKind CostKind) const
virtual unsigned getInliningThresholdMultiplier () const
virtual unsigned getInliningCostBenefitAnalysisSavingsMultiplier () const
virtual unsigned getInliningCostBenefitAnalysisProfitableMultiplier () const
virtual int getInliningLastCallToStaticBonus () const
virtual unsigned adjustInliningThreshold (const CallBase *CB) const
virtual unsigned getCallerAllocaCost (const CallBase *CB, const AllocaInst *AI) const
virtual int getInlinerVectorBonusPercent () const
virtual InstructionCost getMemcpyCost (const Instruction *I) const
virtual uint64_t getMaxMemIntrinsicInlineSizeThreshold () const
virtual BranchProbability getPredictableBranchThreshold () const
virtual InstructionCost getBranchMispredictPenalty () const
virtual bool hasBranchDivergence (const Function *F=nullptr) const
virtual bool isSourceOfDivergence (const Value *V) const
virtual bool isAlwaysUniform (const Value *V) const
virtual bool isValidAddrSpaceCast (unsigned FromAS, unsigned ToAS) const
virtual bool addrspacesMayAlias (unsigned AS0, unsigned AS1) const
virtual unsigned getFlatAddressSpace () const
virtual bool collectFlatAddressOperands (SmallVectorImpl< int > &OpIndexes, Intrinsic::ID IID) const
virtual bool isNoopAddrSpaceCast (unsigned, unsigned) const
virtual bool canHaveNonUndefGlobalInitializerInAddressSpace (unsigned AS) const
virtual unsigned getAssumedAddrSpace (const Value *V) const
virtual bool isSingleThreaded () const
virtual std::pair< const Value *, unsignedgetPredicatedAddrSpace (const Value *V) const
virtual ValuerewriteIntrinsicWithAddressSpace (IntrinsicInst *II, Value *OldV, Value *NewV) const
virtual bool isLoweredToCall (const Function *F) const
virtual bool isHardwareLoopProfitable (Loop *L, ScalarEvolution &SE, AssumptionCache &AC, TargetLibraryInfo *LibInfo, HardwareLoopInfo &HWLoopInfo) const
virtual unsigned getEpilogueVectorizationMinVF () const
virtual bool preferPredicateOverEpilogue (TailFoldingInfo *TFI) const
virtual TailFoldingStyle getPreferredTailFoldingStyle (bool IVUpdateMayOverflow=true) const
virtual std::optional< Instruction * > instCombineIntrinsic (InstCombiner &IC, IntrinsicInst &II) const
virtual std::optional< Value * > simplifyDemandedUseBitsIntrinsic (InstCombiner &IC, IntrinsicInst &II, APInt DemandedMask, KnownBits &Known, bool &KnownBitsComputed) const
virtual std::optional< Value * > simplifyDemandedVectorEltsIntrinsic (InstCombiner &IC, IntrinsicInst &II, APInt DemandedElts, APInt &UndefElts, APInt &UndefElts2, APInt &UndefElts3, std::function< void(Instruction *, unsigned, APInt, APInt &)> SimplifyAndSetOp) const
virtual void getUnrollingPreferences (Loop *, ScalarEvolution &, TTI::UnrollingPreferences &, OptimizationRemarkEmitter *) const
virtual void getPeelingPreferences (Loop *, ScalarEvolution &, TTI::PeelingPreferences &) const
virtual bool isLegalAddImmediate (int64_t Imm) const
virtual bool isLegalAddScalableImmediate (int64_t Imm) const
virtual bool isLegalICmpImmediate (int64_t Imm) const
virtual bool isLegalAddressingMode (Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace, Instruction *I=nullptr, int64_t ScalableOffset=0) const
virtual bool isLSRCostLess (const TTI::LSRCost &C1, const TTI::LSRCost &C2) const
virtual bool isNumRegsMajorCostOfLSR () const
virtual bool shouldDropLSRSolutionIfLessProfitable () const
virtual bool isProfitableLSRChainElement (Instruction *I) const
virtual bool canMacroFuseCmp () const
virtual bool canSaveCmp (Loop *L, BranchInst **BI, ScalarEvolution *SE, LoopInfo *LI, DominatorTree *DT, AssumptionCache *AC, TargetLibraryInfo *LibInfo) const
virtual TTI::AddressingModeKind getPreferredAddressingMode (const Loop *L, ScalarEvolution *SE) const
virtual bool isLegalMaskedStore (Type *DataType, Align Alignment, unsigned AddressSpace) const
virtual bool isLegalMaskedLoad (Type *DataType, Align Alignment, unsigned AddressSpace) const
virtual bool isLegalNTStore (Type *DataType, Align Alignment) const
virtual bool isLegalNTLoad (Type *DataType, Align Alignment) const
virtual bool isLegalBroadcastLoad (Type *ElementTy, ElementCount NumElements) const
virtual bool isLegalMaskedScatter (Type *DataType, Align Alignment) const
virtual bool isLegalMaskedGather (Type *DataType, Align Alignment) const
virtual bool forceScalarizeMaskedGather (VectorType *DataType, Align Alignment) const
virtual bool forceScalarizeMaskedScatter (VectorType *DataType, Align Alignment) const
virtual bool isLegalMaskedCompressStore (Type *DataType, Align Alignment) const
virtual bool isLegalAltInstr (VectorType *VecTy, unsigned Opcode0, unsigned Opcode1, const SmallBitVector &OpcodeMask) const
virtual bool isLegalMaskedExpandLoad (Type *DataType, Align Alignment) const
virtual bool isLegalStridedLoadStore (Type *DataType, Align Alignment) const
virtual bool isLegalInterleavedAccessType (VectorType *VTy, unsigned Factor, Align Alignment, unsigned AddrSpace) const
virtual bool isLegalMaskedVectorHistogram (Type *AddrType, Type *DataType) const
virtual bool enableOrderedReductions () const
virtual bool hasDivRemOp (Type *DataType, bool IsSigned) const
virtual bool hasVolatileVariant (Instruction *I, unsigned AddrSpace) const
virtual bool prefersVectorizedAddressing () const
virtual InstructionCost getScalingFactorCost (Type *Ty, GlobalValue *BaseGV, StackOffset BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace) const
virtual bool LSRWithInstrQueries () const
virtual bool isTruncateFree (Type *Ty1, Type *Ty2) const
virtual bool isProfitableToHoist (Instruction *I) const
virtual bool useAA () const
virtual bool isTypeLegal (Type *Ty) const
virtual unsigned getRegUsageForType (Type *Ty) const
virtual bool shouldBuildLookupTables () const
virtual bool shouldBuildLookupTablesForConstant (Constant *C) const
virtual bool shouldBuildRelLookupTables () const
virtual bool useColdCCForColdCall (Function &F) const
virtual bool isTargetIntrinsicTriviallyScalarizable (Intrinsic::ID ID) const
virtual bool isTargetIntrinsicWithScalarOpAtArg (Intrinsic::ID ID, unsigned ScalarOpdIdx) const
virtual bool isTargetIntrinsicWithOverloadTypeAtArg (Intrinsic::ID ID, int OpdIdx) const
virtual bool isTargetIntrinsicWithStructReturnOverloadAtField (Intrinsic::ID ID, int RetIdx) const
virtual InstructionCost getScalarizationOverhead (VectorType *Ty, const APInt &DemandedElts, bool Insert, bool Extract, TTI::TargetCostKind CostKind, bool ForPoisonSrc=true, ArrayRef< Value * > VL={}) const
virtual InstructionCost getOperandsScalarizationOverhead (ArrayRef< Type * > Tys, TTI::TargetCostKind CostKind) const
virtual bool supportsEfficientVectorElementLoadStore () const
virtual bool supportsTailCalls () const
virtual bool supportsTailCallFor (const CallBase *CB) const
virtual bool enableAggressiveInterleaving (bool LoopHasReductions) const
virtual TTI::MemCmpExpansionOptions enableMemCmpExpansion (bool OptSize, bool IsZeroCmp) const
virtual bool enableSelectOptimize () const
virtual bool shouldTreatInstructionLikeSelect (const Instruction *I) const
virtual bool enableInterleavedAccessVectorization () const
virtual bool enableMaskedInterleavedAccessVectorization () const
virtual bool isFPVectorizationPotentiallyUnsafe () const
virtual bool allowsMisalignedMemoryAccesses (LLVMContext &Context, unsigned BitWidth, unsigned AddressSpace, Align Alignment, unsigned *Fast) const
virtual TTI::PopcntSupportKind getPopcntSupport (unsigned IntTyWidthInBit) const
virtual bool haveFastSqrt (Type *Ty) const
virtual bool isExpensiveToSpeculativelyExecute (const Instruction *I) const
virtual bool isFCmpOrdCheaperThanFCmpZero (Type *Ty) const
virtual InstructionCost getFPOpCost (Type *Ty) const
virtual InstructionCost getIntImmCodeSizeCost (unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty) const
virtual InstructionCost getIntImmCost (const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind) const
virtual InstructionCost getIntImmCostInst (unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind, Instruction *Inst=nullptr) const
virtual InstructionCost getIntImmCostIntrin (Intrinsic::ID IID, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind) const
virtual bool preferToKeepConstantsAttached (const Instruction &Inst, const Function &Fn) const
virtual unsigned getNumberOfRegisters (unsigned ClassID) const
virtual bool hasConditionalLoadStoreForType (Type *Ty, bool IsStore) const
virtual unsigned getRegisterClassForType (bool Vector, Type *Ty=nullptr) const
virtual const chargetRegisterClassName (unsigned ClassID) const
virtual TypeSize getRegisterBitWidth (TargetTransformInfo::RegisterKind K) const
virtual unsigned getMinVectorRegisterBitWidth () const
virtual std::optional< unsignedgetMaxVScale () const
virtual std::optional< unsignedgetVScaleForTuning () const
virtual bool isVScaleKnownToBeAPowerOfTwo () const
virtual bool shouldMaximizeVectorBandwidth (TargetTransformInfo::RegisterKind K) const
virtual ElementCount getMinimumVF (unsigned ElemWidth, bool IsScalable) const
virtual unsigned getMaximumVF (unsigned ElemWidth, unsigned Opcode) const
virtual unsigned getStoreMinimumVF (unsigned VF, Type *, Type *) const
virtual bool shouldConsiderAddressTypePromotion (const Instruction &I, bool &AllowPromotionWithoutCommonHeader) const
virtual unsigned getCacheLineSize () const
virtual std::optional< unsignedgetCacheSize (TargetTransformInfo::CacheLevel Level) const
virtual std::optional< unsignedgetCacheAssociativity (TargetTransformInfo::CacheLevel Level) const
virtual std::optional< unsignedgetMinPageSize () 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
virtual bool shouldPrefetchAddressSpace (unsigned AS) const
virtual InstructionCost getPartialReductionCost (unsigned Opcode, Type *InputTypeA, Type *InputTypeB, Type *AccumType, ElementCount VF, TTI::PartialReductionExtendKind OpAExtend, TTI::PartialReductionExtendKind OpBExtend, std::optional< unsigned > BinOp, TTI::TargetCostKind CostKind) const
virtual unsigned getMaxInterleaveFactor (ElementCount VF) const
virtual InstructionCost getArithmeticInstrCost (unsigned Opcode, Type *Ty, TTI::TargetCostKind CostKind, TTI::OperandValueInfo Opd1Info, TTI::OperandValueInfo Opd2Info, ArrayRef< const Value * > Args, const Instruction *CxtI=nullptr) const
virtual InstructionCost getAltInstrCost (VectorType *VecTy, unsigned Opcode0, unsigned Opcode1, const SmallBitVector &OpcodeMask, TTI::TargetCostKind CostKind) const
virtual InstructionCost getShuffleCost (TTI::ShuffleKind Kind, VectorType *DstTy, VectorType *SrcTy, ArrayRef< int > Mask, TTI::TargetCostKind CostKind, int Index, VectorType *SubTp, ArrayRef< const Value * > Args={}, const Instruction *CxtI=nullptr) const
virtual InstructionCost getCastInstrCost (unsigned Opcode, Type *Dst, Type *Src, TTI::CastContextHint CCH, TTI::TargetCostKind CostKind, const Instruction *I) const
virtual InstructionCost getExtractWithExtendCost (unsigned Opcode, Type *Dst, VectorType *VecTy, unsigned Index, TTI::TargetCostKind CostKind) const
virtual InstructionCost getCFInstrCost (unsigned Opcode, TTI::TargetCostKind CostKind, const Instruction *I=nullptr) const
virtual InstructionCost getCmpSelInstrCost (unsigned Opcode, Type *ValTy, Type *CondTy, CmpInst::Predicate VecPred, TTI::TargetCostKind CostKind, TTI::OperandValueInfo Op1Info, TTI::OperandValueInfo Op2Info, const Instruction *I) const
virtual InstructionCost getVectorInstrCost (unsigned Opcode, Type *Val, TTI::TargetCostKind CostKind, unsigned Index, const Value *Op0, const Value *Op1) const
virtual InstructionCost getVectorInstrCost (unsigned Opcode, Type *Val, TTI::TargetCostKind CostKind, unsigned Index, Value *Scalar, ArrayRef< std::tuple< Value *, User *, int > > ScalarUserAndIdx) const
virtual InstructionCost getVectorInstrCost (const Instruction &I, Type *Val, TTI::TargetCostKind CostKind, unsigned Index) const
virtual InstructionCost getIndexedVectorInstrCostFromEnd (unsigned Opcode, Type *Val, TTI::TargetCostKind CostKind, unsigned Index) const
virtual InstructionCost getReplicationShuffleCost (Type *EltTy, int ReplicationFactor, int VF, const APInt &DemandedDstElts, TTI::TargetCostKind CostKind) const
virtual InstructionCost getInsertExtractValueCost (unsigned Opcode, TTI::TargetCostKind CostKind) const
virtual InstructionCost getMemoryOpCost (unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, TTI::OperandValueInfo OpInfo, const Instruction *I) const
virtual InstructionCost getVPMemoryOpCost (unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, const Instruction *I) const
virtual InstructionCost getMaskedMemoryOpCost (unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind) const
virtual InstructionCost getGatherScatterOpCost (unsigned Opcode, Type *DataTy, const Value *Ptr, bool VariableMask, Align Alignment, TTI::TargetCostKind CostKind, const Instruction *I=nullptr) const
virtual InstructionCost getExpandCompressMemoryOpCost (unsigned Opcode, Type *DataTy, bool VariableMask, Align Alignment, TTI::TargetCostKind CostKind, const Instruction *I=nullptr) const
virtual InstructionCost getStridedMemoryOpCost (unsigned Opcode, Type *DataTy, const Value *Ptr, bool VariableMask, Align Alignment, TTI::TargetCostKind CostKind, const Instruction *I=nullptr) const
virtual InstructionCost getInterleavedMemoryOpCost (unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, bool UseMaskForCond, bool UseMaskForGaps) const
virtual InstructionCost getIntrinsicInstrCost (const IntrinsicCostAttributes &ICA, TTI::TargetCostKind CostKind) const
virtual InstructionCost getCallInstrCost (Function *F, Type *RetTy, ArrayRef< Type * > Tys, TTI::TargetCostKind CostKind) const
virtual unsigned getNumberOfParts (Type *Tp) const
virtual InstructionCost getAddressComputationCost (Type *PtrTy, ScalarEvolution *, const SCEV *, TTI::TargetCostKind) const
virtual InstructionCost getArithmeticReductionCost (unsigned, VectorType *, std::optional< FastMathFlags > FMF, TTI::TargetCostKind) const
virtual InstructionCost getMinMaxReductionCost (Intrinsic::ID IID, VectorType *, FastMathFlags, TTI::TargetCostKind) const
virtual InstructionCost getExtendedReductionCost (unsigned Opcode, bool IsUnsigned, Type *ResTy, VectorType *Ty, std::optional< FastMathFlags > FMF, TTI::TargetCostKind CostKind) const
virtual InstructionCost getMulAccReductionCost (bool IsUnsigned, unsigned RedOpcode, Type *ResTy, VectorType *Ty, TTI::TargetCostKind CostKind) const
virtual InstructionCost getCostOfKeepingLiveOverCall (ArrayRef< Type * > Tys) const
virtual bool getTgtMemIntrinsic (IntrinsicInst *Inst, MemIntrinsicInfo &Info) const
virtual unsigned getAtomicMemIntrinsicMaxElementSize () const
virtual ValuegetOrCreateResultFromMemIntrinsic (IntrinsicInst *Inst, Type *ExpectedType, bool CanCreate=true) const
virtual TypegetMemcpyLoopLoweringType (LLVMContext &Context, Value *Length, unsigned SrcAddrSpace, unsigned DestAddrSpace, Align SrcAlign, Align DestAlign, std::optional< uint32_t > AtomicElementSize) const
virtual void getMemcpyLoopResidualLoweringType (SmallVectorImpl< Type * > &OpsOut, LLVMContext &Context, unsigned RemainingBytes, unsigned SrcAddrSpace, unsigned DestAddrSpace, Align SrcAlign, Align DestAlign, std::optional< uint32_t > AtomicCpySize) const
virtual bool areInlineCompatible (const Function *Caller, const Function *Callee) const
virtual unsigned getInlineCallPenalty (const Function *F, const CallBase &Call, unsigned DefaultCallPenalty) const
virtual bool areTypesABICompatible (const Function *Caller, const Function *Callee, const ArrayRef< Type * > &Types) const
virtual bool isIndexedLoadLegal (TTI::MemIndexedMode Mode, Type *Ty) const
virtual bool isIndexedStoreLegal (TTI::MemIndexedMode Mode, Type *Ty) const
virtual unsigned getLoadStoreVecRegBitWidth (unsigned AddrSpace) const
virtual bool isLegalToVectorizeLoad (LoadInst *LI) const
virtual bool isLegalToVectorizeStore (StoreInst *SI) const
virtual bool isLegalToVectorizeLoadChain (unsigned ChainSizeInBytes, Align Alignment, unsigned AddrSpace) const
virtual bool isLegalToVectorizeStoreChain (unsigned ChainSizeInBytes, Align Alignment, unsigned AddrSpace) const
virtual bool isLegalToVectorizeReduction (const RecurrenceDescriptor &RdxDesc, ElementCount VF) const
virtual bool isElementTypeLegalForScalableVector (Type *Ty) const
virtual unsigned getLoadVectorFactor (unsigned VF, unsigned LoadSize, unsigned ChainSizeInBytes, VectorType *VecTy) const
virtual unsigned getStoreVectorFactor (unsigned VF, unsigned StoreSize, unsigned ChainSizeInBytes, VectorType *VecTy) const
virtual bool preferFixedOverScalableIfEqualCost (bool IsEpilogue) const
virtual bool preferInLoopReduction (RecurKind Kind, Type *Ty) const
virtual bool preferAlternateOpcodeVectorization () const
virtual bool preferPredicatedReductionSelect () const
virtual bool preferEpilogueVectorization () const
virtual bool shouldConsiderVectorizationRegPressure () const
virtual bool shouldExpandReduction (const IntrinsicInst *II) const
virtual TTI::ReductionShuffle getPreferredExpandedReductionShuffle (const IntrinsicInst *II) const
virtual unsigned getGISelRematGlobalCost () const
virtual unsigned getMinTripCountTailFoldingThreshold () const
virtual bool supportsScalableVectors () const
virtual bool enableScalableVectorization () const
virtual bool hasActiveVectorLength () const
virtual bool isProfitableToSinkOperands (Instruction *I, SmallVectorImpl< Use * > &Ops) const
virtual bool isVectorShiftByScalarCheap (Type *Ty) const
virtual TargetTransformInfo::VPLegalization getVPLegalizationStrategy (const VPIntrinsic &PI) const
virtual bool hasArmWideBranch (bool) const
virtual APInt getFeatureMask (const Function &F) const
virtual bool isMultiversionedFunction (const Function &F) const
virtual unsigned getMaxNumArgs () const
virtual unsigned getNumBytesToPadGlobalArray (unsigned Size, Type *ArrayType) const
virtual void collectKernelLaunchBounds (const Function &F, SmallVectorImpl< std::pair< StringRef, int64_t > > &LB) const
virtual bool allowVectorElementIndexingUsingGEP () const

Protected Types

typedef TargetTransformInfo TTI

Protected Member Functions

 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

Detailed Description

Base class for use as a mix-in that aids implementing a TargetTransformInfo-compatible class.

Definition at line 34 of file TargetTransformInfoImpl.h.

Member Typedef Documentation

◆ TTI

Constructor & Destructor Documentation

◆ TargetTransformInfoImplBase() [1/3]

llvm::TargetTransformInfoImplBase::TargetTransformInfoImplBase ( const DataLayout & DL)
inlineexplicitprotected

Definition at line 41 of file TargetTransformInfoImpl.h.

References DL.

Referenced by TargetTransformInfoImplBase(), and TargetTransformInfoImplBase().

◆ ~TargetTransformInfoImplBase()

TargetTransformInfoImplBase::~TargetTransformInfoImplBase ( )
virtualdefault

◆ TargetTransformInfoImplBase() [2/3]

llvm::TargetTransformInfoImplBase::TargetTransformInfoImplBase ( const TargetTransformInfoImplBase & Arg)
default

◆ TargetTransformInfoImplBase() [3/3]

llvm::TargetTransformInfoImplBase::TargetTransformInfoImplBase ( TargetTransformInfoImplBase && Arg)
inline

Definition at line 48 of file TargetTransformInfoImpl.h.

References DL, and TargetTransformInfoImplBase().

Member Function Documentation

◆ addrspacesMayAlias()

◆ adjustInliningThreshold()

◆ allowsMisalignedMemoryAccesses()

◆ allowVectorElementIndexingUsingGEP()

virtual bool llvm::TargetTransformInfoImplBase::allowVectorElementIndexingUsingGEP ( ) const
inlinevirtual

Reimplemented in llvm::SPIRVTTIImpl.

Definition at line 1164 of file TargetTransformInfoImpl.h.

◆ areInlineCompatible()

◆ areTypesABICompatible()

virtual bool llvm::TargetTransformInfoImplBase::areTypesABICompatible ( const Function * Caller,
const Function * Callee,
const ArrayRef< Type * > & Types ) const
inlinevirtual

◆ canHaveNonUndefGlobalInitializerInAddressSpace()

virtual bool llvm::TargetTransformInfoImplBase::canHaveNonUndefGlobalInitializerInAddressSpace ( unsigned AS) const
inlinevirtual

Reimplemented in llvm::GCNTTIImpl, and llvm::NVPTXTTIImpl.

Definition at line 155 of file TargetTransformInfoImpl.h.

◆ canMacroFuseCmp()

virtual bool llvm::TargetTransformInfoImplBase::canMacroFuseCmp ( ) const
inlinevirtual

Reimplemented in llvm::X86TTIImpl.

Definition at line 298 of file TargetTransformInfoImpl.h.

◆ canSaveCmp()

virtual bool llvm::TargetTransformInfoImplBase::canSaveCmp ( Loop * L,
BranchInst ** BI,
ScalarEvolution * SE,
LoopInfo * LI,
DominatorTree * DT,
AssumptionCache * AC,
TargetLibraryInfo * LibInfo ) const
inlinevirtual

Reimplemented in llvm::PPCTTIImpl.

Definition at line 300 of file TargetTransformInfoImpl.h.

◆ collectFlatAddressOperands()

◆ collectKernelLaunchBounds()

virtual void llvm::TargetTransformInfoImplBase::collectKernelLaunchBounds ( const Function & F,
SmallVectorImpl< std::pair< StringRef, int64_t > > & LB ) const
inlinevirtual

Reimplemented in llvm::GCNTTIImpl, and llvm::NVPTXTTIImpl.

Definition at line 1160 of file TargetTransformInfoImpl.h.

References F.

◆ enableAggressiveInterleaving()

virtual bool llvm::TargetTransformInfoImplBase::enableAggressiveInterleaving ( bool LoopHasReductions) const
inlinevirtual

Reimplemented in llvm::HexagonTTIImpl, and llvm::PPCTTIImpl.

Definition at line 475 of file TargetTransformInfoImpl.h.

◆ enableInterleavedAccessVectorization()

virtual bool llvm::TargetTransformInfoImplBase::enableInterleavedAccessVectorization ( ) const
inlinevirtual

◆ enableMaskedInterleavedAccessVectorization()

virtual bool llvm::TargetTransformInfoImplBase::enableMaskedInterleavedAccessVectorization ( ) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl, and llvm::RISCVTTIImpl.

Definition at line 501 of file TargetTransformInfoImpl.h.

◆ enableMemCmpExpansion()

virtual TTI::MemCmpExpansionOptions llvm::TargetTransformInfoImplBase::enableMemCmpExpansion ( bool OptSize,
bool IsZeroCmp ) const
inlinevirtual

◆ enableOrderedReductions()

virtual bool llvm::TargetTransformInfoImplBase::enableOrderedReductions ( ) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl, and llvm::RISCVTTIImpl.

Definition at line 388 of file TargetTransformInfoImpl.h.

◆ enableScalableVectorization()

virtual bool llvm::TargetTransformInfoImplBase::enableScalableVectorization ( ) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl, and llvm::RISCVTTIImpl.

Definition at line 1125 of file TargetTransformInfoImpl.h.

◆ enableSelectOptimize()

virtual bool llvm::TargetTransformInfoImplBase::enableSelectOptimize ( ) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl.

Definition at line 484 of file TargetTransformInfoImpl.h.

◆ enableWritePrefetching()

◆ forceScalarizeMaskedGather()

virtual bool llvm::TargetTransformInfoImplBase::forceScalarizeMaskedGather ( VectorType * DataType,
Align Alignment ) const
inlinevirtual

Reimplemented in llvm::ARMTTIImpl, llvm::RISCVTTIImpl, and llvm::X86TTIImpl.

Definition at line 348 of file TargetTransformInfoImpl.h.

◆ forceScalarizeMaskedScatter()

virtual bool llvm::TargetTransformInfoImplBase::forceScalarizeMaskedScatter ( VectorType * DataType,
Align Alignment ) const
inlinevirtual

Reimplemented in llvm::ARMTTIImpl, llvm::RISCVTTIImpl, and llvm::X86TTIImpl.

Definition at line 353 of file TargetTransformInfoImpl.h.

◆ getAddressComputationCost()

◆ getAltInstrCost()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getAltInstrCost ( VectorType * VecTy,
unsigned Opcode0,
unsigned Opcode1,
const SmallBitVector & OpcodeMask,
TTI::TargetCostKind CostKind ) const
inlinevirtual

Reimplemented in llvm::X86TTIImpl.

Definition at line 704 of file TargetTransformInfoImpl.h.

References CostKind, and llvm::InstructionCost::getInvalid().

◆ getArithmeticInstrCost()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getArithmeticInstrCost ( unsigned Opcode,
Type * Ty,
TTI::TargetCostKind CostKind,
TTI::OperandValueInfo Opd1Info,
TTI::OperandValueInfo Opd2Info,
ArrayRef< const Value * > Args,
const Instruction * CxtI = nullptr ) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl, llvm::ARMTTIImpl, llvm::BasicTTIImplBase< T >, llvm::BasicTTIImplBase< AArch64TTIImpl >, llvm::BasicTTIImplBase< AMDGPUTTIImpl >, llvm::BasicTTIImplBase< ARCTTIImpl >, llvm::BasicTTIImplBase< ARMTTIImpl >, llvm::BasicTTIImplBase< AVRTTIImpl >, llvm::BasicTTIImplBase< BasicTTIImpl >, llvm::BasicTTIImplBase< BPFTTIImpl >, llvm::BasicTTIImplBase< DirectXTTIImpl >, llvm::BasicTTIImplBase< GCNTTIImpl >, llvm::BasicTTIImplBase< HexagonTTIImpl >, llvm::BasicTTIImplBase< LanaiTTIImpl >, llvm::BasicTTIImplBase< LoongArchTTIImpl >, llvm::BasicTTIImplBase< MipsTTIImpl >, llvm::BasicTTIImplBase< NVPTXTTIImpl >, llvm::BasicTTIImplBase< PPCTTIImpl >, llvm::BasicTTIImplBase< R600TTIImpl >, llvm::BasicTTIImplBase< RISCVTTIImpl >, llvm::BasicTTIImplBase< SPIRVTTIImpl >, llvm::BasicTTIImplBase< SystemZTTIImpl >, llvm::BasicTTIImplBase< VETTIImpl >, llvm::BasicTTIImplBase< WebAssemblyTTIImpl >, llvm::BasicTTIImplBase< X86TTIImpl >, llvm::BasicTTIImplBase< XCoreTTIImpl >, llvm::BPFTTIImpl, llvm::GCNTTIImpl, llvm::HexagonTTIImpl, llvm::LanaiTTIImpl, llvm::NVPTXTTIImpl, llvm::PPCTTIImpl, llvm::RISCVTTIImpl, llvm::SystemZTTIImpl, llvm::WebAssemblyTTIImpl, and llvm::X86TTIImpl.

Definition at line 664 of file TargetTransformInfoImpl.h.

References llvm::any_of(), CostKind, llvm::dyn_cast(), II, llvm::TargetTransformInfo::TCC_Expensive, llvm::TargetTransformInfo::TCC_Free, and llvm::TargetTransformInfo::TCK_Latency.

Referenced by llvm::TargetTransformInfoImplCRTPBase< T >::getPointersChainCost().

◆ getArithmeticReductionCost()

◆ getAssumedAddrSpace()

◆ getAtomicMemIntrinsicMaxElementSize()

virtual unsigned llvm::TargetTransformInfoImplBase::getAtomicMemIntrinsicMaxElementSize ( ) const
inlinevirtual

Reimplemented in llvm::X86TTIImpl.

Definition at line 989 of file TargetTransformInfoImpl.h.

◆ getBranchMispredictPenalty()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getBranchMispredictPenalty ( ) const
inlinevirtual

Reimplemented in llvm::X86TTIImpl.

Definition at line 128 of file TargetTransformInfoImpl.h.

◆ getCacheAssociativity()

◆ getCacheLineSize()

◆ getCacheSize()

◆ getCallerAllocaCost()

◆ getCallInstrCost()

◆ getCastInstrCost()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getCastInstrCost ( unsigned Opcode,
Type * Dst,
Type * Src,
TTI::CastContextHint CCH,
TTI::TargetCostKind CostKind,
const Instruction * I ) const
inlinevirtual

◆ getCFInstrCost()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getCFInstrCost ( unsigned Opcode,
TTI::TargetCostKind CostKind,
const Instruction * I = nullptr ) const
inlinevirtual

◆ getCmpSelInstrCost()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getCmpSelInstrCost ( unsigned Opcode,
Type * ValTy,
Type * CondTy,
CmpInst::Predicate VecPred,
TTI::TargetCostKind CostKind,
TTI::OperandValueInfo Op1Info,
TTI::OperandValueInfo Op2Info,
const Instruction * I ) const
inlinevirtual

◆ getConstantStrideStep()

const SCEVConstant * llvm::TargetTransformInfoImplBase::getConstantStrideStep ( ScalarEvolution * SE,
const SCEV * Ptr ) const
inlineprotected

◆ getCostOfKeepingLiveOverCall()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getCostOfKeepingLiveOverCall ( ArrayRef< Type * > Tys) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl, and llvm::RISCVTTIImpl.

Definition at line 980 of file TargetTransformInfoImpl.h.

◆ getDataLayout()

◆ getEpilogueVectorizationMinVF()

◆ getEstimatedNumberOfCaseClusters()

◆ getExpandCompressMemoryOpCost()

◆ getExtendedReductionCost()

◆ getExtractWithExtendCost()

◆ getFeatureMask()

virtual APInt llvm::TargetTransformInfoImplBase::getFeatureMask ( const Function & F) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl.

Definition at line 1145 of file TargetTransformInfoImpl.h.

References F, and llvm::APInt::getZero().

◆ getFlatAddressSpace()

◆ getFPOpCost()

◆ getGatherScatterOpCost()

◆ getGEPCost()

◆ getGISelRematGlobalCost()

virtual unsigned llvm::TargetTransformInfoImplBase::getGISelRematGlobalCost ( ) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl.

Definition at line 1119 of file TargetTransformInfoImpl.h.

◆ getIndexedVectorInstrCostFromEnd()

◆ getInlineCallPenalty()

virtual unsigned llvm::TargetTransformInfoImplBase::getInlineCallPenalty ( const Function * F,
const CallBase & Call,
unsigned DefaultCallPenalty ) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl.

Definition at line 1032 of file TargetTransformInfoImpl.h.

References Call, and F.

◆ getInlinerVectorBonusPercent()

◆ getInliningCostBenefitAnalysisProfitableMultiplier()

virtual unsigned llvm::TargetTransformInfoImplBase::getInliningCostBenefitAnalysisProfitableMultiplier ( ) const
inlinevirtual

Definition at line 94 of file TargetTransformInfoImpl.h.

◆ getInliningCostBenefitAnalysisSavingsMultiplier()

virtual unsigned llvm::TargetTransformInfoImplBase::getInliningCostBenefitAnalysisSavingsMultiplier ( ) const
inlinevirtual

Definition at line 91 of file TargetTransformInfoImpl.h.

◆ getInliningLastCallToStaticBonus()

virtual int llvm::TargetTransformInfoImplBase::getInliningLastCallToStaticBonus ( ) const
inlinevirtual

Reimplemented in llvm::GCNTTIImpl.

Definition at line 97 of file TargetTransformInfoImpl.h.

Referenced by llvm::GCNTTIImpl::getInliningLastCallToStaticBonus().

◆ getInliningThresholdMultiplier()

◆ getInsertExtractValueCost()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getInsertExtractValueCost ( unsigned Opcode,
TTI::TargetCostKind CostKind ) const
inlinevirtual

◆ getInstructionCost()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getInstructionCost ( const User * U,
ArrayRef< const Value * > Operands,
TTI::TargetCostKind CostKind ) const
inlinevirtual

◆ getInterleavedMemoryOpCost()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getInterleavedMemoryOpCost ( unsigned Opcode,
Type * VecTy,
unsigned Factor,
ArrayRef< unsigned > Indices,
Align Alignment,
unsigned AddressSpace,
TTI::TargetCostKind CostKind,
bool UseMaskForCond,
bool UseMaskForGaps ) const
inlinevirtual

◆ getIntImmCodeSizeCost()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getIntImmCodeSizeCost ( unsigned Opcode,
unsigned Idx,
const APInt & Imm,
Type * Ty ) const
inlinevirtual

Reimplemented in llvm::ARMTTIImpl.

Definition at line 532 of file TargetTransformInfoImpl.h.

◆ getIntImmCost()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getIntImmCost ( const APInt & Imm,
Type * Ty,
TTI::TargetCostKind CostKind ) const
inlinevirtual

◆ getIntImmCostInst()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getIntImmCostInst ( unsigned Opcode,
unsigned Idx,
const APInt & Imm,
Type * Ty,
TTI::TargetCostKind CostKind,
Instruction * Inst = nullptr ) const
inlinevirtual

◆ getIntImmCostIntrin()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getIntImmCostIntrin ( Intrinsic::ID IID,
unsigned Idx,
const APInt & Imm,
Type * Ty,
TTI::TargetCostKind CostKind ) const
inlinevirtual

◆ getIntrinsicInstrCost()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getIntrinsicInstrCost ( const IntrinsicCostAttributes & ICA,
TTI::TargetCostKind CostKind ) const
inlinevirtual

◆ getLoadStoreVecRegBitWidth()

virtual unsigned llvm::TargetTransformInfoImplBase::getLoadStoreVecRegBitWidth ( unsigned AddrSpace) const
inlinevirtual

◆ getLoadVectorFactor()

virtual unsigned llvm::TargetTransformInfoImplBase::getLoadVectorFactor ( unsigned VF,
unsigned LoadSize,
unsigned ChainSizeInBytes,
VectorType * VecTy ) const
inlinevirtual

Reimplemented in llvm::GCNTTIImpl.

Definition at line 1083 of file TargetTransformInfoImpl.h.

◆ getMaskedMemoryOpCost()

◆ getMaximumVF()

virtual unsigned llvm::TargetTransformInfoImplBase::getMaximumVF ( unsigned ElemWidth,
unsigned Opcode ) const
inlinevirtual

Reimplemented in llvm::GCNTTIImpl, and llvm::RISCVTTIImpl.

Definition at line 604 of file TargetTransformInfoImpl.h.

◆ getMaxInterleaveFactor()

◆ getMaxMemIntrinsicInlineSizeThreshold()

virtual uint64_t llvm::TargetTransformInfoImplBase::getMaxMemIntrinsicInlineSizeThreshold ( ) const
inlinevirtual

◆ getMaxNumArgs()

virtual unsigned llvm::TargetTransformInfoImplBase::getMaxNumArgs ( ) const
inlinevirtual

Reimplemented in llvm::BPFTTIImpl.

Definition at line 1153 of file TargetTransformInfoImpl.h.

◆ getMaxPrefetchIterationsAhead()

◆ getMaxVScale()

◆ getMemcpyCost()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getMemcpyCost ( const Instruction * I) const
inlinevirtual

Reimplemented in llvm::ARMTTIImpl.

Definition at line 112 of file TargetTransformInfoImpl.h.

References I, and llvm::TargetTransformInfo::TCC_Expensive.

◆ getMemcpyLoopLoweringType()

virtual Type * llvm::TargetTransformInfoImplBase::getMemcpyLoopLoweringType ( LLVMContext & Context,
Value * Length,
unsigned SrcAddrSpace,
unsigned DestAddrSpace,
Align SrcAlign,
Align DestAlign,
std::optional< uint32_t > AtomicElementSize ) const
inlinevirtual

Reimplemented in llvm::GCNTTIImpl.

Definition at line 1005 of file TargetTransformInfoImpl.h.

References llvm::Type::getInt8Ty(), llvm::Type::getIntNTy(), and llvm::Length.

◆ getMemcpyLoopResidualLoweringType()

virtual void llvm::TargetTransformInfoImplBase::getMemcpyLoopResidualLoweringType ( SmallVectorImpl< Type * > & OpsOut,
LLVMContext & Context,
unsigned RemainingBytes,
unsigned SrcAddrSpace,
unsigned DestAddrSpace,
Align SrcAlign,
Align DestAlign,
std::optional< uint32_t > AtomicCpySize ) const
inlinevirtual

◆ getMemoryOpCost()

◆ getMinimumVF()

virtual ElementCount llvm::TargetTransformInfoImplBase::getMinimumVF ( unsigned ElemWidth,
bool IsScalable ) const
inlinevirtual

Reimplemented in llvm::HexagonTTIImpl.

Definition at line 600 of file TargetTransformInfoImpl.h.

References llvm::ElementCount::get().

◆ getMinMaxReductionCost()

◆ getMinPageSize()

virtual std::optional< unsigned > llvm::TargetTransformInfoImplBase::getMinPageSize ( ) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl, and llvm::RISCVTTIImpl.

Definition at line 641 of file TargetTransformInfoImpl.h.

◆ getMinPrefetchStride()

◆ getMinTripCountTailFoldingThreshold()

virtual unsigned llvm::TargetTransformInfoImplBase::getMinTripCountTailFoldingThreshold ( ) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl, and llvm::RISCVTTIImpl.

Definition at line 1121 of file TargetTransformInfoImpl.h.

◆ getMinVectorRegisterBitWidth()

virtual unsigned llvm::TargetTransformInfoImplBase::getMinVectorRegisterBitWidth ( ) const
inlinevirtual

◆ getMulAccReductionCost()

◆ getNumberOfParts()

◆ getNumberOfRegisters()

◆ getNumBytesToPadGlobalArray()

virtual unsigned llvm::TargetTransformInfoImplBase::getNumBytesToPadGlobalArray ( unsigned Size,
Type * ArrayType ) const
inlinevirtual

Reimplemented in llvm::ARMTTIImpl.

Definition at line 1155 of file TargetTransformInfoImpl.h.

References Size.

◆ getOperandsScalarizationOverhead()

◆ getOrCreateResultFromMemIntrinsic()

virtual Value * llvm::TargetTransformInfoImplBase::getOrCreateResultFromMemIntrinsic ( IntrinsicInst * Inst,
Type * ExpectedType,
bool CanCreate = true ) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl.

Definition at line 999 of file TargetTransformInfoImpl.h.

◆ getPartialReductionCost()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getPartialReductionCost ( unsigned Opcode,
Type * InputTypeA,
Type * InputTypeB,
Type * AccumType,
ElementCount VF,
TTI::PartialReductionExtendKind OpAExtend,
TTI::PartialReductionExtendKind OpBExtend,
std::optional< unsigned > BinOp,
TTI::TargetCostKind CostKind ) const
inlinevirtual

◆ getPeelingPreferences()

◆ getPointersChainCost()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getPointersChainCost ( ArrayRef< const Value * > Ptrs,
const Value * Base,
const TTI::PointersChainInfo & Info,
Type * AccessTy,
TTI::TargetCostKind CostKind ) const
inlinevirtual

◆ getPopcntSupport()

◆ getPredicatedAddrSpace()

◆ getPredictableBranchThreshold()

virtual BranchProbability llvm::TargetTransformInfoImplBase::getPredictableBranchThreshold ( ) const
inlinevirtual

Definition at line 124 of file TargetTransformInfoImpl.h.

◆ getPreferredAddressingMode()

virtual TTI::AddressingModeKind llvm::TargetTransformInfoImplBase::getPreferredAddressingMode ( const Loop * L,
ScalarEvolution * SE ) const
inlinevirtual

◆ getPreferredExpandedReductionShuffle()

virtual TTI::ReductionShuffle llvm::TargetTransformInfoImplBase::getPreferredExpandedReductionShuffle ( const IntrinsicInst * II) const
inlinevirtual

Reimplemented in llvm::WebAssemblyTTIImpl.

Definition at line 1115 of file TargetTransformInfoImpl.h.

References II, and llvm::TargetTransformInfo::SplitHalf.

◆ getPreferredTailFoldingStyle()

◆ getPrefetchDistance()

◆ getRegisterBitWidth()

virtual TypeSize llvm::TargetTransformInfoImplBase::getRegisterBitWidth ( TargetTransformInfo::RegisterKind K) const
inlinevirtual

◆ getRegisterClassForType()

virtual unsigned llvm::TargetTransformInfoImplBase::getRegisterClassForType ( bool Vector,
Type * Ty = nullptr ) const
inlinevirtual

◆ getRegisterClassName()

virtual const char * llvm::TargetTransformInfoImplBase::getRegisterClassName ( unsigned ClassID) const
inlinevirtual

Reimplemented in llvm::LoongArchTTIImpl, llvm::PPCTTIImpl, and llvm::RISCVTTIImpl.

Definition at line 571 of file TargetTransformInfoImpl.h.

◆ getRegUsageForType()

◆ getReplicationShuffleCost()

◆ getScalarizationOverhead()

◆ getScalingFactorCost()

◆ getShuffleCost()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getShuffleCost ( TTI::ShuffleKind Kind,
VectorType * DstTy,
VectorType * SrcTy,
ArrayRef< int > Mask,
TTI::TargetCostKind CostKind,
int Index,
VectorType * SubTp,
ArrayRef< const Value * > Args = {},
const Instruction * CxtI = nullptr ) const
inlinevirtual

◆ getStoreMinimumVF()

◆ getStoreVectorFactor()

virtual unsigned llvm::TargetTransformInfoImplBase::getStoreVectorFactor ( unsigned VF,
unsigned StoreSize,
unsigned ChainSizeInBytes,
VectorType * VecTy ) const
inlinevirtual

Reimplemented in llvm::GCNTTIImpl.

Definition at line 1089 of file TargetTransformInfoImpl.h.

◆ getStridedMemoryOpCost()

◆ getTgtMemIntrinsic()

virtual bool llvm::TargetTransformInfoImplBase::getTgtMemIntrinsic ( IntrinsicInst * Inst,
MemIntrinsicInfo & Info ) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl, llvm::GCNTTIImpl, and llvm::PPCTTIImpl.

Definition at line 984 of file TargetTransformInfoImpl.h.

References Info.

◆ getUnrollingPreferences()

◆ getVectorInstrCost() [1/3]

◆ getVectorInstrCost() [2/3]

◆ getVectorInstrCost() [3/3]

virtual InstructionCost llvm::TargetTransformInfoImplBase::getVectorInstrCost ( unsigned Opcode,
Type * Val,
TTI::TargetCostKind CostKind,
unsigned Index,
Value * Scalar,
ArrayRef< std::tuple< Value *, User *, int > > ScalarUserAndIdx ) const
inlinevirtual
Parameters
ScalarUserAndIdxencodes the information about extracts from a vector with 'Scalar' being the value being extracted,'User' being the user of the extract(nullptr if user is not known before vectorization) and 'Idx' being the extract lane.

Reimplemented in llvm::AArch64TTIImpl, llvm::ARMTTIImpl, llvm::BasicTTIImplBase< T >, llvm::BasicTTIImplBase< AArch64TTIImpl >, llvm::BasicTTIImplBase< AMDGPUTTIImpl >, llvm::BasicTTIImplBase< ARCTTIImpl >, llvm::BasicTTIImplBase< ARMTTIImpl >, llvm::BasicTTIImplBase< AVRTTIImpl >, llvm::BasicTTIImplBase< BasicTTIImpl >, llvm::BasicTTIImplBase< BPFTTIImpl >, llvm::BasicTTIImplBase< DirectXTTIImpl >, llvm::BasicTTIImplBase< GCNTTIImpl >, llvm::BasicTTIImplBase< HexagonTTIImpl >, llvm::BasicTTIImplBase< LanaiTTIImpl >, llvm::BasicTTIImplBase< LoongArchTTIImpl >, llvm::BasicTTIImplBase< MipsTTIImpl >, llvm::BasicTTIImplBase< NVPTXTTIImpl >, llvm::BasicTTIImplBase< PPCTTIImpl >, llvm::BasicTTIImplBase< R600TTIImpl >, llvm::BasicTTIImplBase< RISCVTTIImpl >, llvm::BasicTTIImplBase< SPIRVTTIImpl >, llvm::BasicTTIImplBase< SystemZTTIImpl >, llvm::BasicTTIImplBase< VETTIImpl >, llvm::BasicTTIImplBase< WebAssemblyTTIImpl >, llvm::BasicTTIImplBase< X86TTIImpl >, llvm::BasicTTIImplBase< XCoreTTIImpl >, llvm::GCNTTIImpl, llvm::HexagonTTIImpl, llvm::PPCTTIImpl, llvm::R600TTIImpl, llvm::RISCVTTIImpl, llvm::SystemZTTIImpl, llvm::WebAssemblyTTIImpl, and llvm::X86TTIImpl.

Definition at line 798 of file TargetTransformInfoImpl.h.

References CostKind.

◆ getVPLegalizationStrategy()

virtual TargetTransformInfo::VPLegalization llvm::TargetTransformInfoImplBase::getVPLegalizationStrategy ( const VPIntrinsic & PI) const
inlinevirtual

◆ getVPMemoryOpCost()

virtual InstructionCost llvm::TargetTransformInfoImplBase::getVPMemoryOpCost ( unsigned Opcode,
Type * Src,
Align Alignment,
unsigned AddressSpace,
TTI::TargetCostKind CostKind,
const Instruction * I ) const
inlinevirtual

Definition at line 844 of file TargetTransformInfoImpl.h.

References CostKind, and I.

◆ getVScaleForTuning()

◆ hasActiveVectorLength()

virtual bool llvm::TargetTransformInfoImplBase::hasActiveVectorLength ( ) const
inlinevirtual

Reimplemented in llvm::RISCVTTIImpl.

Definition at line 1127 of file TargetTransformInfoImpl.h.

◆ hasArmWideBranch()

virtual bool llvm::TargetTransformInfoImplBase::hasArmWideBranch ( bool ) const
inlinevirtual

Reimplemented in llvm::ARMTTIImpl.

Definition at line 1143 of file TargetTransformInfoImpl.h.

◆ hasBranchDivergence()

◆ hasConditionalLoadStoreForType()

virtual bool llvm::TargetTransformInfoImplBase::hasConditionalLoadStoreForType ( Type * Ty,
bool IsStore ) const
inlinevirtual

Reimplemented in llvm::X86TTIImpl.

Definition at line 562 of file TargetTransformInfoImpl.h.

◆ hasDivRemOp()

virtual bool llvm::TargetTransformInfoImplBase::hasDivRemOp ( Type * DataType,
bool IsSigned ) const
inlinevirtual

Reimplemented in llvm::MipsTTIImpl, llvm::SystemZTTIImpl, and llvm::X86TTIImpl.

Definition at line 390 of file TargetTransformInfoImpl.h.

◆ hasVolatileVariant()

virtual bool llvm::TargetTransformInfoImplBase::hasVolatileVariant ( Instruction * I,
unsigned AddrSpace ) const
inlinevirtual

Reimplemented in llvm::NVPTXTTIImpl.

Definition at line 394 of file TargetTransformInfoImpl.h.

References I.

◆ haveFastSqrt()

◆ instCombineIntrinsic()

◆ isAlwaysUniform()

◆ isConstantStridedAccessLessThan()

bool llvm::TargetTransformInfoImplBase::isConstantStridedAccessLessThan ( ScalarEvolution * SE,
const SCEV * Ptr,
int64_t MergeDistance ) const
inlineprotected

◆ isElementTypeLegalForScalableVector()

virtual bool llvm::TargetTransformInfoImplBase::isElementTypeLegalForScalableVector ( Type * Ty) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl, and llvm::RISCVTTIImpl.

Definition at line 1079 of file TargetTransformInfoImpl.h.

◆ isExpensiveToSpeculativelyExecute()

virtual bool llvm::TargetTransformInfoImplBase::isExpensiveToSpeculativelyExecute ( const Instruction * I) const
inlinevirtual

◆ isFCmpOrdCheaperThanFCmpZero()

◆ isFPVectorizationPotentiallyUnsafe()

virtual bool llvm::TargetTransformInfoImplBase::isFPVectorizationPotentiallyUnsafe ( ) const
inlinevirtual

Reimplemented in llvm::ARMTTIImpl.

Definition at line 505 of file TargetTransformInfoImpl.h.

◆ isHardwareLoopProfitable()

◆ isIndexedLoadLegal()

◆ isIndexedStoreLegal()

◆ isLegalAddImmediate()

◆ isLegalAddressingMode()

◆ isLegalAddScalableImmediate()

◆ isLegalAltInstr()

virtual bool llvm::TargetTransformInfoImplBase::isLegalAltInstr ( VectorType * VecTy,
unsigned Opcode0,
unsigned Opcode1,
const SmallBitVector & OpcodeMask ) const
inlinevirtual

Reimplemented in llvm::X86TTIImpl.

Definition at line 363 of file TargetTransformInfoImpl.h.

◆ isLegalBroadcastLoad()

virtual bool llvm::TargetTransformInfoImplBase::isLegalBroadcastLoad ( Type * ElementTy,
ElementCount NumElements ) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl, and llvm::X86TTIImpl.

Definition at line 335 of file TargetTransformInfoImpl.h.

◆ isLegalICmpImmediate()

◆ isLegalInterleavedAccessType()

virtual bool llvm::TargetTransformInfoImplBase::isLegalInterleavedAccessType ( VectorType * VTy,
unsigned Factor,
Align Alignment,
unsigned AddrSpace ) const
inlinevirtual

Reimplemented in llvm::RISCVTTIImpl.

Definition at line 377 of file TargetTransformInfoImpl.h.

◆ isLegalMaskedCompressStore()

virtual bool llvm::TargetTransformInfoImplBase::isLegalMaskedCompressStore ( Type * DataType,
Align Alignment ) const
inlinevirtual

Reimplemented in llvm::RISCVTTIImpl, and llvm::X86TTIImpl.

Definition at line 358 of file TargetTransformInfoImpl.h.

◆ isLegalMaskedExpandLoad()

virtual bool llvm::TargetTransformInfoImplBase::isLegalMaskedExpandLoad ( Type * DataType,
Align Alignment ) const
inlinevirtual

Reimplemented in llvm::RISCVTTIImpl, and llvm::X86TTIImpl.

Definition at line 369 of file TargetTransformInfoImpl.h.

◆ isLegalMaskedGather()

virtual bool llvm::TargetTransformInfoImplBase::isLegalMaskedGather ( Type * DataType,
Align Alignment ) const
inlinevirtual

◆ isLegalMaskedLoad()

virtual bool llvm::TargetTransformInfoImplBase::isLegalMaskedLoad ( Type * DataType,
Align Alignment,
unsigned AddressSpace ) const
inlinevirtual

◆ isLegalMaskedScatter()

virtual bool llvm::TargetTransformInfoImplBase::isLegalMaskedScatter ( Type * DataType,
Align Alignment ) const
inlinevirtual

◆ isLegalMaskedStore()

virtual bool llvm::TargetTransformInfoImplBase::isLegalMaskedStore ( Type * DataType,
Align Alignment,
unsigned AddressSpace ) const
inlinevirtual

◆ isLegalMaskedVectorHistogram()

virtual bool llvm::TargetTransformInfoImplBase::isLegalMaskedVectorHistogram ( Type * AddrType,
Type * DataType ) const
inlinevirtual

Definition at line 383 of file TargetTransformInfoImpl.h.

◆ isLegalNTLoad()

virtual bool llvm::TargetTransformInfoImplBase::isLegalNTLoad ( Type * DataType,
Align Alignment ) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl, and llvm::X86TTIImpl.

Definition at line 328 of file TargetTransformInfoImpl.h.

References llvm::DataSize, DL, and llvm::isPowerOf2_32().

Referenced by llvm::AArch64TTIImpl::isLegalNTLoad().

◆ isLegalNTStore()

virtual bool llvm::TargetTransformInfoImplBase::isLegalNTStore ( Type * DataType,
Align Alignment ) const
inlinevirtual

◆ isLegalStridedLoadStore()

virtual bool llvm::TargetTransformInfoImplBase::isLegalStridedLoadStore ( Type * DataType,
Align Alignment ) const
inlinevirtual

Reimplemented in llvm::RISCVTTIImpl.

Definition at line 373 of file TargetTransformInfoImpl.h.

◆ isLegalToVectorizeLoad()

virtual bool llvm::TargetTransformInfoImplBase::isLegalToVectorizeLoad ( LoadInst * LI) const
inlinevirtual

Definition at line 1058 of file TargetTransformInfoImpl.h.

◆ isLegalToVectorizeLoadChain()

virtual bool llvm::TargetTransformInfoImplBase::isLegalToVectorizeLoadChain ( unsigned ChainSizeInBytes,
Align Alignment,
unsigned AddrSpace ) const
inlinevirtual

Reimplemented in llvm::GCNTTIImpl, llvm::NVPTXTTIImpl, and llvm::R600TTIImpl.

Definition at line 1062 of file TargetTransformInfoImpl.h.

◆ isLegalToVectorizeReduction()

virtual bool llvm::TargetTransformInfoImplBase::isLegalToVectorizeReduction ( const RecurrenceDescriptor & RdxDesc,
ElementCount VF ) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl, and llvm::RISCVTTIImpl.

Definition at line 1074 of file TargetTransformInfoImpl.h.

◆ isLegalToVectorizeStore()

virtual bool llvm::TargetTransformInfoImplBase::isLegalToVectorizeStore ( StoreInst * SI) const
inlinevirtual

Definition at line 1060 of file TargetTransformInfoImpl.h.

◆ isLegalToVectorizeStoreChain()

virtual bool llvm::TargetTransformInfoImplBase::isLegalToVectorizeStoreChain ( unsigned ChainSizeInBytes,
Align Alignment,
unsigned AddrSpace ) const
inlinevirtual

Reimplemented in llvm::GCNTTIImpl, llvm::NVPTXTTIImpl, and llvm::R600TTIImpl.

Definition at line 1068 of file TargetTransformInfoImpl.h.

◆ isLoweredToCall()

◆ isLSRCostLess()

virtual bool llvm::TargetTransformInfoImplBase::isLSRCostLess ( const TTI::LSRCost & C1,
const TTI::LSRCost & C2 ) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl, llvm::AVRTTIImpl, llvm::BasicTTIImplBase< T >, llvm::BasicTTIImplBase< AArch64TTIImpl >, llvm::BasicTTIImplBase< AMDGPUTTIImpl >, llvm::BasicTTIImplBase< ARCTTIImpl >, llvm::BasicTTIImplBase< ARMTTIImpl >, llvm::BasicTTIImplBase< AVRTTIImpl >, llvm::BasicTTIImplBase< BasicTTIImpl >, llvm::BasicTTIImplBase< BPFTTIImpl >, llvm::BasicTTIImplBase< DirectXTTIImpl >, llvm::BasicTTIImplBase< GCNTTIImpl >, llvm::BasicTTIImplBase< HexagonTTIImpl >, llvm::BasicTTIImplBase< LanaiTTIImpl >, llvm::BasicTTIImplBase< LoongArchTTIImpl >, llvm::BasicTTIImplBase< MipsTTIImpl >, llvm::BasicTTIImplBase< NVPTXTTIImpl >, llvm::BasicTTIImplBase< PPCTTIImpl >, llvm::BasicTTIImplBase< R600TTIImpl >, llvm::BasicTTIImplBase< RISCVTTIImpl >, llvm::BasicTTIImplBase< SPIRVTTIImpl >, llvm::BasicTTIImplBase< SystemZTTIImpl >, llvm::BasicTTIImplBase< VETTIImpl >, llvm::BasicTTIImplBase< WebAssemblyTTIImpl >, llvm::BasicTTIImplBase< X86TTIImpl >, llvm::BasicTTIImplBase< XCoreTTIImpl >, llvm::MipsTTIImpl, llvm::PPCTTIImpl, llvm::RISCVTTIImpl, llvm::SystemZTTIImpl, and llvm::X86TTIImpl.

Definition at line 282 of file TargetTransformInfoImpl.h.

References llvm::TargetTransformInfo::LSRCost::AddRecCost, llvm::TargetTransformInfo::LSRCost::ImmCost, llvm::TargetTransformInfo::LSRCost::NumBaseAdds, llvm::TargetTransformInfo::LSRCost::NumIVMuls, llvm::TargetTransformInfo::LSRCost::NumRegs, llvm::TargetTransformInfo::LSRCost::ScaleCost, and llvm::TargetTransformInfo::LSRCost::SetupCost.

Referenced by llvm::AArch64TTIImpl::isLSRCostLess(), llvm::BasicTTIImplBase< BasicTTIImpl >::isLSRCostLess(), and llvm::PPCTTIImpl::isLSRCostLess().

◆ isMultiversionedFunction()

virtual bool llvm::TargetTransformInfoImplBase::isMultiversionedFunction ( const Function & F) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl.

Definition at line 1149 of file TargetTransformInfoImpl.h.

References F.

◆ isNoopAddrSpaceCast()

◆ isNumRegsMajorCostOfLSR()

◆ isProfitableLSRChainElement()

◆ isProfitableToHoist()

◆ isProfitableToSinkOperands()

virtual bool llvm::TargetTransformInfoImplBase::isProfitableToSinkOperands ( Instruction * I,
SmallVectorImpl< Use * > & Ops ) const
inlinevirtual

◆ isSingleThreaded()

◆ isSourceOfDivergence()

◆ isStridedAccess()

bool llvm::TargetTransformInfoImplBase::isStridedAccess ( const SCEV * Ptr) const
inlineprotected

◆ isTargetIntrinsicTriviallyScalarizable()

◆ isTargetIntrinsicWithOverloadTypeAtArg()

◆ isTargetIntrinsicWithScalarOpAtArg()

◆ isTargetIntrinsicWithStructReturnOverloadAtField()

◆ isTruncateFree()

◆ isTypeLegal()

◆ isValidAddrSpaceCast()

◆ isVectorShiftByScalarCheap()

virtual bool llvm::TargetTransformInfoImplBase::isVectorShiftByScalarCheap ( Type * Ty) const
inlinevirtual

Reimplemented in llvm::X86TTIImpl.

Definition at line 1134 of file TargetTransformInfoImpl.h.

◆ isVScaleKnownToBeAPowerOfTwo()

◆ LSRWithInstrQueries()

virtual bool llvm::TargetTransformInfoImplBase::LSRWithInstrQueries ( ) const
inlinevirtual

Reimplemented in llvm::SystemZTTIImpl.

Definition at line 412 of file TargetTransformInfoImpl.h.

◆ minRequiredElementSize()

unsigned llvm::TargetTransformInfoImplBase::minRequiredElementSize ( const Value * Val,
bool & isSigned ) const
inlineprotected

◆ preferAlternateOpcodeVectorization()

virtual bool llvm::TargetTransformInfoImplBase::preferAlternateOpcodeVectorization ( ) const
inlinevirtual

Reimplemented in llvm::RISCVTTIImpl, and llvm::X86TTIImpl.

Definition at line 1102 of file TargetTransformInfoImpl.h.

◆ preferEpilogueVectorization()

virtual bool llvm::TargetTransformInfoImplBase::preferEpilogueVectorization ( ) const
inlinevirtual

Reimplemented in llvm::RISCVTTIImpl.

Definition at line 1106 of file TargetTransformInfoImpl.h.

◆ preferFixedOverScalableIfEqualCost()

virtual bool llvm::TargetTransformInfoImplBase::preferFixedOverScalableIfEqualCost ( bool IsEpilogue) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl.

Definition at line 1095 of file TargetTransformInfoImpl.h.

◆ preferInLoopReduction()

virtual bool llvm::TargetTransformInfoImplBase::preferInLoopReduction ( RecurKind Kind,
Type * Ty ) const
inlinevirtual

Reimplemented in llvm::ARMTTIImpl.

Definition at line 1099 of file TargetTransformInfoImpl.h.

◆ preferPredicatedReductionSelect()

virtual bool llvm::TargetTransformInfoImplBase::preferPredicatedReductionSelect ( ) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl, and llvm::ARMTTIImpl.

Definition at line 1104 of file TargetTransformInfoImpl.h.

◆ preferPredicateOverEpilogue()

◆ prefersVectorizedAddressing()

virtual bool llvm::TargetTransformInfoImplBase::prefersVectorizedAddressing ( ) const
inlinevirtual

◆ preferToKeepConstantsAttached()

◆ rewriteIntrinsicWithAddressSpace()

◆ shouldBuildLookupTables()

◆ shouldBuildLookupTablesForConstant()

virtual bool llvm::TargetTransformInfoImplBase::shouldBuildLookupTablesForConstant ( Constant * C) const
inlinevirtual

Reimplemented in llvm::ARMTTIImpl.

Definition at line 426 of file TargetTransformInfoImpl.h.

References llvm::CallingConv::C.

◆ shouldBuildRelLookupTables()

◆ shouldConsiderAddressTypePromotion()

virtual bool llvm::TargetTransformInfoImplBase::shouldConsiderAddressTypePromotion ( const Instruction & I,
bool & AllowPromotionWithoutCommonHeader ) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl, and llvm::RISCVTTIImpl.

Definition at line 611 of file TargetTransformInfoImpl.h.

References I.

◆ shouldConsiderVectorizationRegPressure()

virtual bool llvm::TargetTransformInfoImplBase::shouldConsiderVectorizationRegPressure ( ) const
inlinevirtual

Reimplemented in llvm::RISCVTTIImpl.

Definition at line 1108 of file TargetTransformInfoImpl.h.

◆ shouldDropLSRSolutionIfLessProfitable()

◆ shouldExpandReduction()

virtual bool llvm::TargetTransformInfoImplBase::shouldExpandReduction ( const IntrinsicInst * II) const
inlinevirtual

◆ shouldMaximizeVectorBandwidth()

virtual bool llvm::TargetTransformInfoImplBase::shouldMaximizeVectorBandwidth ( TargetTransformInfo::RegisterKind K) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl, and llvm::HexagonTTIImpl.

Definition at line 596 of file TargetTransformInfoImpl.h.

◆ shouldPrefetchAddressSpace()

◆ shouldTreatInstructionLikeSelect()

◆ simplifyDemandedUseBitsIntrinsic()

◆ simplifyDemandedVectorEltsIntrinsic()

virtual std::optional< Value * > llvm::TargetTransformInfoImplBase::simplifyDemandedVectorEltsIntrinsic ( InstCombiner & IC,
IntrinsicInst & II,
APInt DemandedElts,
APInt & UndefElts,
APInt & UndefElts2,
APInt & UndefElts3,
std::function< void(Instruction *, unsigned, APInt, APInt &)> SimplifyAndSetOp ) const
inlinevirtual

◆ supportsEfficientVectorElementLoadStore()

virtual bool llvm::TargetTransformInfoImplBase::supportsEfficientVectorElementLoadStore ( ) const
inlinevirtual

Reimplemented in llvm::HexagonTTIImpl, llvm::SystemZTTIImpl, and llvm::X86TTIImpl.

Definition at line 467 of file TargetTransformInfoImpl.h.

◆ supportsScalableVectors()

virtual bool llvm::TargetTransformInfoImplBase::supportsScalableVectors ( ) const
inlinevirtual

Reimplemented in llvm::AArch64TTIImpl, and llvm::RISCVTTIImpl.

Definition at line 1123 of file TargetTransformInfoImpl.h.

◆ supportsTailCallFor()

virtual bool llvm::TargetTransformInfoImplBase::supportsTailCallFor ( const CallBase * CB) const
inlinevirtual

Reimplemented in llvm::PPCTTIImpl, and llvm::TargetTransformInfoImplCRTPBase< T >.

Definition at line 471 of file TargetTransformInfoImpl.h.

References llvm_unreachable.

◆ supportsTailCalls()

virtual bool llvm::TargetTransformInfoImplBase::supportsTailCalls ( ) const
inlinevirtual

◆ useAA()

◆ useColdCCForColdCall()

virtual bool llvm::TargetTransformInfoImplBase::useColdCCForColdCall ( Function & F) const
inlinevirtual

Reimplemented in llvm::PPCTTIImpl.

Definition at line 432 of file TargetTransformInfoImpl.h.

References F.

Member Data Documentation

◆ DL


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