LLVM  7.0.0svn
Protected Member Functions | List of all members
llvm::BasicTTIImplBase< T > Class Template Reference

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

#include "llvm/CodeGen/BasicTTIImpl.h"

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

Public Member Functions

Scalar TTI Implementations
bool allowsMisalignedMemoryAccesses (LLVMContext &Context, unsigned BitWidth, unsigned AddressSpace, unsigned Alignment, bool *Fast) const
 
bool hasBranchDivergence ()
 
bool isSourceOfDivergence (const Value *V)
 
bool isAlwaysUniform (const Value *V)
 
unsigned getFlatAddressSpace ()
 
bool isLegalAddImmediate (int64_t imm)
 
bool isLegalICmpImmediate (int64_t imm)
 
bool isLegalAddressingMode (Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace, Instruction *I=nullptr)
 
bool isIndexedLoadLegal (TTI::MemIndexedMode M, Type *Ty, const DataLayout &DL) const
 
bool isIndexedStoreLegal (TTI::MemIndexedMode M, Type *Ty, const DataLayout &DL) const
 
bool isLSRCostLess (TTI::LSRCost C1, TTI::LSRCost C2)
 
int getScalingFactorCost (Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace)
 
bool isTruncateFree (Type *Ty1, Type *Ty2)
 
bool isProfitableToHoist (Instruction *I)
 
bool useAA () const
 
bool isTypeLegal (Type *Ty)
 
int getGEPCost (Type *PointeeType, const Value *Ptr, ArrayRef< const Value *> Operands)
 
int getExtCost (const Instruction *I, const Value *Src)
 
unsigned getIntrinsicCost (Intrinsic::ID IID, Type *RetTy, ArrayRef< const Value *> Arguments)
 
unsigned getIntrinsicCost (Intrinsic::ID IID, Type *RetTy, ArrayRef< Type *> ParamTys)
 
unsigned getEstimatedNumberOfCaseClusters (const SwitchInst &SI, unsigned &JumpTableSize)
 
unsigned getJumpBufAlignment ()
 
unsigned getJumpBufSize ()
 
bool shouldBuildLookupTables ()
 
bool haveFastSqrt (Type *Ty)
 
bool isFCmpOrdCheaperThanFCmpZero (Type *Ty)
 
unsigned getFPOpCost (Type *Ty)
 
unsigned getOperationCost (unsigned Opcode, Type *Ty, Type *OpTy)
 
unsigned getInliningThresholdMultiplier ()
 
void getUnrollingPreferences (Loop *L, ScalarEvolution &SE, TTI::UnrollingPreferences &UP)
 
int getInstructionLatency (const Instruction *I)
 
Vector TTI Implementations
unsigned getNumberOfRegisters (bool Vector)
 
unsigned getRegisterBitWidth (bool Vector) const
 
unsigned getScalarizationOverhead (Type *Ty, bool Insert, bool Extract)
 Estimate the overhead of scalarizing an instruction. More...
 
unsigned getOperandsScalarizationOverhead (ArrayRef< const Value *> Args, unsigned VF)
 Estimate the overhead of scalarizing an instructions unique non-constant operands. More...
 
unsigned getScalarizationOverhead (Type *VecTy, ArrayRef< const Value *> Args)
 
unsigned getMaxInterleaveFactor (unsigned VF)
 
unsigned getArithmeticInstrCost (unsigned Opcode, Type *Ty, TTI::OperandValueKind Opd1Info=TTI::OK_AnyValue, TTI::OperandValueKind Opd2Info=TTI::OK_AnyValue, TTI::OperandValueProperties Opd1PropInfo=TTI::OP_None, TTI::OperandValueProperties Opd2PropInfo=TTI::OP_None, ArrayRef< const Value *> Args=ArrayRef< const Value *>())
 
unsigned getShuffleCost (TTI::ShuffleKind Kind, Type *Tp, int Index, Type *SubTp)
 
unsigned getCastInstrCost (unsigned Opcode, Type *Dst, Type *Src, const Instruction *I=nullptr)
 
unsigned getExtractWithExtendCost (unsigned Opcode, Type *Dst, VectorType *VecTy, unsigned Index)
 
unsigned getCFInstrCost (unsigned Opcode)
 
unsigned getCmpSelInstrCost (unsigned Opcode, Type *ValTy, Type *CondTy, const Instruction *I)
 
unsigned getVectorInstrCost (unsigned Opcode, Type *Val, unsigned Index)
 
unsigned getMemoryOpCost (unsigned Opcode, Type *Src, unsigned Alignment, unsigned AddressSpace, const Instruction *I=nullptr)
 
unsigned getInterleavedMemoryOpCost (unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, unsigned Alignment, unsigned AddressSpace)
 
unsigned getIntrinsicInstrCost (Intrinsic::ID IID, Type *RetTy, ArrayRef< Value *> Args, FastMathFlags FMF, unsigned VF=1)
 Get intrinsic cost based on arguments. More...
 
unsigned getIntrinsicInstrCost (Intrinsic::ID IID, Type *RetTy, ArrayRef< Type *> Tys, FastMathFlags FMF, unsigned ScalarizationCostPassed=std::numeric_limits< unsigned >::max())
 Get intrinsic cost based on argument types. More...
 
unsigned getCallInstrCost (Function *F, Type *RetTy, ArrayRef< Type *> Tys)
 Compute a cost of the given call instruction. More...
 
unsigned getNumberOfParts (Type *Tp)
 
unsigned getAddressComputationCost (Type *Ty, ScalarEvolution *, const SCEV *)
 
unsigned getArithmeticReductionCost (unsigned Opcode, Type *Ty, bool IsPairwise)
 Try to calculate arithmetic and shuffle op costs for reduction operations. More...
 
unsigned getMinMaxReductionCost (Type *Ty, Type *CondTy, bool IsPairwise, bool)
 Try to calculate op costs for min/max reduction operations. More...
 
unsigned getVectorSplitCost ()
 
- Public Member Functions inherited from llvm::TargetTransformInfoImplCRTPBase< T >
unsigned getCallCost (const Function *F, int NumArgs)
 
unsigned getCallCost (const Function *F, ArrayRef< const Value *> Arguments)
 
int getGEPCost (Type *PointeeType, const Value *Ptr, ArrayRef< const Value *> Operands)
 
unsigned getIntrinsicCost (Intrinsic::ID IID, Type *RetTy, ArrayRef< const Value *> Arguments)
 
unsigned getUserCost (const User *U, ArrayRef< const Value *> Operands)
 
int getInstructionLatency (const Instruction *I)
 
- Public Member Functions inherited from llvm::TargetTransformInfoImplBase
 TargetTransformInfoImplBase (const TargetTransformInfoImplBase &Arg)
 
 TargetTransformInfoImplBase (TargetTransformInfoImplBase &&Arg)
 
const DataLayoutgetDataLayout () const
 
unsigned getOperationCost (unsigned Opcode, Type *Ty, Type *OpTy)
 
int getGEPCost (Type *PointeeType, const Value *Ptr, ArrayRef< const Value *> Operands)
 
unsigned getEstimatedNumberOfCaseClusters (const SwitchInst &SI, unsigned &JTSize)
 
int getExtCost (const Instruction *I, const Value *Src)
 
unsigned getCallCost (FunctionType *FTy, int NumArgs)
 
unsigned getInliningThresholdMultiplier ()
 
unsigned getIntrinsicCost (Intrinsic::ID IID, Type *RetTy, ArrayRef< Type *> ParamTys)
 
bool hasBranchDivergence ()
 
bool isSourceOfDivergence (const Value *V)
 
bool isAlwaysUniform (const Value *V)
 
unsigned getFlatAddressSpace ()
 
bool isLoweredToCall (const Function *F)
 
void getUnrollingPreferences (Loop *, ScalarEvolution &, TTI::UnrollingPreferences &)
 
bool isLegalAddImmediate (int64_t Imm)
 
bool isLegalICmpImmediate (int64_t Imm)
 
bool isLegalAddressingMode (Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace, Instruction *I=nullptr)
 
bool isLSRCostLess (TTI::LSRCost &C1, TTI::LSRCost &C2)
 
bool canMacroFuseCmp ()
 
bool shouldFavorPostInc () const
 
bool isLegalMaskedStore (Type *DataType)
 
bool isLegalMaskedLoad (Type *DataType)
 
bool isLegalMaskedScatter (Type *DataType)
 
bool isLegalMaskedGather (Type *DataType)
 
bool hasDivRemOp (Type *DataType, bool IsSigned)
 
bool hasVolatileVariant (Instruction *I, unsigned AddrSpace)
 
bool prefersVectorizedAddressing ()
 
int getScalingFactorCost (Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace)
 
bool LSRWithInstrQueries ()
 
bool isTruncateFree (Type *Ty1, Type *Ty2)
 
bool isProfitableToHoist (Instruction *I)
 
bool useAA ()
 
bool isTypeLegal (Type *Ty)
 
unsigned getJumpBufAlignment ()
 
unsigned getJumpBufSize ()
 
bool shouldBuildLookupTables ()
 
bool shouldBuildLookupTablesForConstant (Constant *C)
 
bool useColdCCForColdCall (Function &F)
 
unsigned getScalarizationOverhead (Type *Ty, bool Insert, bool Extract)
 
unsigned getOperandsScalarizationOverhead (ArrayRef< const Value *> Args, unsigned VF)
 
bool supportsEfficientVectorElementLoadStore ()
 
bool enableAggressiveInterleaving (bool LoopHasReductions)
 
const TTI::MemCmpExpansionOptionsenableMemCmpExpansion (bool IsZeroCmp) const
 
bool enableInterleavedAccessVectorization ()
 
bool isFPVectorizationPotentiallyUnsafe ()
 
bool allowsMisalignedMemoryAccesses (LLVMContext &Context, unsigned BitWidth, unsigned AddressSpace, unsigned Alignment, bool *Fast)
 
TTI::PopcntSupportKind getPopcntSupport (unsigned IntTyWidthInBit)
 
bool haveFastSqrt (Type *Ty)
 
bool isFCmpOrdCheaperThanFCmpZero (Type *Ty)
 
unsigned getFPOpCost (Type *Ty)
 
int getIntImmCodeSizeCost (unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty)
 
unsigned getIntImmCost (const APInt &Imm, Type *Ty)
 
unsigned getIntImmCost (unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty)
 
unsigned getIntImmCost (Intrinsic::ID IID, unsigned Idx, const APInt &Imm, Type *Ty)
 
unsigned getNumberOfRegisters (bool Vector)
 
unsigned getRegisterBitWidth (bool Vector) const
 
unsigned getMinVectorRegisterBitWidth ()
 
bool shouldMaximizeVectorBandwidth (bool OptSize) const
 
unsigned getMinimumVF (unsigned ElemWidth) const
 
bool shouldConsiderAddressTypePromotion (const Instruction &I, bool &AllowPromotionWithoutCommonHeader)
 
unsigned getCacheLineSize ()
 
llvm::Optional< unsignedgetCacheSize (TargetTransformInfo::CacheLevel Level)
 
llvm::Optional< unsignedgetCacheAssociativity (TargetTransformInfo::CacheLevel Level)
 
unsigned getPrefetchDistance ()
 
unsigned getMinPrefetchStride ()
 
unsigned getMaxPrefetchIterationsAhead ()
 
unsigned getMaxInterleaveFactor (unsigned VF)
 
unsigned getArithmeticInstrCost (unsigned Opcode, Type *Ty, TTI::OperandValueKind Opd1Info, TTI::OperandValueKind Opd2Info, TTI::OperandValueProperties Opd1PropInfo, TTI::OperandValueProperties Opd2PropInfo, ArrayRef< const Value *> Args)
 
unsigned getShuffleCost (TTI::ShuffleKind Kind, Type *Ty, int Index, Type *SubTp)
 
unsigned getCastInstrCost (unsigned Opcode, Type *Dst, Type *Src, const Instruction *I)
 
unsigned getExtractWithExtendCost (unsigned Opcode, Type *Dst, VectorType *VecTy, unsigned Index)
 
unsigned getCFInstrCost (unsigned Opcode)
 
unsigned getCmpSelInstrCost (unsigned Opcode, Type *ValTy, Type *CondTy, const Instruction *I)
 
unsigned getVectorInstrCost (unsigned Opcode, Type *Val, unsigned Index)
 
unsigned getMemoryOpCost (unsigned Opcode, Type *Src, unsigned Alignment, unsigned AddressSpace, const Instruction *I)
 
unsigned getMaskedMemoryOpCost (unsigned Opcode, Type *Src, unsigned Alignment, unsigned AddressSpace)
 
unsigned getGatherScatterOpCost (unsigned Opcode, Type *DataTy, Value *Ptr, bool VariableMask, unsigned Alignment)
 
unsigned getInterleavedMemoryOpCost (unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, unsigned Alignment, unsigned AddressSpace)
 
unsigned getIntrinsicInstrCost (Intrinsic::ID ID, Type *RetTy, ArrayRef< Type *> Tys, FastMathFlags FMF, unsigned ScalarizationCostPassed)
 
unsigned getIntrinsicInstrCost (Intrinsic::ID ID, Type *RetTy, ArrayRef< Value *> Args, FastMathFlags FMF, unsigned VF)
 
unsigned getCallInstrCost (Function *F, Type *RetTy, ArrayRef< Type *> Tys)
 
unsigned getNumberOfParts (Type *Tp)
 
unsigned getAddressComputationCost (Type *Tp, ScalarEvolution *, const SCEV *)
 
unsigned getArithmeticReductionCost (unsigned, Type *, bool)
 
unsigned getMinMaxReductionCost (Type *, Type *, bool, bool)
 
unsigned getCostOfKeepingLiveOverCall (ArrayRef< Type *> Tys)
 
bool getTgtMemIntrinsic (IntrinsicInst *Inst, MemIntrinsicInfo &Info)
 
unsigned getAtomicMemIntrinsicMaxElementSize () const
 
ValuegetOrCreateResultFromMemIntrinsic (IntrinsicInst *Inst, Type *ExpectedType)
 
TypegetMemcpyLoopLoweringType (LLVMContext &Context, Value *Length, unsigned SrcAlign, unsigned DestAlign) const
 
void getMemcpyLoopResidualLoweringType (SmallVectorImpl< Type *> &OpsOut, LLVMContext &Context, unsigned RemainingBytes, unsigned SrcAlign, unsigned DestAlign) const
 
bool areInlineCompatible (const Function *Caller, const Function *Callee) const
 
bool isIndexedLoadLegal (TTI::MemIndexedMode Mode, Type *Ty, const DataLayout &DL) const
 
bool isIndexedStoreLegal (TTI::MemIndexedMode Mode, Type *Ty, const DataLayout &DL) const
 
unsigned getLoadStoreVecRegBitWidth (unsigned AddrSpace) const
 
bool isLegalToVectorizeLoad (LoadInst *LI) const
 
bool isLegalToVectorizeStore (StoreInst *SI) const
 
bool isLegalToVectorizeLoadChain (unsigned ChainSizeInBytes, unsigned Alignment, unsigned AddrSpace) const
 
bool isLegalToVectorizeStoreChain (unsigned ChainSizeInBytes, unsigned Alignment, unsigned AddrSpace) const
 
unsigned getLoadVectorFactor (unsigned VF, unsigned LoadSize, unsigned ChainSizeInBytes, VectorType *VecTy) const
 
unsigned getStoreVectorFactor (unsigned VF, unsigned StoreSize, unsigned ChainSizeInBytes, VectorType *VecTy) const
 
bool useReductionIntrinsic (unsigned Opcode, Type *Ty, TTI::ReductionFlags Flags) const
 
bool shouldExpandReduction (const IntrinsicInst *II) const
 

Protected Member Functions

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

Additional Inherited Members

- Protected Types inherited from llvm::TargetTransformInfoImplBase
typedef TargetTransformInfo TTI
 
- Protected Attributes inherited from llvm::TargetTransformInfoImplBase
const DataLayoutDL
 

Detailed Description

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

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

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

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

Definition at line 78 of file BasicTTIImpl.h.

Constructor & Destructor Documentation

◆ BasicTTIImplBase()

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

Definition at line 131 of file BasicTTIImpl.h.

Member Function Documentation

◆ allowsMisalignedMemoryAccesses()

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

Definition at line 139 of file BasicTTIImpl.h.

◆ getAddressComputationCost()

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

Definition at line 1223 of file BasicTTIImpl.h.

◆ getArithmeticInstrCost()

template<typename T>
unsigned llvm::BasicTTIImplBase< T >::getArithmeticInstrCost ( unsigned  Opcode,
Type Ty,
TTI::OperandValueKind  Opd1Info = TTI::OK_AnyValue,
TTI::OperandValueKind  Opd2Info = TTI::OK_AnyValue,
TTI::OperandValueProperties  Opd1PropInfo = TTI::OP_None,
TTI::OperandValueProperties  Opd2PropInfo = TTI::OP_None,
ArrayRef< const Value *>  Args = ArrayRef<const Value *>() 
)
inline

◆ getArithmeticReductionCost()

template<typename T>
unsigned llvm::BasicTTIImplBase< T >::getArithmeticReductionCost ( unsigned  Opcode,
Type Ty,
bool  IsPairwise 
)
inline

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.

Definition at line 1263 of file BasicTTIImpl.h.

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

◆ getCallInstrCost()

template<typename T>
unsigned llvm::BasicTTIImplBase< T >::getCallInstrCost ( Function F,
Type RetTy,
ArrayRef< Type *>  Tys 
)
inline

Compute a cost of the given call instruction.

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

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

Definition at line 1214 of file BasicTTIImpl.h.

◆ getCastInstrCost()

template<typename T>
unsigned llvm::BasicTTIImplBase< T >::getCastInstrCost ( unsigned  Opcode,
Type Dst,
Type Src,
const Instruction I = nullptr 
)
inline

◆ getCFInstrCost()

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

Definition at line 696 of file BasicTTIImpl.h.

◆ getCmpSelInstrCost()

template<typename T>
unsigned llvm::BasicTTIImplBase< T >::getCmpSelInstrCost ( unsigned  Opcode,
Type ValTy,
Type CondTy,
const Instruction I 
)
inline

◆ getEstimatedNumberOfCaseClusters()

template<typename T>
unsigned llvm::BasicTTIImplBase< T >::getEstimatedNumberOfCaseClusters ( const SwitchInst SI,
unsigned JumpTableSize 
)
inline

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

Definition at line 256 of file BasicTTIImpl.h.

◆ getExtCost()

template<typename T>
int llvm::BasicTTIImplBase< T >::getExtCost ( const Instruction I,
const Value Src 
)
inline

Definition at line 222 of file BasicTTIImpl.h.

◆ getExtractWithExtendCost()

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

Definition at line 688 of file BasicTTIImpl.h.

◆ getFlatAddressSpace()

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

Definition at line 152 of file BasicTTIImpl.h.

◆ getFPOpCost()

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

Definition at line 334 of file BasicTTIImpl.h.

◆ getGEPCost()

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

Definition at line 217 of file BasicTTIImpl.h.

◆ getInliningThresholdMultiplier()

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

Definition at line 361 of file BasicTTIImpl.h.

◆ getInstructionLatency()

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

Definition at line 428 of file BasicTTIImpl.h.

◆ getInterleavedMemoryOpCost()

template<typename T>
unsigned llvm::BasicTTIImplBase< T >::getInterleavedMemoryOpCost ( unsigned  Opcode,
Type VecTy,
unsigned  Factor,
ArrayRef< unsigned Indices,
unsigned  Alignment,
unsigned  AddressSpace 
)
inline

Definition at line 779 of file BasicTTIImpl.h.

◆ getIntrinsicCost() [1/2]

template<typename T>
unsigned llvm::BasicTTIImplBase< T >::getIntrinsicCost ( Intrinsic::ID  IID,
Type RetTy,
ArrayRef< const Value *>  Arguments 
)
inline

Definition at line 234 of file BasicTTIImpl.h.

◆ getIntrinsicCost() [2/2]

template<typename T>
unsigned llvm::BasicTTIImplBase< T >::getIntrinsicCost ( Intrinsic::ID  IID,
Type RetTy,
ArrayRef< Type *>  ParamTys 
)
inline

Definition at line 239 of file BasicTTIImpl.h.

◆ getIntrinsicInstrCost() [1/2]

template<typename T>
unsigned llvm::BasicTTIImplBase< T >::getIntrinsicInstrCost ( Intrinsic::ID  IID,
Type RetTy,
ArrayRef< Value *>  Args,
FastMathFlags  FMF,
unsigned  VF = 1 
)
inline

Get intrinsic cost based on arguments.

Definition at line 895 of file BasicTTIImpl.h.

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

◆ getIntrinsicInstrCost() [2/2]

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

Get intrinsic cost based on argument types.

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

Definition at line 970 of file BasicTTIImpl.h.

◆ getJumpBufAlignment()

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

Definition at line 313 of file BasicTTIImpl.h.

◆ getJumpBufSize()

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

Definition at line 315 of file BasicTTIImpl.h.

◆ getMaxInterleaveFactor()

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

Definition at line 505 of file BasicTTIImpl.h.

◆ getMemoryOpCost()

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

◆ getMinMaxReductionCost()

template<typename T>
unsigned llvm::BasicTTIImplBase< T >::getMinMaxReductionCost ( Type Ty,
Type CondTy,
bool  IsPairwise,
bool   
)
inline

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

Parameters
CondTyConditional type for the Select instruction.

Definition at line 1301 of file BasicTTIImpl.h.

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

◆ getNumberOfParts()

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

Definition at line 1218 of file BasicTTIImpl.h.

◆ getNumberOfRegisters()

template<typename T>
unsigned llvm::BasicTTIImplBase< T >::getNumberOfRegisters ( bool  Vector)
inline

Definition at line 440 of file BasicTTIImpl.h.

◆ getOperandsScalarizationOverhead()

template<typename T>
unsigned llvm::BasicTTIImplBase< T >::getOperandsScalarizationOverhead ( ArrayRef< const Value *>  Args,
unsigned  VF 
)
inline

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.

Definition at line 465 of file BasicTTIImpl.h.

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

◆ getOperationCost()

template<typename T>
unsigned llvm::BasicTTIImplBase< T >::getOperationCost ( unsigned  Opcode,
Type Ty,
Type OpTy 
)
inline

Definition at line 344 of file BasicTTIImpl.h.

◆ getRegisterBitWidth()

template<typename T>
unsigned llvm::BasicTTIImplBase< T >::getRegisterBitWidth ( bool  Vector) const
inline

Definition at line 442 of file BasicTTIImpl.h.

◆ getScalarizationOverhead() [1/2]

template<typename T>
unsigned llvm::BasicTTIImplBase< T >::getScalarizationOverhead ( Type Ty,
bool  Insert,
bool  Extract 
)
inline

◆ getScalarizationOverhead() [2/2]

template<typename T>
unsigned llvm::BasicTTIImplBase< T >::getScalarizationOverhead ( Type VecTy,
ArrayRef< const Value *>  Args 
)
inline

Definition at line 488 of file BasicTTIImpl.h.

◆ getScalingFactorCost()

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

Definition at line 192 of file BasicTTIImpl.h.

◆ getShuffleCost()

template<typename T>
unsigned llvm::BasicTTIImplBase< T >::getShuffleCost ( TTI::ShuffleKind  Kind,
Type Tp,
int  Index,
Type SubTp 
)
inline

Definition at line 554 of file BasicTTIImpl.h.

◆ getUnrollingPreferences()

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

Definition at line 363 of file BasicTTIImpl.h.

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

◆ getVectorInstrCost()

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

◆ getVectorSplitCost()

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

Definition at line 1359 of file BasicTTIImpl.h.

◆ hasBranchDivergence()

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

Definition at line 146 of file BasicTTIImpl.h.

◆ haveFastSqrt()

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

Definition at line 323 of file BasicTTIImpl.h.

◆ isAlwaysUniform()

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

Definition at line 150 of file BasicTTIImpl.h.

◆ isFCmpOrdCheaperThanFCmpZero()

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

Definition at line 330 of file BasicTTIImpl.h.

◆ isIndexedLoadLegal()

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

Definition at line 176 of file BasicTTIImpl.h.

◆ isIndexedStoreLegal()

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

Definition at line 182 of file BasicTTIImpl.h.

◆ isLegalAddImmediate()

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

Definition at line 157 of file BasicTTIImpl.h.

◆ isLegalAddressingMode()

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

Definition at line 165 of file BasicTTIImpl.h.

◆ isLegalICmpImmediate()

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

Definition at line 161 of file BasicTTIImpl.h.

◆ isLSRCostLess()

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

Definition at line 188 of file BasicTTIImpl.h.

◆ isProfitableToHoist()

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

Definition at line 206 of file BasicTTIImpl.h.

◆ isSourceOfDivergence()

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

Definition at line 148 of file BasicTTIImpl.h.

◆ isTruncateFree()

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

Definition at line 202 of file BasicTTIImpl.h.

◆ isTypeLegal()

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

Definition at line 212 of file BasicTTIImpl.h.

◆ shouldBuildLookupTables()

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

Definition at line 317 of file BasicTTIImpl.h.

◆ useAA()

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

Definition at line 210 of file BasicTTIImpl.h.


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