class TargetTransformInfo::Concept

Declaration

class TargetTransformInfo::Concept { /* full declaration omitted */ };

Description

The abstract base class used to type erase specific TTI implementations.

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1518

Method Overview

  • public virtual bool LSRWithInstrQueries()
  • public virtual unsigned int adjustInliningThreshold(const llvm::CallBase * CB)
  • public virtual bool allowsMisalignedMemoryAccesses(llvm::LLVMContext & Context, unsigned int BitWidth, unsigned int AddressSpace, llvm::Align Alignment, bool * Fast)
  • public virtual bool areInlineCompatible(const llvm::Function * Caller, const llvm::Function * Callee) const
  • public virtual bool areTypesABICompatible(const llvm::Function * Caller, const llvm::Function * Callee, const ArrayRef<llvm::Type *> & Types) const
  • public virtual bool canHaveNonUndefGlobalInitializerInAddressSpace(unsigned int AS) const
  • public virtual bool canMacroFuseCmp()
  • public virtual bool canSaveCmp(llvm::Loop * L, llvm::BranchInst ** BI, llvm::ScalarEvolution * SE, llvm::LoopInfo * LI, llvm::DominatorTree * DT, llvm::AssumptionCache * AC, llvm::TargetLibraryInfo * LibInfo)
  • public virtual bool collectFlatAddressOperands(SmallVectorImpl<int> & OpIndexes, Intrinsic::ID IID) const
  • public virtual llvm::PredicationStyle emitGetActiveLaneMask()
  • public virtual bool enableAggressiveInterleaving(bool LoopHasReductions)
  • public virtual bool enableInterleavedAccessVectorization()
  • public virtual bool enableMaskedInterleavedAccessVectorization()
  • public virtual llvm::TargetTransformInfo::MemCmpExpansionOptions enableMemCmpExpansion(bool OptSize, bool IsZeroCmp) const
  • public virtual bool enableOrderedReductions()
  • public virtual bool enableScalableVectorization() const
  • public virtual bool enableWritePrefetching() const
  • public virtual bool forceScalarizeMaskedGather(llvm::VectorType * DataType, llvm::Align Alignment)
  • public virtual bool forceScalarizeMaskedScatter(llvm::VectorType * DataType, llvm::Align Alignment)
  • public virtual llvm::InstructionCost getAddressComputationCost(llvm::Type * Ty, llvm::ScalarEvolution * SE, const llvm::SCEV * Ptr)
  • public virtual llvm::InstructionCost getArithmeticInstrCost(unsigned int Opcode, llvm::Type * Ty, TTI::TargetCostKind CostKind, llvm::TargetTransformInfo::OperandValueKind Opd1Info, llvm::TargetTransformInfo::OperandValueKind Opd2Info, llvm::TargetTransformInfo::OperandValueProperties Opd1PropInfo, llvm::TargetTransformInfo::OperandValueProperties Opd2PropInfo, ArrayRef<const llvm::Value *> Args, const llvm::Instruction * CxtI = nullptr)
  • public virtual llvm::InstructionCost getArithmeticReductionCost(unsigned int Opcode, llvm::VectorType * Ty, Optional<llvm::FastMathFlags> FMF, TTI::TargetCostKind CostKind)
  • public virtual unsigned int getAssumedAddrSpace(const llvm::Value * V) const
  • public virtual unsigned int getAtomicMemIntrinsicMaxElementSize() const
  • public virtual llvm::InstructionCost getCFInstrCost(unsigned int Opcode, TTI::TargetCostKind CostKind, const llvm::Instruction * I = nullptr)
  • public virtual Optional<unsigned int> getCacheAssociativity(llvm::TargetTransformInfo::CacheLevel Level) const
  • public virtual unsigned int getCacheLineSize() const
  • public virtual Optional<unsigned int> getCacheSize(llvm::TargetTransformInfo::CacheLevel Level) const
  • public virtual llvm::InstructionCost getCallInstrCost(llvm::Function * F, llvm::Type * RetTy, ArrayRef<llvm::Type *> Tys, TTI::TargetCostKind CostKind)
  • public virtual llvm::InstructionCost getCastInstrCost(unsigned int Opcode, llvm::Type * Dst, llvm::Type * Src, llvm::TargetTransformInfo::CastContextHint CCH, TTI::TargetCostKind CostKind, const llvm::Instruction * I)
  • public virtual llvm::InstructionCost getCmpSelInstrCost(unsigned int Opcode, llvm::Type * ValTy, llvm::Type * CondTy, CmpInst::Predicate VecPred, TTI::TargetCostKind CostKind, const llvm::Instruction * I)
  • public virtual llvm::InstructionCost getCostOfKeepingLiveOverCall(ArrayRef<llvm::Type *> Tys)
  • public virtual const llvm::DataLayout & getDataLayout() const
  • public virtual unsigned int getEstimatedNumberOfCaseClusters(const llvm::SwitchInst & SI, unsigned int & JTSize, llvm::ProfileSummaryInfo * PSI, llvm::BlockFrequencyInfo * BFI)
  • public virtual llvm::InstructionCost getExtendedAddReductionCost(bool IsMLA, bool IsUnsigned, llvm::Type * ResTy, llvm::VectorType * Ty, TTI::TargetCostKind CostKind = TargetTransformInfo::TCK_RecipThroughput)
  • public virtual llvm::InstructionCost getExtractWithExtendCost(unsigned int Opcode, llvm::Type * Dst, llvm::VectorType * VecTy, unsigned int Index)
  • public virtual llvm::InstructionCost getFPOpCost(llvm::Type * Ty)
  • public virtual unsigned int getFlatAddressSpace()
  • public virtual llvm::InstructionCost getGEPCost(llvm::Type * PointeeType, const llvm::Value * Ptr, ArrayRef<const llvm::Value *> Operands, TTI::TargetCostKind CostKind)
  • public virtual unsigned int getGISelRematGlobalCost() const
  • public virtual llvm::InstructionCost getGatherScatterOpCost(unsigned int Opcode, llvm::Type * DataTy, const llvm::Value * Ptr, bool VariableMask, llvm::Align Alignment, TTI::TargetCostKind CostKind, const llvm::Instruction * I = nullptr)
  • public virtual int getInlinerVectorBonusPercent()
  • public virtual unsigned int getInliningThresholdMultiplier()
  • public virtual llvm::InstructionCost getInstructionLatency(const llvm::Instruction * I)
  • public virtual llvm::InstructionCost getIntImmCodeSizeCost(unsigned int Opc, unsigned int Idx, const llvm::APInt & Imm, llvm::Type * Ty)
  • public virtual llvm::InstructionCost getIntImmCost(const llvm::APInt & Imm, llvm::Type * Ty, llvm::TargetTransformInfo::TargetCostKind CostKind)
  • public virtual llvm::InstructionCost getIntImmCostInst(unsigned int Opc, unsigned int Idx, const llvm::APInt & Imm, llvm::Type * Ty, llvm::TargetTransformInfo::TargetCostKind CostKind, llvm::Instruction * Inst = nullptr)
  • public virtual llvm::InstructionCost getIntImmCostIntrin(Intrinsic::ID IID, unsigned int Idx, const llvm::APInt & Imm, llvm::Type * Ty, llvm::TargetTransformInfo::TargetCostKind CostKind)
  • public virtual llvm::InstructionCost getInterleavedMemoryOpCost(unsigned int Opcode, llvm::Type * VecTy, unsigned int Factor, ArrayRef<unsigned int> Indices, llvm::Align Alignment, unsigned int AddressSpace, TTI::TargetCostKind CostKind, bool UseMaskForCond = false, bool UseMaskForGaps = false)
  • public virtual llvm::InstructionCost getIntrinsicInstrCost(const llvm::IntrinsicCostAttributes & ICA, TTI::TargetCostKind CostKind)
  • public virtual unsigned int getLoadStoreVecRegBitWidth(unsigned int AddrSpace) const
  • public virtual unsigned int getLoadVectorFactor(unsigned int VF, unsigned int LoadSize, unsigned int ChainSizeInBytes, llvm::VectorType * VecTy) const
  • public virtual llvm::InstructionCost getMaskedMemoryOpCost(unsigned int Opcode, llvm::Type * Src, llvm::Align Alignment, unsigned int AddressSpace, TTI::TargetCostKind CostKind)
  • public virtual unsigned int getMaxInterleaveFactor(unsigned int VF)
  • public virtual unsigned int getMaxPrefetchIterationsAhead() const
  • public virtual Optional<unsigned int> getMaxVScale() const
  • public virtual unsigned int getMaximumVF(unsigned int ElemWidth, unsigned int Opcode) const
  • public virtual llvm::InstructionCost getMemcpyCost(const llvm::Instruction * I)
  • public virtual llvm::Type * getMemcpyLoopLoweringType(llvm::LLVMContext & Context, llvm::Value * Length, unsigned int SrcAddrSpace, unsigned int DestAddrSpace, unsigned int SrcAlign, unsigned int DestAlign, Optional<uint32_t> AtomicElementSize) const
  • public virtual void getMemcpyLoopResidualLoweringType(SmallVectorImpl<llvm::Type *> & OpsOut, llvm::LLVMContext & Context, unsigned int RemainingBytes, unsigned int SrcAddrSpace, unsigned int DestAddrSpace, unsigned int SrcAlign, unsigned int DestAlign, Optional<uint32_t> AtomicCpySize) const
  • public virtual llvm::InstructionCost getMemoryOpCost(unsigned int Opcode, llvm::Type * Src, llvm::Align Alignment, unsigned int AddressSpace, TTI::TargetCostKind CostKind, const llvm::Instruction * I)
  • public virtual llvm::InstructionCost getMinMaxReductionCost(llvm::VectorType * Ty, llvm::VectorType * CondTy, bool IsUnsigned, TTI::TargetCostKind CostKind)
  • public virtual unsigned int getMinPrefetchStride(unsigned int NumMemAccesses, unsigned int NumStridedMemAccesses, unsigned int NumPrefetches, bool HasCall) const
  • public virtual unsigned int getMinTripCountTailFoldingThreshold() const
  • public virtual unsigned int getMinVectorRegisterBitWidth() const
  • public virtual llvm::ElementCount getMinimumVF(unsigned int ElemWidth, bool IsScalable) const
  • public virtual unsigned int getNumberOfParts(llvm::Type * Tp)
  • public virtual unsigned int getNumberOfRegisters(unsigned int ClassID) const
  • public virtual llvm::InstructionCost getOperandsScalarizationOverhead(ArrayRef<const llvm::Value *> Args, ArrayRef<llvm::Type *> Tys)
  • public virtual llvm::Value * getOrCreateResultFromMemIntrinsic(llvm::IntrinsicInst * Inst, llvm::Type * ExpectedType)
  • public virtual void getPeelingPreferences(llvm::Loop * L, llvm::ScalarEvolution & SE, llvm::TargetTransformInfo::PeelingPreferences & PP)
  • public virtual llvm::TargetTransformInfo::PopcntSupportKind getPopcntSupport(unsigned int IntTyWidthInBit)
  • public virtual std::pair<const Value *, unsigned int> getPredicatedAddrSpace(const llvm::Value * V) const
  • public virtual llvm::BranchProbability getPredictableBranchThreshold()
  • public virtual llvm::TargetTransformInfo::AddressingModeKind getPreferredAddressingMode(const llvm::Loop * L, llvm::ScalarEvolution * SE) const
  • public virtual unsigned int getPrefetchDistance() const
  • public virtual unsigned int getRegUsageForType(llvm::Type * Ty)
  • public virtual llvm::TypeSize getRegisterBitWidth(llvm::TargetTransformInfo::RegisterKind K) const
  • public virtual unsigned int getRegisterClassForType(bool Vector, llvm::Type * Ty = nullptr) const
  • public virtual const char * getRegisterClassName(unsigned int ClassID) const
  • public virtual llvm::InstructionCost getReplicationShuffleCost(llvm::Type * EltTy, int ReplicationFactor, int VF, const llvm::APInt & DemandedDstElts, TTI::TargetCostKind CostKind)
  • public virtual llvm::InstructionCost getScalarizationOverhead(llvm::VectorType * Ty, const llvm::APInt & DemandedElts, bool Insert, bool Extract)
  • public virtual llvm::InstructionCost getScalingFactorCost(llvm::Type * Ty, llvm::GlobalValue * BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned int AddrSpace)
  • public virtual llvm::InstructionCost getShuffleCost(llvm::TargetTransformInfo::ShuffleKind Kind, llvm::VectorType * Tp, ArrayRef<int> Mask, int Index, llvm::VectorType * SubTp, ArrayRef<const llvm::Value *> Args)
  • public virtual unsigned int getStoreMinimumVF(unsigned int VF, llvm::Type * ScalarMemTy, llvm::Type * ScalarValTy) const
  • public virtual unsigned int getStoreVectorFactor(unsigned int VF, unsigned int StoreSize, unsigned int ChainSizeInBytes, llvm::VectorType * VecTy) const
  • public virtual bool getTgtMemIntrinsic(llvm::IntrinsicInst * Inst, llvm::MemIntrinsicInfo & Info)
  • public virtual void getUnrollingPreferences(llvm::Loop * L, llvm::ScalarEvolution &, llvm::TargetTransformInfo::UnrollingPreferences & UP, llvm::OptimizationRemarkEmitter * ORE)
  • public virtual llvm::InstructionCost getUserCost(const llvm::User * U, ArrayRef<const llvm::Value *> Operands, llvm::TargetTransformInfo::TargetCostKind CostKind)
  • public virtual llvm::TargetTransformInfo::VPLegalization getVPLegalizationStrategy(const llvm::VPIntrinsic & PI) const
  • public virtual llvm::InstructionCost getVPMemoryOpCost(unsigned int Opcode, llvm::Type * Src, llvm::Align Alignment, unsigned int AddressSpace, TTI::TargetCostKind CostKind, const llvm::Instruction * I)
  • public virtual Optional<unsigned int> getVScaleForTuning() const
  • public virtual llvm::InstructionCost getVectorInstrCost(unsigned int Opcode, llvm::Type * Val, unsigned int Index)
  • public virtual bool hasActiveVectorLength(unsigned int Opcode, llvm::Type * DataType, llvm::Align Alignment) const
  • public virtual bool hasBranchDivergence()
  • public virtual bool hasDivRemOp(llvm::Type * DataType, bool IsSigned)
  • public virtual bool hasVolatileVariant(llvm::Instruction * I, unsigned int AddrSpace)
  • public virtual bool haveFastSqrt(llvm::Type * Ty)
  • public virtual Optional<llvm::Instruction *> instCombineIntrinsic(llvm::InstCombiner & IC, llvm::IntrinsicInst & II)
  • public virtual bool isAlwaysUniform(const llvm::Value * V)
  • public virtual bool isElementTypeLegalForScalableVector(llvm::Type * Ty) const
  • public virtual bool isFCmpOrdCheaperThanFCmpZero(llvm::Type * Ty)
  • public virtual bool isFPVectorizationPotentiallyUnsafe()
  • public virtual bool isHardwareLoopProfitable(llvm::Loop * L, llvm::ScalarEvolution & SE, llvm::AssumptionCache & AC, llvm::TargetLibraryInfo * LibInfo, llvm::HardwareLoopInfo & HWLoopInfo)
  • public virtual bool isIndexedLoadLegal(llvm::TargetTransformInfo::MemIndexedMode Mode, llvm::Type * Ty) const
  • public virtual bool isIndexedStoreLegal(llvm::TargetTransformInfo::MemIndexedMode Mode, llvm::Type * Ty) const
  • public virtual bool isLSRCostLess(const TargetTransformInfo::LSRCost & C1, const TargetTransformInfo::LSRCost & C2)
  • public virtual bool isLegalAddImmediate(int64_t Imm)
  • public virtual bool isLegalAddressingMode(llvm::Type * Ty, llvm::GlobalValue * BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned int AddrSpace, llvm::Instruction * I)
  • public virtual bool isLegalAltInstr(llvm::VectorType * VecTy, unsigned int Opcode0, unsigned int Opcode1, const llvm::SmallBitVector & OpcodeMask) const
  • public virtual bool isLegalBroadcastLoad(llvm::Type * ElementTy, llvm::ElementCount NumElements) const
  • public virtual bool isLegalICmpImmediate(int64_t Imm)
  • public virtual bool isLegalMaskedCompressStore(llvm::Type * DataType)
  • public virtual bool isLegalMaskedExpandLoad(llvm::Type * DataType)
  • public virtual bool isLegalMaskedGather(llvm::Type * DataType, llvm::Align Alignment)
  • public virtual bool isLegalMaskedLoad(llvm::Type * DataType, llvm::Align Alignment)
  • public virtual bool isLegalMaskedScatter(llvm::Type * DataType, llvm::Align Alignment)
  • public virtual bool isLegalMaskedStore(llvm::Type * DataType, llvm::Align Alignment)
  • public virtual bool isLegalNTLoad(llvm::Type * DataType, llvm::Align Alignment)
  • public virtual bool isLegalNTStore(llvm::Type * DataType, llvm::Align Alignment)
  • public virtual bool isLegalToVectorizeLoad(llvm::LoadInst * LI) const
  • public virtual bool isLegalToVectorizeLoadChain(unsigned int ChainSizeInBytes, llvm::Align Alignment, unsigned int AddrSpace) const
  • public virtual bool isLegalToVectorizeReduction(const llvm::RecurrenceDescriptor & RdxDesc, llvm::ElementCount VF) const
  • public virtual bool isLegalToVectorizeStore(llvm::StoreInst * SI) const
  • public virtual bool isLegalToVectorizeStoreChain(unsigned int ChainSizeInBytes, llvm::Align Alignment, unsigned int AddrSpace) const
  • public virtual bool isLoweredToCall(const llvm::Function * F)
  • public virtual bool isNoopAddrSpaceCast(unsigned int FromAS, unsigned int ToAS) const
  • public virtual bool isNumRegsMajorCostOfLSR()
  • public virtual bool isProfitableLSRChainElement(llvm::Instruction * I)
  • public virtual bool isProfitableToHoist(llvm::Instruction * I)
  • public virtual bool isSourceOfDivergence(const llvm::Value * V)
  • public virtual bool isTruncateFree(llvm::Type * Ty1, llvm::Type * Ty2)
  • public virtual bool isTypeLegal(llvm::Type * Ty)
  • public virtual bool preferInLoopReduction(unsigned int Opcode, llvm::Type * Ty, llvm::TargetTransformInfo::ReductionFlags) const
  • public virtual bool preferPredicateOverEpilogue(llvm::Loop * L, llvm::LoopInfo * LI, llvm::ScalarEvolution & SE, llvm::AssumptionCache & AC, llvm::TargetLibraryInfo * TLI, llvm::DominatorTree * DT, llvm::LoopVectorizationLegality * LVL)
  • public virtual bool preferPredicatedReductionSelect(unsigned int Opcode, llvm::Type * Ty, llvm::TargetTransformInfo::ReductionFlags) const
  • public virtual bool prefersVectorizedAddressing()
  • public virtual llvm::Value * rewriteIntrinsicWithAddressSpace(llvm::IntrinsicInst * II, llvm::Value * OldV, llvm::Value * NewV) const
  • public virtual bool shouldBuildLookupTables()
  • public virtual bool shouldBuildLookupTablesForConstant(llvm::Constant * C)
  • public virtual bool shouldBuildRelLookupTables()
  • public virtual bool shouldConsiderAddressTypePromotion(const llvm::Instruction & I, bool & AllowPromotionWithoutCommonHeader)
  • public virtual bool shouldExpandReduction(const llvm::IntrinsicInst * II) const
  • public virtual bool shouldMaximizeVectorBandwidth(TargetTransformInfo::RegisterKind K) const
  • public virtual Optional<llvm::Value *> simplifyDemandedUseBitsIntrinsic(llvm::InstCombiner & IC, llvm::IntrinsicInst & II, llvm::APInt DemandedMask, llvm::KnownBits & Known, bool & KnownBitsComputed)
  • public virtual Optional<llvm::Value *> simplifyDemandedVectorEltsIntrinsic(llvm::InstCombiner & IC, llvm::IntrinsicInst & II, llvm::APInt DemandedElts, llvm::APInt & UndefElts, llvm::APInt & UndefElts2, llvm::APInt & UndefElts3, std::function<void (Instruction *, unsigned int, APInt, APInt &)> SimplifyAndSetOp)
  • public virtual bool supportsEfficientVectorElementLoadStore()
  • public virtual bool supportsScalableVectors() const
  • public virtual bool supportsTailCalls()
  • public virtual bool useAA()
  • public virtual bool useColdCCForColdCall(llvm::Function & F)
  • public virtual bool useGPUDivergenceAnalysis()
  • public virtual ~Concept()

Methods

virtual bool LSRWithInstrQueries()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1622

virtual unsigned int adjustInliningThreshold(
    const llvm::CallBase* CB)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1526

Parameters

const llvm::CallBase* CB

virtual bool allowsMisalignedMemoryAccesses(
    llvm::LLVMContext& Context,
    unsigned int BitWidth,
    unsigned int AddressSpace,
    llvm::Align Alignment,
    bool* Fast)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1647

Parameters

llvm::LLVMContext& Context
unsigned int BitWidth
unsigned int AddressSpace
llvm::Align Alignment
bool* Fast

virtual bool areInlineCompatible(
    const llvm::Function* Caller,
    const llvm::Function* Callee) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1806

Parameters

const llvm::Function* Caller
const llvm::Function* Callee

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1808

Parameters

const llvm::Function* Caller
const llvm::Function* Callee
const ArrayRef<llvm::Type*>& Types

virtual bool
canHaveNonUndefGlobalInitializerInAddressSpace(
    unsigned int AS) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1546

Parameters

unsigned int AS

virtual bool canMacroFuseCmp()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1591

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1592

Parameters

llvm::Loop* L
llvm::BranchInst** BI
llvm::ScalarEvolution* SE
llvm::LoopInfo* LI
llvm::DominatorTree* DT
llvm::AssumptionCache* AC
llvm::TargetLibraryInfo* LibInfo

virtual bool collectFlatAddressOperands(
    SmallVectorImpl<int>& OpIndexes,
    Intrinsic::ID IID) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1542

Parameters

SmallVectorImpl<int>& OpIndexes
Intrinsic::ID IID

virtual llvm::PredicationStyle
emitGetActiveLaneMask()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1569

virtual bool enableAggressiveInterleaving(
    bool LoopHasReductions)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1641

Parameters

bool LoopHasReductions

virtual bool
enableInterleavedAccessVectorization()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1644

virtual bool
enableMaskedInterleavedAccessVectorization()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1645

virtual llvm::TargetTransformInfo::
    MemCmpExpansionOptions
    enableMemCmpExpansion(bool OptSize,
                          bool IsZeroCmp) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1643

Parameters

bool OptSize
bool IsZeroCmp

virtual bool enableOrderedReductions()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1614

virtual bool enableScalableVectorization() const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1838

virtual bool enableWritePrefetching() const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1710

Returns

True if prefetching should also be done for writes.

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1605

Parameters

llvm::VectorType* DataType
llvm::Align Alignment

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1607

Parameters

llvm::VectorType* DataType
llvm::Align Alignment

virtual llvm::InstructionCost
getAddressComputationCost(
    llvm::Type* Ty,
    llvm::ScalarEvolution* SE,
    const llvm::SCEV* Ptr)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1787

Parameters

llvm::Type* Ty
llvm::ScalarEvolution* SE
const llvm::SCEV* Ptr

virtual llvm::InstructionCost
getArithmeticInstrCost(
    unsigned int Opcode,
    llvm::Type* Ty,
    TTI::TargetCostKind CostKind,
    llvm::TargetTransformInfo::OperandValueKind
        Opd1Info,
    llvm::TargetTransformInfo::OperandValueKind
        Opd2Info,
    llvm::TargetTransformInfo::
        OperandValueProperties Opd1PropInfo,
    llvm::TargetTransformInfo::
        OperandValueProperties Opd2PropInfo,
    ArrayRef<const llvm::Value*> Args,
    const llvm::Instruction* CxtI = nullptr)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1713

Parameters

unsigned int Opcode
llvm::Type* Ty
TTI::TargetCostKind CostKind
llvm::TargetTransformInfo::OperandValueKind Opd1Info
llvm::TargetTransformInfo::OperandValueKind Opd2Info
llvm::TargetTransformInfo::OperandValueProperties Opd1PropInfo
llvm::TargetTransformInfo::OperandValueProperties Opd2PropInfo
ArrayRef<const llvm::Value*> Args
const llvm::Instruction* CxtI = nullptr

virtual llvm::InstructionCost
getArithmeticReductionCost(
    unsigned int Opcode,
    llvm::VectorType* Ty,
    Optional<llvm::FastMathFlags> FMF,
    TTI::TargetCostKind CostKind)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1770

Parameters

unsigned int Opcode
llvm::VectorType* Ty
Optional<llvm::FastMathFlags> FMF
TTI::TargetCostKind CostKind

virtual unsigned int getAssumedAddrSpace(
    const llvm::Value* V) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1547

Parameters

const llvm::Value* V

virtual unsigned int
getAtomicMemIntrinsicMaxElementSize() const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1792

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1729

Parameters

unsigned int Opcode
TTI::TargetCostKind CostKind
const llvm::Instruction* I = nullptr

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1686

Parameters

llvm::TargetTransformInfo::CacheLevel Level

virtual unsigned int getCacheLineSize() const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1684

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1685

Parameters

llvm::TargetTransformInfo::CacheLevel Level

virtual llvm::InstructionCost getCallInstrCost(
    llvm::Function* F,
    llvm::Type* RetTy,
    ArrayRef<llvm::Type*> Tys,
    TTI::TargetCostKind CostKind)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1782

Parameters

llvm::Function* F
llvm::Type* RetTy
ArrayRef<llvm::Type*> Tys
TTI::TargetCostKind CostKind

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1722

Parameters

unsigned int Opcode
llvm::Type* Dst
llvm::Type* Src
llvm::TargetTransformInfo::CastContextHint CCH
TTI::TargetCostKind CostKind
const llvm::Instruction* I

virtual llvm::InstructionCost getCmpSelInstrCost(
    unsigned int Opcode,
    llvm::Type* ValTy,
    llvm::Type* CondTy,
    CmpInst::Predicate VecPred,
    TTI::TargetCostKind CostKind,
    const llvm::Instruction* I)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1732

Parameters

unsigned int Opcode
llvm::Type* ValTy
llvm::Type* CondTy
CmpInst::Predicate VecPred
TTI::TargetCostKind CostKind
const llvm::Instruction* I

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1789

Parameters

ArrayRef<llvm::Type*> Tys

virtual const llvm::DataLayout& getDataLayout()
    const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1521

virtual unsigned int
getEstimatedNumberOfCaseClusters(
    const llvm::SwitchInst& SI,
    unsigned int& JTSize,
    llvm::ProfileSummaryInfo* PSI,
    llvm::BlockFrequencyInfo* BFI)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1530

Parameters

const llvm::SwitchInst& SI
unsigned int& JTSize
llvm::ProfileSummaryInfo* PSI
llvm::BlockFrequencyInfo* BFI

virtual llvm::InstructionCost
getExtendedAddReductionCost(
    bool IsMLA,
    bool IsUnsigned,
    llvm::Type* ResTy,
    llvm::VectorType* Ty,
    TTI::TargetCostKind CostKind =
        TargetTransformInfo::TCK_RecipThroughput)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1776

Parameters

bool IsMLA
bool IsUnsigned
llvm::Type* ResTy
llvm::VectorType* Ty
TTI::TargetCostKind CostKind = TargetTransformInfo::TCK_RecipThroughput

virtual llvm::InstructionCost
getExtractWithExtendCost(unsigned int Opcode,
                         llvm::Type* Dst,
                         llvm::VectorType* VecTy,
                         unsigned int Index)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1726

Parameters

unsigned int Opcode
llvm::Type* Dst
llvm::VectorType* VecTy
unsigned int Index

virtual llvm::InstructionCost getFPOpCost(
    llvm::Type* Ty)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1655

Parameters

llvm::Type* Ty

virtual unsigned int getFlatAddressSpace()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1541

virtual llvm::InstructionCost getGEPCost(
    llvm::Type* PointeeType,
    const llvm::Value* Ptr,
    ArrayRef<const llvm::Value*> Operands,
    TTI::TargetCostKind CostKind)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1522

Parameters

llvm::Type* PointeeType
const llvm::Value* Ptr
ArrayRef<const llvm::Value*> Operands
TTI::TargetCostKind CostKind

virtual unsigned int getGISelRematGlobalCost()
    const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1836

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1760

Parameters

unsigned int Opcode
llvm::Type* DataTy
const llvm::Value* Ptr
bool VariableMask
llvm::Align Alignment
TTI::TargetCostKind CostKind
const llvm::Instruction* I = nullptr

virtual int getInlinerVectorBonusPercent()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1527

virtual unsigned int
getInliningThresholdMultiplier()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1525

virtual llvm::InstructionCost
getInstructionLatency(const llvm::Instruction* I)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1842

Parameters

const llvm::Instruction* I

virtual llvm::InstructionCost
getIntImmCodeSizeCost(unsigned int Opc,
                      unsigned int Idx,
                      const llvm::APInt& Imm,
                      llvm::Type* Ty)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1656

Parameters

unsigned int Opc
unsigned int Idx
const llvm::APInt& Imm
llvm::Type* Ty

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1658

Parameters

const llvm::APInt& Imm
llvm::Type* Ty
llvm::TargetTransformInfo::TargetCostKind CostKind

virtual llvm::InstructionCost getIntImmCostInst(
    unsigned int Opc,
    unsigned int Idx,
    const llvm::APInt& Imm,
    llvm::Type* Ty,
    llvm::TargetTransformInfo::TargetCostKind
        CostKind,
    llvm::Instruction* Inst = nullptr)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1660

Parameters

unsigned int Opc
unsigned int Idx
const llvm::APInt& Imm
llvm::Type* Ty
llvm::TargetTransformInfo::TargetCostKind CostKind
llvm::Instruction* Inst = nullptr

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1664

Parameters

Intrinsic::ID IID
unsigned int Idx
const llvm::APInt& Imm
llvm::Type* Ty
llvm::TargetTransformInfo::TargetCostKind CostKind

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1765

Parameters

unsigned int Opcode
llvm::Type* VecTy
unsigned int Factor
ArrayRef<unsigned int> Indices
llvm::Align Alignment
unsigned int AddressSpace
TTI::TargetCostKind CostKind
bool UseMaskForCond = false
bool UseMaskForGaps = false

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1780

Parameters

const llvm::IntrinsicCostAttributes& ICA
TTI::TargetCostKind CostKind

virtual unsigned int getLoadStoreVecRegBitWidth(
    unsigned int AddrSpace) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1813

Parameters

unsigned int AddrSpace

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1825

Parameters

unsigned int VF
unsigned int LoadSize
unsigned int ChainSizeInBytes
llvm::VectorType* VecTy

virtual llvm::InstructionCost
getMaskedMemoryOpCost(
    unsigned int Opcode,
    llvm::Type* Src,
    llvm::Align Alignment,
    unsigned int AddressSpace,
    TTI::TargetCostKind CostKind)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1756

Parameters

unsigned int Opcode
llvm::Type* Src
llvm::Align Alignment
unsigned int AddressSpace
TTI::TargetCostKind CostKind

virtual unsigned int getMaxInterleaveFactor(
    unsigned int VF)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1712

Parameters

unsigned int VF

virtual unsigned int
getMaxPrefetchIterationsAhead() const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1707

Returns

The maximum number of iterations to prefetch ahead. If the required number of iterations is more than this number, no prefetching is performed.

virtual Optional<unsigned int> getMaxVScale()
    const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1673

virtual unsigned int getMaximumVF(
    unsigned int ElemWidth,
    unsigned int Opcode) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1679

Parameters

unsigned int ElemWidth
unsigned int Opcode

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1528

Parameters

const llvm::Instruction* I

virtual llvm::Type* getMemcpyLoopLoweringType(
    llvm::LLVMContext& Context,
    llvm::Value* Length,
    unsigned int SrcAddrSpace,
    unsigned int DestAddrSpace,
    unsigned int SrcAlign,
    unsigned int DestAlign,
    Optional<uint32_t> AtomicElementSize) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1796

Parameters

llvm::LLVMContext& Context
llvm::Value* Length
unsigned int SrcAddrSpace
unsigned int DestAddrSpace
unsigned int SrcAlign
unsigned int DestAlign
Optional<uint32_t> AtomicElementSize

virtual void getMemcpyLoopResidualLoweringType(
    SmallVectorImpl<llvm::Type*>& OpsOut,
    llvm::LLVMContext& Context,
    unsigned int RemainingBytes,
    unsigned int SrcAddrSpace,
    unsigned int DestAddrSpace,
    unsigned int SrcAlign,
    unsigned int DestAlign,
    Optional<uint32_t> AtomicCpySize) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1801

Parameters

SmallVectorImpl<llvm::Type*>& OpsOut
llvm::LLVMContext& Context
unsigned int RemainingBytes
unsigned int SrcAddrSpace
unsigned int DestAddrSpace
unsigned int SrcAlign
unsigned int DestAlign
Optional<uint32_t> AtomicCpySize

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1745

Parameters

unsigned int Opcode
llvm::Type* Src
llvm::Align Alignment
unsigned int AddressSpace
TTI::TargetCostKind CostKind
const llvm::Instruction* I

virtual llvm::InstructionCost
getMinMaxReductionCost(
    llvm::VectorType* Ty,
    llvm::VectorType* CondTy,
    bool IsUnsigned,
    TTI::TargetCostKind CostKind)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1774

Parameters

llvm::VectorType* Ty
llvm::VectorType* CondTy
bool IsUnsigned
TTI::TargetCostKind CostKind

virtual unsigned int getMinPrefetchStride(
    unsigned int NumMemAccesses,
    unsigned int NumStridedMemAccesses,
    unsigned int NumPrefetches,
    bool HasCall) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1699

Parameters

unsigned int NumMemAccesses
unsigned int NumStridedMemAccesses
unsigned int NumPrefetches
bool HasCall

Returns

Some HW prefetchers can handle accesses up to a certain constant stride. This is the minimum stride in bytes where it makes sense to start adding SW prefetches. The default is 1, i.e. prefetch with any stride. Sometimes prefetching is beneficial even below the HW prefetcher limit, and the arguments provided are meant to serve as a basis for deciding this for a particular loop.

virtual unsigned int
getMinTripCountTailFoldingThreshold() const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1837

virtual unsigned int
getMinVectorRegisterBitWidth() const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1672

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1677

Parameters

unsigned int ElemWidth
bool IsScalable

virtual unsigned int getNumberOfParts(
    llvm::Type* Tp)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1785

Parameters

llvm::Type* Tp

virtual unsigned int getNumberOfRegisters(
    unsigned int ClassID) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1667

Parameters

unsigned int ClassID

virtual llvm::InstructionCost
getOperandsScalarizationOverhead(
    ArrayRef<const llvm::Value*> Args,
    ArrayRef<llvm::Type*> Tys)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1637

Parameters

ArrayRef<const llvm::Value*> Args
ArrayRef<llvm::Type*> Tys

virtual llvm::Value*
getOrCreateResultFromMemIntrinsic(
    llvm::IntrinsicInst* Inst,
    llvm::Type* ExpectedType)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1793

Parameters

llvm::IntrinsicInst* Inst
llvm::Type* ExpectedType

virtual void getPeelingPreferences(
    llvm::Loop* L,
    llvm::ScalarEvolution& SE,
    llvm::TargetTransformInfo::PeelingPreferences&
        PP)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1557

Parameters

llvm::Loop* L
llvm::ScalarEvolution& SE
llvm::TargetTransformInfo::PeelingPreferences& PP

virtual llvm::TargetTransformInfo::
    PopcntSupportKind
    getPopcntSupport(unsigned int IntTyWidthInBit)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1652

Parameters

unsigned int IntTyWidthInBit

virtual std::pair<const Value*, unsigned int>
getPredicatedAddrSpace(const llvm::Value* V) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1549

Parameters

const llvm::Value* V

virtual llvm::BranchProbability
getPredictableBranchThreshold()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1536

virtual llvm::TargetTransformInfo::
    AddressingModeKind
    getPreferredAddressingMode(
        const llvm::Loop* L,
        llvm::ScalarEvolution* SE) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1596

Parameters

const llvm::Loop* L
llvm::ScalarEvolution* SE

virtual unsigned int getPrefetchDistance() const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1691

Returns

How much before a load we should place the prefetch instruction. This is currently measured in number of instructions.

virtual unsigned int getRegUsageForType(
    llvm::Type* Ty)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1627

Parameters

llvm::Type* Ty

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1671

Parameters

llvm::TargetTransformInfo::RegisterKind K

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1668

Parameters

bool Vector
llvm::Type* Ty = nullptr

virtual const char* getRegisterClassName(
    unsigned int ClassID) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1670

Parameters

unsigned int ClassID

virtual llvm::InstructionCost
getReplicationShuffleCost(
    llvm::Type* EltTy,
    int ReplicationFactor,
    int VF,
    const llvm::APInt& DemandedDstElts,
    TTI::TargetCostKind CostKind)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1741

Parameters

llvm::Type* EltTy
int ReplicationFactor
int VF
const llvm::APInt& DemandedDstElts
TTI::TargetCostKind CostKind

virtual llvm::InstructionCost
getScalarizationOverhead(
    llvm::VectorType* Ty,
    const llvm::APInt& DemandedElts,
    bool Insert,
    bool Extract)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1632

Parameters

llvm::VectorType* Ty
const llvm::APInt& DemandedElts
bool Insert
bool Extract

virtual llvm::InstructionCost
getScalingFactorCost(llvm::Type* Ty,
                     llvm::GlobalValue* BaseGV,
                     int64_t BaseOffset,
                     bool HasBaseReg,
                     int64_t Scale,
                     unsigned int AddrSpace)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1618

Parameters

llvm::Type* Ty
llvm::GlobalValue* BaseGV
int64_t BaseOffset
bool HasBaseReg
int64_t Scale
unsigned int AddrSpace

virtual llvm::InstructionCost getShuffleCost(
    llvm::TargetTransformInfo::ShuffleKind Kind,
    llvm::VectorType* Tp,
    ArrayRef<int> Mask,
    int Index,
    llvm::VectorType* SubTp,
    ArrayRef<const llvm::Value*> Args)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1718

Parameters

llvm::TargetTransformInfo::ShuffleKind Kind
llvm::VectorType* Tp
ArrayRef<int> Mask
int Index
llvm::VectorType* SubTp
ArrayRef<const llvm::Value*> Args

virtual unsigned int getStoreMinimumVF(
    unsigned int VF,
    llvm::Type* ScalarMemTy,
    llvm::Type* ScalarValTy) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1680

Parameters

unsigned int VF
llvm::Type* ScalarMemTy
llvm::Type* ScalarValTy

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1828

Parameters

unsigned int VF
unsigned int StoreSize
unsigned int ChainSizeInBytes
llvm::VectorType* VecTy

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1790

Parameters

llvm::IntrinsicInst* Inst
llvm::MemIntrinsicInfo& Info

virtual void getUnrollingPreferences(
    llvm::Loop* L,
    llvm::ScalarEvolution&,
    llvm::TargetTransformInfo::
        UnrollingPreferences& UP,
    llvm::OptimizationRemarkEmitter* ORE)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1554

Parameters

llvm::Loop* L
llvm::ScalarEvolution&
llvm::TargetTransformInfo::UnrollingPreferences& UP
llvm::OptimizationRemarkEmitter* ORE

virtual llvm::InstructionCost getUserCost(
    const llvm::User* U,
    ArrayRef<const llvm::Value*> Operands,
    llvm::TargetTransformInfo::TargetCostKind
        CostKind)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1533

Parameters

const llvm::User* U
ArrayRef<const llvm::Value*> Operands
llvm::TargetTransformInfo::TargetCostKind CostKind

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1844

Parameters

const llvm::VPIntrinsic& PI

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1750

Parameters

unsigned int Opcode
llvm::Type* Src
llvm::Align Alignment
unsigned int AddressSpace
TTI::TargetCostKind CostKind
const llvm::Instruction* I

virtual Optional<unsigned int>
getVScaleForTuning() const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1674

virtual llvm::InstructionCost getVectorInstrCost(
    unsigned int Opcode,
    llvm::Type* Val,
    unsigned int Index)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1737

Parameters

unsigned int Opcode
llvm::Type* Val
unsigned int Index

virtual bool hasActiveVectorLength(
    unsigned int Opcode,
    llvm::Type* DataType,
    llvm::Align Alignment) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1840

Parameters

unsigned int Opcode
llvm::Type* DataType
llvm::Align Alignment

virtual bool hasBranchDivergence()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1537

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1615

Parameters

llvm::Type* DataType
bool IsSigned

virtual bool hasVolatileVariant(
    llvm::Instruction* I,
    unsigned int AddrSpace)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1616

Parameters

llvm::Instruction* I
unsigned int AddrSpace

virtual bool haveFastSqrt(llvm::Type* Ty)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1653

Parameters

llvm::Type* Ty

virtual Optional<llvm::Instruction*>
instCombineIntrinsic(llvm::InstCombiner& IC,
                     llvm::IntrinsicInst& II)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1570

Parameters

llvm::InstCombiner& IC
llvm::IntrinsicInst& II

virtual bool isAlwaysUniform(const llvm::Value* V)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1540

Parameters

const llvm::Value* V

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1824

Parameters

llvm::Type* Ty

virtual bool isFCmpOrdCheaperThanFCmpZero(
    llvm::Type* Ty)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1654

Parameters

llvm::Type* Ty

virtual bool isFPVectorizationPotentiallyUnsafe()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1646

virtual bool isHardwareLoopProfitable(
    llvm::Loop* L,
    llvm::ScalarEvolution& SE,
    llvm::AssumptionCache& AC,
    llvm::TargetLibraryInfo* LibInfo,
    llvm::HardwareLoopInfo& HWLoopInfo)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1559

Parameters

llvm::Loop* L
llvm::ScalarEvolution& SE
llvm::AssumptionCache& AC
llvm::TargetLibraryInfo* LibInfo
llvm::HardwareLoopInfo& HWLoopInfo

virtual bool isIndexedLoadLegal(
    llvm::TargetTransformInfo::MemIndexedMode
        Mode,
    llvm::Type* Ty) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1811

Parameters

llvm::TargetTransformInfo::MemIndexedMode Mode
llvm::Type* Ty

virtual bool isIndexedStoreLegal(
    llvm::TargetTransformInfo::MemIndexedMode
        Mode,
    llvm::Type* Ty) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1812

Parameters

llvm::TargetTransformInfo::MemIndexedMode Mode
llvm::Type* Ty

virtual bool isLSRCostLess(
    const TargetTransformInfo::LSRCost& C1,
    const TargetTransformInfo::LSRCost& C2)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1587

Parameters

const TargetTransformInfo::LSRCost& C1
const TargetTransformInfo::LSRCost& C2

virtual bool isLegalAddImmediate(int64_t Imm)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1581

Parameters

int64_t Imm

virtual bool isLegalAddressingMode(
    llvm::Type* Ty,
    llvm::GlobalValue* BaseGV,
    int64_t BaseOffset,
    bool HasBaseReg,
    int64_t Scale,
    unsigned int AddrSpace,
    llvm::Instruction* I)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1583

Parameters

llvm::Type* Ty
llvm::GlobalValue* BaseGV
int64_t BaseOffset
bool HasBaseReg
int64_t Scale
unsigned int AddrSpace
llvm::Instruction* I

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1611

Parameters

llvm::VectorType* VecTy
unsigned int Opcode0
unsigned int Opcode1
const llvm::SmallBitVector& OpcodeMask

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1601

Parameters

llvm::Type* ElementTy
llvm::ElementCount NumElements

virtual bool isLegalICmpImmediate(int64_t Imm)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1582

Parameters

int64_t Imm

virtual bool isLegalMaskedCompressStore(
    llvm::Type* DataType)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1609

Parameters

llvm::Type* DataType

virtual bool isLegalMaskedExpandLoad(
    llvm::Type* DataType)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1610

Parameters

llvm::Type* DataType

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1604

Parameters

llvm::Type* DataType
llvm::Align Alignment

virtual bool isLegalMaskedLoad(
    llvm::Type* DataType,
    llvm::Align Alignment)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1598

Parameters

llvm::Type* DataType
llvm::Align Alignment

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1603

Parameters

llvm::Type* DataType
llvm::Align Alignment

virtual bool isLegalMaskedStore(
    llvm::Type* DataType,
    llvm::Align Alignment)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1597

Parameters

llvm::Type* DataType
llvm::Align Alignment

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1600

Parameters

llvm::Type* DataType
llvm::Align Alignment

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1599

Parameters

llvm::Type* DataType
llvm::Align Alignment

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1814

Parameters

llvm::LoadInst* LI

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1816

Parameters

unsigned int ChainSizeInBytes
llvm::Align Alignment
unsigned int AddrSpace

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1822

Parameters

const llvm::RecurrenceDescriptor& RdxDesc
llvm::ElementCount VF

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1815

Parameters

llvm::StoreInst* SI

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1819

Parameters

unsigned int ChainSizeInBytes
llvm::Align Alignment
unsigned int AddrSpace

virtual bool isLoweredToCall(
    const llvm::Function* F)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1553

Parameters

const llvm::Function* F

virtual bool isNoopAddrSpaceCast(
    unsigned int FromAS,
    unsigned int ToAS) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1544

Parameters

unsigned int FromAS
unsigned int ToAS

virtual bool isNumRegsMajorCostOfLSR()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1589

virtual bool isProfitableLSRChainElement(
    llvm::Instruction* I)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1590

Parameters

llvm::Instruction* I

virtual bool isProfitableToHoist(
    llvm::Instruction* I)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1624

Parameters

llvm::Instruction* I

virtual bool isSourceOfDivergence(
    const llvm::Value* V)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1539

Parameters

const llvm::Value* V

virtual bool isTruncateFree(llvm::Type* Ty1,
                            llvm::Type* Ty2)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1623

Parameters

llvm::Type* Ty1
llvm::Type* Ty2

virtual bool isTypeLegal(llvm::Type* Ty)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1626

Parameters

llvm::Type* Ty

virtual bool preferInLoopReduction(
    unsigned int Opcode,
    llvm::Type* Ty,
    llvm::TargetTransformInfo::ReductionFlags)
    const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1831

Parameters

unsigned int Opcode
llvm::Type* Ty
llvm::TargetTransformInfo::ReductionFlags

virtual bool preferPredicateOverEpilogue(
    llvm::Loop* L,
    llvm::LoopInfo* LI,
    llvm::ScalarEvolution& SE,
    llvm::AssumptionCache& AC,
    llvm::TargetLibraryInfo* TLI,
    llvm::DominatorTree* DT,
    llvm::LoopVectorizationLegality* LVL)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1563

Parameters

llvm::Loop* L
llvm::LoopInfo* LI
llvm::ScalarEvolution& SE
llvm::AssumptionCache& AC
llvm::TargetLibraryInfo* TLI
llvm::DominatorTree* DT
llvm::LoopVectorizationLegality* LVL

virtual bool preferPredicatedReductionSelect(
    unsigned int Opcode,
    llvm::Type* Ty,
    llvm::TargetTransformInfo::ReductionFlags)
    const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1833

Parameters

unsigned int Opcode
llvm::Type* Ty
llvm::TargetTransformInfo::ReductionFlags

virtual bool prefersVectorizedAddressing()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1617

virtual llvm::Value*
rewriteIntrinsicWithAddressSpace(
    llvm::IntrinsicInst* II,
    llvm::Value* OldV,
    llvm::Value* NewV) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1550

Parameters

llvm::IntrinsicInst* II
llvm::Value* OldV
llvm::Value* NewV

virtual bool shouldBuildLookupTables()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1628

virtual bool shouldBuildLookupTablesForConstant(
    llvm::Constant* C)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1629

Parameters

llvm::Constant* C

virtual bool shouldBuildRelLookupTables()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1630

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1682

Parameters

const llvm::Instruction& I
bool& AllowPromotionWithoutCommonHeader

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1835

Parameters

const llvm::IntrinsicInst* II

virtual bool shouldMaximizeVectorBandwidth(
    TargetTransformInfo::RegisterKind K) const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1676

Parameters

TargetTransformInfo::RegisterKind K

virtual Optional<llvm::Value*>
simplifyDemandedUseBitsIntrinsic(
    llvm::InstCombiner& IC,
    llvm::IntrinsicInst& II,
    llvm::APInt DemandedMask,
    llvm::KnownBits& Known,
    bool& KnownBitsComputed)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1573

Parameters

llvm::InstCombiner& IC
llvm::IntrinsicInst& II
llvm::APInt DemandedMask
llvm::KnownBits& Known
bool& KnownBitsComputed

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

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1576

Parameters

llvm::InstCombiner& IC
llvm::IntrinsicInst& II
llvm::APInt DemandedElts
llvm::APInt& UndefElts
llvm::APInt& UndefElts2
llvm::APInt& UndefElts3
std::function<void(Instruction*, unsigned int, APInt, APInt&)> SimplifyAndSetOp

virtual bool
supportsEfficientVectorElementLoadStore()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1639

virtual bool supportsScalableVectors() const

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1839

virtual bool supportsTailCalls()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1640

virtual bool useAA()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1625

virtual bool useColdCCForColdCall(
    llvm::Function& F)

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1631

Parameters

llvm::Function& F

virtual bool useGPUDivergenceAnalysis()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1538

virtual ~Concept()

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1520