class BasicTTIImplBase

Declaration

template <typename T>
class BasicTTIImplBase { /* full declaration omitted */ };

Description

Base class which can be used to help build a TTI implementation. This class provides as much implementation of the TTI interface as is possible using the target independent parts of the code generator. In order to subclass it, your class must implement a getST() method to return the subtarget, and a getTLI() method to return the target lowering. We need these methods implemented in the derived class so that this class doesn't have to duplicate storage for them.

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:77

Templates

T

Method Overview

  • protected BasicTTIImplBase<T>(const llvm::TargetMachine * TM, const llvm::DataLayout & DL)
  • public bool allowsMisalignedMemoryAccesses(llvm::LLVMContext & Context, unsigned int BitWidth, unsigned int AddressSpace, unsigned int Alignment, bool * Fast) const
  • public bool collectFlatAddressOperands(SmallVectorImpl<int> & OpIndexes, Intrinsic::ID IID) const
  • public unsigned int getAddressComputationCost(llvm::Type * Ty, llvm::ScalarEvolution *, const llvm::SCEV *)
  • public unsigned int getArithmeticInstrCost(unsigned int Opcode, llvm::Type * Ty, TTI::OperandValueKind Opd1Info = TargetTransformInfo::OK_AnyValue, TTI::OperandValueKind Opd2Info = TargetTransformInfo::OK_AnyValue, TTI::OperandValueProperties Opd1PropInfo = TargetTransformInfo::OP_None, TTI::OperandValueProperties Opd2PropInfo = TargetTransformInfo::OP_None, ArrayRef<const llvm::Value *> Args = llvm::ArrayRef<const llvm::Value *>(), const llvm::Instruction * CxtI = nullptr)
  • public unsigned int getArithmeticReductionCost(unsigned int Opcode, llvm::Type * Ty, bool IsPairwise)
  • public unsigned int getCFInstrCost(unsigned int Opcode)
  • public virtual Optional<unsigned int> getCacheAssociativity(TargetTransformInfo::CacheLevel Level) const
  • public virtual unsigned int getCacheLineSize() const
  • public virtual Optional<unsigned int> getCacheSize(TargetTransformInfo::CacheLevel Level) const
  • public unsigned int getCallInstrCost(llvm::Function * F, llvm::Type * RetTy, ArrayRef<llvm::Type *> Tys)
  • public unsigned int getCastInstrCost(unsigned int Opcode, llvm::Type * Dst, llvm::Type * Src, const llvm::Instruction * I = nullptr)
  • public unsigned int getCmpSelInstrCost(unsigned int Opcode, llvm::Type * ValTy, llvm::Type * CondTy, const llvm::Instruction * I)
  • public unsigned int getEstimatedNumberOfCaseClusters(const llvm::SwitchInst & SI, unsigned int & JumpTableSize, llvm::ProfileSummaryInfo * PSI, llvm::BlockFrequencyInfo * BFI)
  • public int getExtCost(const llvm::Instruction * I, const llvm::Value * Src)
  • public unsigned int getExtractWithExtendCost(unsigned int Opcode, llvm::Type * Dst, llvm::VectorType * VecTy, unsigned int Index)
  • public unsigned int getFPOpCost(llvm::Type * Ty)
  • public unsigned int getFlatAddressSpace()
  • public int getGEPCost(llvm::Type * PointeeType, const llvm::Value * Ptr, ArrayRef<const llvm::Value *> Operands)
  • public int getInlinerVectorBonusPercent()
  • public unsigned int getInliningThresholdMultiplier()
  • public int getInstructionLatency(const llvm::Instruction * I)
  • public unsigned int getInterleavedMemoryOpCost(unsigned int Opcode, llvm::Type * VecTy, unsigned int Factor, ArrayRef<unsigned int> Indices, unsigned int Alignment, unsigned int AddressSpace, bool UseMaskForCond = false, bool UseMaskForGaps = false)
  • public unsigned int getIntrinsicCost(Intrinsic::ID IID, llvm::Type * RetTy, ArrayRef<const llvm::Value *> Arguments, const llvm::User * U)
  • public unsigned int getIntrinsicCost(Intrinsic::ID IID, llvm::Type * RetTy, ArrayRef<llvm::Type *> ParamTys, const llvm::User * U)
  • public unsigned int getIntrinsicInstrCost(Intrinsic::ID IID, llvm::Type * RetTy, ArrayRef<llvm::Value *> Args, llvm::FastMathFlags FMF, unsigned int VF = 1)
  • public unsigned int getIntrinsicInstrCost(Intrinsic::ID IID, llvm::Type * RetTy, ArrayRef<llvm::Type *> Tys, llvm::FastMathFlags FMF, unsigned int ScalarizationCostPassed = std::numeric_limits<unsigned int>::max())
  • public unsigned int getMaxInterleaveFactor(unsigned int VF)
  • public virtual unsigned int getMaxPrefetchIterationsAhead() const
  • public unsigned int getMemoryOpCost(unsigned int Opcode, llvm::Type * Src, llvm::MaybeAlign Alignment, unsigned int AddressSpace, const llvm::Instruction * I = nullptr)
  • public unsigned int getMinMaxReductionCost(llvm::Type * Ty, llvm::Type * CondTy, bool IsPairwise, bool)
  • public virtual unsigned int getMinPrefetchStride() const
  • public unsigned int getNumberOfParts(llvm::Type * Tp)
  • public unsigned int getOperandsScalarizationOverhead(ArrayRef<const llvm::Value *> Args, unsigned int VF)
  • public unsigned int getOperationCost(unsigned int Opcode, llvm::Type * Ty, llvm::Type * OpTy)
  • public virtual unsigned int getPrefetchDistance() const
  • public unsigned int getRegisterBitWidth(bool Vector) const
  • public unsigned int getScalarizationOverhead(llvm::Type * Ty, bool Insert, bool Extract)
  • public unsigned int getScalarizationOverhead(llvm::Type * VecTy, ArrayRef<const llvm::Value *> Args)
  • public int getScalingFactorCost(llvm::Type * Ty, llvm::GlobalValue * BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned int AddrSpace)
  • public unsigned int getShuffleCost(TTI::ShuffleKind Kind, llvm::Type * Tp, int Index, llvm::Type * SubTp)
  • public void getUnrollingPreferences(llvm::Loop * L, llvm::ScalarEvolution & SE, TTI::UnrollingPreferences & UP)
  • public unsigned int getVectorInstrCost(unsigned int Opcode, llvm::Type * Val, unsigned int Index)
  • public unsigned int getVectorSplitCost()
  • public bool hasBranchDivergence()
  • public bool haveFastSqrt(llvm::Type * Ty)
  • public bool isAlwaysUniform(const llvm::Value * V)
  • public bool isFCmpOrdCheaperThanFCmpZero(llvm::Type * Ty)
  • public bool isHardwareLoopProfitable(llvm::Loop * L, llvm::ScalarEvolution & SE, llvm::AssumptionCache & AC, llvm::TargetLibraryInfo * LibInfo, llvm::HardwareLoopInfo & HWLoopInfo)
  • public bool isIndexedLoadLegal(TTI::MemIndexedMode M, llvm::Type * Ty, const llvm::DataLayout & DL) const
  • public bool isIndexedStoreLegal(TTI::MemIndexedMode M, llvm::Type * Ty, const llvm::DataLayout & DL) const
  • public bool isLSRCostLess(TTI::LSRCost C1, TTI::LSRCost C2)
  • public bool isLegalAddImmediate(int64_t imm)
  • public bool isLegalAddressingMode(llvm::Type * Ty, llvm::GlobalValue * BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned int AddrSpace, llvm::Instruction * I = nullptr)
  • public bool isLegalICmpImmediate(int64_t imm)
  • public bool isProfitableToHoist(llvm::Instruction * I)
  • public bool isSourceOfDivergence(const llvm::Value * V)
  • public bool isTruncateFree(llvm::Type * Ty1, llvm::Type * Ty2)
  • public bool isTypeLegal(llvm::Type * Ty)
  • public bool preferPredicateOverEpilogue(llvm::Loop * L, llvm::LoopInfo * LI, llvm::ScalarEvolution & SE, llvm::AssumptionCache & AC, llvm::TargetLibraryInfo * TLI, llvm::DominatorTree * DT, const llvm::LoopAccessInfo * LAI)
  • public bool rewriteIntrinsicWithAddressSpace(llvm::IntrinsicInst * II, llvm::Value * OldV, llvm::Value * NewV) const
  • public bool shouldBuildLookupTables()
  • public bool useAA() const
  • protected virtual ~BasicTTIImplBase<T>()

Methods

BasicTTIImplBase<T>(const llvm::TargetMachine* TM,
                    const llvm::DataLayout& DL)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:191

Parameters

const llvm::TargetMachine* TM
const llvm::DataLayout& DL

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

Description

@ {

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:200

Parameters

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

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

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:219

Parameters

SmallVectorImpl<int>& OpIndexes
Intrinsic::ID IID

unsigned int getAddressComputationCost(
    llvm::Type* Ty,
    llvm::ScalarEvolution*,
    const llvm::SCEV*)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1566

Parameters

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

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

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:630

Parameters

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

unsigned int getArithmeticReductionCost(
    unsigned int Opcode,
    llvm::Type* Ty,
    bool IsPairwise)

Description

Try to calculate arithmetic and shuffle op costs for reduction operations. We're assuming that reduction operation are performing the following way: 1. Non-pairwise reduction %val1 = shufflevector <n x t> %val, <n x t> %undef, <n x i32> <i32 n/2, i32 n/2 + 1, ..., i32 n, i32 undef, ..., i32 undef> \ ----------------v-------------/ \ ----------v------------/ n/2 elements n/2 elements %red1 = op <n x t> %val, <n x t> val1 After this operation we have a vector %red1 where only the first n/2 elements are meaningful, the second n/2 elements are undefined and can be dropped. All other operations are actually working with the vector of length n/2, not n, though the real vector length is still n. %val2 = shufflevector <n x t> %red1, <n x t> %undef, <n x i32> <i32 n/4, i32 n/4 + 1, ..., i32 n/2, i32 undef, ..., i32 undef> \ ----------------v-------------/ \ ----------v------------/ n/4 elements 3*n/4 elements %red2 = op <n x t> %red1, <n x t> val2 - working with the vector of length n/2, the resulting vector has length n/4 etc. 2. Pairwise reduction: Everything is the same except for an additional shuffle operation which is used to produce operands for pairwise kind of reductions. %val1 = shufflevector <n x t> %val, <n x t> %undef, <n x i32> <i32 0, i32 2, ..., i32 n-2, i32 undef, ..., i32 undef> \ -------------v----------/ \ ----------v------------/ n/2 elements n/2 elements %val2 = shufflevector <n x t> %val, <n x t> %undef, <n x i32> <i32 1, i32 3, ..., i32 n-1, i32 undef, ..., i32 undef> \ -------------v----------/ \ ----------v------------/ n/2 elements n/2 elements %red1 = op <n x t> %val1, <n x t> val2 Again, the operation is performed on <n x t> vector, but the resulting vector %red1 is <n /2 x t> vector. The cost model should take into account that the actual length of the vector is reduced on each iteration.

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1606

Parameters

unsigned int Opcode
llvm::Type* Ty
bool IsPairwise

unsigned int getCFInstrCost(unsigned int Opcode)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:831

Parameters

unsigned int Opcode

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

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:534

Parameters

TargetTransformInfo::CacheLevel Level

virtual unsigned int getCacheLineSize() const

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:544

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

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:528

Parameters

TargetTransformInfo::CacheLevel Level

unsigned int getCallInstrCost(
    llvm::Function* F,
    llvm::Type* RetTy,
    ArrayRef<llvm::Type*> Tys)

Description

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

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1557

Parameters

llvm::Function* F
Called function, might be nullptr.
llvm::Type* RetTy
Return value types.
ArrayRef<llvm::Type*> Tys
Argument types.

Returns

The cost of Call instruction.

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

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:697

Parameters

unsigned int Opcode
llvm::Type* Dst
llvm::Type* Src
const llvm::Instruction* I = nullptr

unsigned int getCmpSelInstrCost(
    unsigned int Opcode,
    llvm::Type* ValTy,
    llvm::Type* CondTy,
    const llvm::Instruction* I)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:836

Parameters

unsigned int Opcode
llvm::Type* ValTy
llvm::Type* CondTy
const llvm::Instruction* I

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

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:328

Parameters

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

int getExtCost(const llvm::Instruction* I,
               const llvm::Value* Src)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:294

Parameters

const llvm::Instruction* I
const llvm::Value* Src

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

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:823

Parameters

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

unsigned int getFPOpCost(llvm::Type* Ty)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:404

Parameters

llvm::Type* Ty

unsigned int getFlatAddressSpace()

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:214

int getGEPCost(
    llvm::Type* PointeeType,
    const llvm::Value* Ptr,
    ArrayRef<const llvm::Value*> Operands)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:289

Parameters

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

int getInlinerVectorBonusPercent()

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:439

unsigned int getInliningThresholdMultiplier()

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:437

int getInstructionLatency(
    const llvm::Instruction* I)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:520

Parameters

const llvm::Instruction* I

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

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:915

Parameters

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

unsigned int getIntrinsicCost(
    Intrinsic::ID IID,
    llvm::Type* RetTy,
    ArrayRef<const llvm::Value*> Arguments,
    const llvm::User* U)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:306

Parameters

Intrinsic::ID IID
llvm::Type* RetTy
ArrayRef<const llvm::Value*> Arguments
const llvm::User* U

unsigned int getIntrinsicCost(
    Intrinsic::ID IID,
    llvm::Type* RetTy,
    ArrayRef<llvm::Type*> ParamTys,
    const llvm::User* U)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:311

Parameters

Intrinsic::ID IID
llvm::Type* RetTy
ArrayRef<llvm::Type*> ParamTys
const llvm::User* U

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

Description

Get intrinsic cost based on arguments.

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1071

Parameters

Intrinsic::ID IID
llvm::Type* RetTy
ArrayRef<llvm::Value*> Args
llvm::FastMathFlags FMF
unsigned int VF = 1

unsigned int getIntrinsicInstrCost(
    Intrinsic::ID IID,
    llvm::Type* RetTy,
    ArrayRef<llvm::Type*> Tys,
    llvm::FastMathFlags FMF,
    unsigned int ScalarizationCostPassed =
        std::numeric_limits<unsigned int>::max())

Description

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

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1179

Parameters

Intrinsic::ID IID
llvm::Type* RetTy
ArrayRef<llvm::Type*> Tys
llvm::FastMathFlags FMF
unsigned int ScalarizationCostPassed = std::numeric_limits<unsigned int>::max()

unsigned int getMaxInterleaveFactor(
    unsigned int VF)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:628

Parameters

unsigned int VF

virtual unsigned int
getMaxPrefetchIterationsAhead() const

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:556

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

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:883

Parameters

unsigned int Opcode
llvm::Type* Src
llvm::MaybeAlign Alignment
unsigned int AddressSpace
const llvm::Instruction* I = nullptr

unsigned int getMinMaxReductionCost(
    llvm::Type* Ty,
    llvm::Type* CondTy,
    bool IsPairwise,
    bool)

Description

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

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1656

Parameters

llvm::Type* Ty
llvm::Type* CondTy
Conditional type for the Select instruction.
bool IsPairwise
bool

virtual unsigned int getMinPrefetchStride() const

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:552

unsigned int getNumberOfParts(llvm::Type* Tp)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1561

Parameters

llvm::Type* Tp

unsigned int getOperandsScalarizationOverhead(
    ArrayRef<const llvm::Value*> Args,
    unsigned int VF)

Description

Estimate the overhead of scalarizing an instructions unique non-constant operands. The types of the arguments are ordinarily scalar, in which case the costs are multiplied with VF.

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:588

Parameters

ArrayRef<const llvm::Value*> Args
unsigned int VF

unsigned int getOperationCost(unsigned int Opcode,
                              llvm::Type* Ty,
                              llvm::Type* OpTy)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:414

Parameters

unsigned int Opcode
llvm::Type* Ty
llvm::Type* OpTy

virtual unsigned int getPrefetchDistance() const

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:548

unsigned int getRegisterBitWidth(
    bool Vector) const

Description

@ {

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:565

Parameters

bool Vector

unsigned int getScalarizationOverhead(
    llvm::Type* Ty,
    bool Insert,
    bool Extract)

Description

Estimate the overhead of scalarizing an instruction. Insert and Extract are set if the result needs to be inserted and/or extracted from vectors.

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:569

Parameters

llvm::Type* Ty
bool Insert
bool Extract

unsigned int getScalarizationOverhead(
    llvm::Type* VecTy,
    ArrayRef<const llvm::Value*> Args)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:611

Parameters

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

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

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:264

Parameters

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

unsigned int getShuffleCost(TTI::ShuffleKind Kind,
                            llvm::Type* Tp,
                            int Index,
                            llvm::Type* SubTp)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:678

Parameters

TTI::ShuffleKind Kind
llvm::Type* Tp
int Index
llvm::Type* SubTp

void getUnrollingPreferences(
    llvm::Loop* L,
    llvm::ScalarEvolution& SE,
    TTI::UnrollingPreferences& UP)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:441

Parameters

llvm::Loop* L
llvm::ScalarEvolution& SE
TTI::UnrollingPreferences& UP

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

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:876

Parameters

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

unsigned int getVectorSplitCost()

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1723

bool hasBranchDivergence()

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:208

bool haveFastSqrt(llvm::Type* Ty)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:393

Parameters

llvm::Type* Ty

bool isAlwaysUniform(const llvm::Value* V)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:212

Parameters

const llvm::Value* V

bool isFCmpOrdCheaperThanFCmpZero(llvm::Type* Ty)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:400

Parameters

llvm::Type* Ty

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

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:506

Parameters

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

bool isIndexedLoadLegal(
    TTI::MemIndexedMode M,
    llvm::Type* Ty,
    const llvm::DataLayout& DL) const

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:248

Parameters

TTI::MemIndexedMode M
llvm::Type* Ty
const llvm::DataLayout& DL

bool isIndexedStoreLegal(
    TTI::MemIndexedMode M,
    llvm::Type* Ty,
    const llvm::DataLayout& DL) const

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:254

Parameters

TTI::MemIndexedMode M
llvm::Type* Ty
const llvm::DataLayout& DL

bool isLSRCostLess(TTI::LSRCost C1,
                   TTI::LSRCost C2)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:260

Parameters

TTI::LSRCost C1
TTI::LSRCost C2

bool isLegalAddImmediate(int64_t imm)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:229

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 = nullptr)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:237

Parameters

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

bool isLegalICmpImmediate(int64_t imm)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:233

Parameters

int64_t imm

bool isProfitableToHoist(llvm::Instruction* I)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:278

Parameters

llvm::Instruction* I

bool isSourceOfDivergence(const llvm::Value* V)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:210

Parameters

const llvm::Value* V

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

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:274

Parameters

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

bool isTypeLegal(llvm::Type* Ty)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:284

Parameters

llvm::Type* Ty

bool preferPredicateOverEpilogue(
    llvm::Loop* L,
    llvm::LoopInfo* LI,
    llvm::ScalarEvolution& SE,
    llvm::AssumptionCache& AC,
    llvm::TargetLibraryInfo* TLI,
    llvm::DominatorTree* DT,
    const llvm::LoopAccessInfo* LAI)

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:513

Parameters

llvm::Loop* L
llvm::LoopInfo* LI
llvm::ScalarEvolution& SE
llvm::AssumptionCache& AC
llvm::TargetLibraryInfo* TLI
llvm::DominatorTree* DT
const llvm::LoopAccessInfo* LAI

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

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:224

Parameters

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

bool shouldBuildLookupTables()

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:387

bool useAA() const

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:282

virtual ~BasicTTIImplBase<T>()

Declared at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:193