class TargetTransformInfo::Model

Declaration

template <typename T>
class TargetTransformInfo::Model : public Concept { /* full declaration omitted */ };

Description

The template model for the base class which wraps a concrete implementation in a type erased interface.

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

Inherits from: TargetTransformInfo::Concept

Templates

T

Member Variables

private T Impl

Method Overview

Inherited from TargetTransformInfo::Concept:

Methods

bool LSRWithInstrQueries()

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

Model<T>(T Impl)

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

Parameters

T Impl

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

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

Parameters

const llvm::CallBase* CB

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

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

Parameters

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

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

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

Parameters

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

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

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

Parameters

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

bool canHaveNonUndefGlobalInitializerInAddressSpace(
    unsigned int AS) const

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

Parameters

unsigned int AS

bool canMacroFuseCmp()

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

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:1995

Parameters

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

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

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

Parameters

SmallVectorImpl<int>& OpIndexes
Intrinsic::ID IID

llvm::PredicationStyle emitGetActiveLaneMask()

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

bool enableAggressiveInterleaving(
    bool LoopHasReductions)

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

Parameters

bool LoopHasReductions

bool enableInterleavedAccessVectorization()

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

bool enableMaskedInterleavedAccessVectorization()

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

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

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

Parameters

bool OptSize
bool IsZeroCmp

bool enableOrderedReductions()

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

bool enableScalableVectorization() const

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

bool enableWritePrefetching() const

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

Returns

True if prefetching should also be done for writes.

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

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

Parameters

llvm::VectorType* DataType
llvm::Align Alignment

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

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

Parameters

llvm::VectorType* DataType
llvm::Align Alignment

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

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

Parameters

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

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:2248

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

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

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

Parameters

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

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

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

Parameters

const llvm::Value* V

unsigned int getAtomicMemIntrinsicMaxElementSize()
    const

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

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

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

Parameters

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

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

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

Parameters

llvm::TargetTransformInfo::CacheLevel Level

unsigned int getCacheLineSize() const

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

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

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

Parameters

llvm::TargetTransformInfo::CacheLevel Level

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

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

Parameters

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

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:2263

Parameters

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

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:2278

Parameters

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

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

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

Parameters

ArrayRef<llvm::Type*> Tys

const llvm::DataLayout& getDataLayout() const

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

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

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

Parameters

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

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:2342

Parameters

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

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

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

Parameters

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

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

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

Parameters

llvm::Type* Ty

unsigned int getFlatAddressSpace()

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

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

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

Parameters

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

unsigned int getGISelRematGlobalCost() const

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

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:2316

Parameters

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

int getInlinerVectorBonusPercent()

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

unsigned int getInliningThresholdMultiplier()

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

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

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

Parameters

const llvm::Instruction* I

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

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

Parameters

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

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

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

Parameters

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

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:2149

Parameters

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

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:2155

Parameters

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

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,
    bool UseMaskForGaps)

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

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
bool UseMaskForGaps

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

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

Parameters

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

unsigned int getLoadStoreVecRegBitWidth(
    unsigned int AddrSpace) const

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

Parameters

unsigned int AddrSpace

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

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

Parameters

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

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:2309

Parameters

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

unsigned int getMaxInterleaveFactor(
    unsigned int VF)

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

Parameters

unsigned int VF

unsigned int getMaxPrefetchIterationsAhead() const

Description

Return the maximum prefetch distance in terms of loop iterations.

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

Optional<unsigned int> getMaxVScale() const

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

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

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

Parameters

unsigned int ElemWidth
unsigned int Opcode

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

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

Parameters

const llvm::Instruction* I

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:2378

Parameters

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

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:2386

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

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:2295

Parameters

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

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

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

Parameters

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

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

Description

Return the minimum stride necessary to trigger software prefetching.

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

Parameters

unsigned int NumMemAccesses
unsigned int NumStridedMemAccesses
unsigned int NumPrefetches
bool HasCall

unsigned int getMinTripCountTailFoldingThreshold()
    const

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

unsigned int getMinVectorRegisterBitWidth() const

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

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

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

Parameters

unsigned int ElemWidth
bool IsScalable

unsigned int getNumberOfParts(llvm::Type* Tp)

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

Parameters

llvm::Type* Tp

unsigned int getNumberOfRegisters(
    unsigned int ClassID) const

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

Parameters

unsigned int ClassID

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

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

Parameters

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

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

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

Parameters

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

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

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

Parameters

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

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

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

Parameters

unsigned int IntTyWidthInBit

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

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

Parameters

const llvm::Value* V

llvm::BranchProbability
getPredictableBranchThreshold()

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

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

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

Parameters

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

unsigned int getPrefetchDistance() const

Description

Return the preferred prefetch distance in terms of instructions.

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

unsigned int getRegUsageForType(llvm::Type* Ty)

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

Parameters

llvm::Type* Ty

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

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

Parameters

llvm::TargetTransformInfo::RegisterKind K

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

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

Parameters

bool Vector
llvm::Type* Ty = nullptr

const char* getRegisterClassName(
    unsigned int ClassID) const

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

Parameters

unsigned int ClassID

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:2289

Parameters

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

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

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

Parameters

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

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:2057

Parameters

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

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:2257

Parameters

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

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

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

Parameters

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

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

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

Parameters

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

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

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

Parameters

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

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

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

Parameters

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

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

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

Parameters

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

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

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

Parameters

const llvm::VPIntrinsic& PI

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:2302

Parameters

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

Optional<unsigned int> getVScaleForTuning() const

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

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

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

Parameters

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

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

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

Parameters

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

bool hasBranchDivergence()

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

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

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

Parameters

llvm::Type* DataType
bool IsSigned

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

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

Parameters

llvm::Instruction* I
unsigned int AddrSpace

bool haveFastSqrt(llvm::Type* Ty)

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

Parameters

llvm::Type* Ty

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

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

Parameters

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

bool isAlwaysUniform(const llvm::Value* V)

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

Parameters

const llvm::Value* V

bool isElementTypeLegalForScalableVector(
    llvm::Type* Ty) const

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

Parameters

llvm::Type* Ty

bool isFCmpOrdCheaperThanFCmpZero(llvm::Type* Ty)

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

Parameters

llvm::Type* Ty

bool isFPVectorizationPotentiallyUnsafe()

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

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:1938

Parameters

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

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

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

Parameters

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

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

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

Parameters

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

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

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

Parameters

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

bool isLegalAddImmediate(int64_t Imm)

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

Parameters

int64_t Imm

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:1978

Parameters

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

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

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

Parameters

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

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

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

Parameters

llvm::Type* ElementTy
llvm::ElementCount NumElements

bool isLegalICmpImmediate(int64_t Imm)

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

Parameters

int64_t Imm

bool isLegalMaskedCompressStore(
    llvm::Type* DataType)

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

Parameters

llvm::Type* DataType

bool isLegalMaskedExpandLoad(llvm::Type* DataType)

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

Parameters

llvm::Type* DataType

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

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

Parameters

llvm::Type* DataType
llvm::Align Alignment

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

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

Parameters

llvm::Type* DataType
llvm::Align Alignment

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

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

Parameters

llvm::Type* DataType
llvm::Align Alignment

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

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

Parameters

llvm::Type* DataType
llvm::Align Alignment

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

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

Parameters

llvm::Type* DataType
llvm::Align Alignment

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

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

Parameters

llvm::Type* DataType
llvm::Align Alignment

bool isLegalToVectorizeLoad(
    llvm::LoadInst* LI) const

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

Parameters

llvm::LoadInst* LI

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

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

Parameters

unsigned int ChainSizeInBytes
llvm::Align Alignment
unsigned int AddrSpace

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

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

Parameters

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

bool isLegalToVectorizeStore(
    llvm::StoreInst* SI) const

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

Parameters

llvm::StoreInst* SI

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

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

Parameters

unsigned int ChainSizeInBytes
llvm::Align Alignment
unsigned int AddrSpace

bool isLoweredToCall(const llvm::Function* F)

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

Parameters

const llvm::Function* F

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

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

Parameters

unsigned int FromAS
unsigned int ToAS

bool isNumRegsMajorCostOfLSR()

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

bool isProfitableLSRChainElement(
    llvm::Instruction* I)

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

Parameters

llvm::Instruction* I

bool isProfitableToHoist(llvm::Instruction* I)

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

Parameters

llvm::Instruction* I

bool isSourceOfDivergence(const llvm::Value* V)

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

Parameters

const llvm::Value* V

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

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

Parameters

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

bool isTypeLegal(llvm::Type* Ty)

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

Parameters

llvm::Type* Ty

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

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

Parameters

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

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:1943

Parameters

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

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

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

Parameters

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

bool prefersVectorizedAddressing()

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

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

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

Parameters

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

bool shouldBuildLookupTables()

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

bool shouldBuildLookupTablesForConstant(
    llvm::Constant* C)

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

Parameters

llvm::Constant* C

bool shouldBuildRelLookupTables()

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

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

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

Parameters

const llvm::Instruction& I
bool& AllowPromotionWithoutCommonHeader

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

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

Parameters

const llvm::IntrinsicInst* II

bool shouldMaximizeVectorBandwidth(
    TargetTransformInfo::RegisterKind K) const

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

Parameters

TargetTransformInfo::RegisterKind K

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:1957

Parameters

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

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:1963

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

bool supportsEfficientVectorElementLoadStore()

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

bool supportsScalableVectors() const

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

bool supportsTailCalls()

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

bool useAA()

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

bool useColdCCForColdCall(llvm::Function& F)

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

Parameters

llvm::Function& F

bool useGPUDivergenceAnalysis()

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

~Model<T>()

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