LLVM 19.0.0git
|
Base class which can be used to help build a TTI implementation. More...
#include "llvm/CodeGen/BasicTTIImpl.h"
Protected Member Functions | |
BasicTTIImplBase (const TargetMachine *TM, const DataLayout &DL) | |
virtual | ~BasicTTIImplBase ()=default |
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) const |
bool | isStridedAccess (const SCEV *Ptr) const |
const SCEVConstant * | getConstantStrideStep (ScalarEvolution *SE, const SCEV *Ptr) const |
bool | isConstantStridedAccessLessThan (ScalarEvolution *SE, const SCEV *Ptr, int64_t MergeDistance) const |
Protected Attributes | |
const DataLayout & | DL |
Protected Attributes inherited from llvm::TargetTransformInfoImplBase | |
const DataLayout & | DL |
Additional Inherited Members | |
Protected Types inherited from llvm::TargetTransformInfoImplBase | |
typedef TargetTransformInfo | TTI |
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 81 of file BasicTTIImpl.h.
|
inlineexplicitprotected |
Definition at line 264 of file BasicTTIImpl.h.
|
protectedvirtualdefault |
|
inline |
Definition at line 291 of file BasicTTIImpl.h.
|
inline |
Definition at line 577 of file BasicTTIImpl.h.
|
inline |
Definition at line 273 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::allowsMisalignedMemoryAccesses(), llvm::BitWidth, Context, E, llvm::CallingConv::Fast, llvm::EVT::getIntegerVT(), and llvm::MachineMemOperand::MONone.
|
inline |
Definition at line 300 of file BasicTTIImpl.h.
|
inlinevirtual |
Reimplemented in llvm::SystemZTTIImpl.
Definition at line 740 of file BasicTTIImpl.h.
References llvm::MCSubtargetInfo::enableWritePrefetching().
|
inline |
Definition at line 2411 of file BasicTTIImpl.h.
|
inline |
Definition at line 893 of file BasicTTIImpl.h.
References llvm::TargetTransformInfo::OK_AnyValue, and llvm::TargetTransformInfo::OP_None.
Referenced by llvm::WebAssemblyTTIImpl::getArithmeticInstrCost().
|
inline |
Definition at line 2531 of file BasicTTIImpl.h.
References assert(), CostKind, llvm::BasicTTIImplBase< T >::getOrderedReductionCost(), llvm::BasicTTIImplBase< T >::getTreeReductionCost(), and llvm::TargetTransformInfo::requiresOrderedReduction().
|
inline |
Definition at line 309 of file BasicTTIImpl.h.
References llvm::TargetMachine::getAssumedAddrSpace(), and llvm::TargetLoweringBase::getTargetMachine().
|
inlinevirtual |
Reimplemented in llvm::X86TTIImpl.
Definition at line 710 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::getCacheAssociativity(), and llvm::MCSubtargetInfo::getCacheAssociativity().
|
inlinevirtual |
Reimplemented in llvm::GCNTTIImpl, llvm::HexagonTTIImpl, llvm::PPCTTIImpl, and llvm::SystemZTTIImpl.
Definition at line 720 of file BasicTTIImpl.h.
References llvm::MCSubtargetInfo::getCacheLineSize().
|
inlinevirtual |
Reimplemented in llvm::X86TTIImpl.
Definition at line 704 of file BasicTTIImpl.h.
References llvm::BasicTTIImplBase< T >::getCacheSize().
Referenced by llvm::BasicTTIImplBase< T >::getCacheSize().
|
inline |
Definition at line 578 of file BasicTTIImpl.h.
|
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.
F | Called function, might be nullptr. |
RetTy | Return value types. |
Tys | Argument types. |
Definition at line 2400 of file BasicTTIImpl.h.
|
inline |
Definition at line 1049 of file BasicTTIImpl.h.
References assert(), CostKind, llvm::BasicTTIImplBase< T >::DL, llvm::TargetTransformInfoImplBase::getCastInstrCost(), llvm::TargetTransformInfo::getCastInstrCost(), llvm::EVT::getEVT(), llvm::VectorType::getHalfElementsVectorType(), llvm::InstructionCost::getInvalid(), llvm::BasicTTIImplBase< T >::getScalarizationOverhead(), llvm::TargetLoweringBase::getTypeAction(), llvm::BasicTTIImplBase< T >::getTypeLegalizationCost(), llvm::TargetLoweringBase::getValueType(), I, llvm::TargetLoweringBase::InstructionOpcodeToISD(), llvm::TargetLoweringBase::isFreeAddrSpaceCast(), llvm::TargetLoweringBase::isLoadExtLegal(), llvm::TargetLoweringBase::isOperationExpand(), llvm::TargetLoweringBase::isOperationLegalOrPromote(), llvm::TargetLoweringBase::isTruncateFree(), llvm::TargetLoweringBase::isZExtFree(), llvm_unreachable, llvm::TargetTransformInfo::Normal, llvm::ISD::SEXTLOAD, llvm::TargetLoweringBase::TypeSplitVector, and llvm::ISD::ZEXTLOAD.
|
inline |
Definition at line 1218 of file BasicTTIImpl.h.
References CostKind, llvm::TargetTransformInfoImplBase::getCFInstrCost(), and I.
|
inline |
Definition at line 1223 of file BasicTTIImpl.h.
References assert(), CostKind, llvm::TargetTransformInfoImplBase::getCmpSelInstrCost(), llvm::InstructionCost::getInvalid(), llvm::BasicTTIImplBase< T >::getScalarizationOverhead(), llvm::Type::getScalarType(), llvm::BasicTTIImplBase< T >::getTypeLegalizationCost(), I, llvm::TargetLoweringBase::InstructionOpcodeToISD(), llvm::TargetLoweringBase::isOperationExpand(), llvm::Type::isVectorTy(), llvm::ISD::SELECT, llvm::TargetTransformInfo::TCK_RecipThroughput, and llvm::ISD::VSELECT.
|
inline |
Try to find the estimated number of clusters. Note that the number of clusters identified in this function could be different from the actual 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 446 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::areJTsAllowed(), llvm::BasicTTIImplBase< T >::DL, llvm::TargetTransformInfoImplBase::getDataLayout(), llvm::DataLayout::getIndexSizeInBits(), I, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::TargetLoweringBase::isSuitableForBitTests(), llvm::TargetLoweringBase::isSuitableForJumpTable(), N, llvm::APInt::sgt(), llvm::SmallPtrSetImplBase::size(), and llvm::APInt::slt().
|
inline |
Definition at line 2591 of file BasicTTIImpl.h.
References CostKind, llvm::VectorType::get(), and llvm::TargetTransformInfo::None.
|
inline |
Definition at line 1209 of file BasicTTIImpl.h.
References CostKind, llvm::VectorType::getElementType(), llvm::TargetTransformInfo::None, and llvm::TargetTransformInfo::TCK_RecipThroughput.
|
inline |
Definition at line 295 of file BasicTTIImpl.h.
|
inline |
|
inline |
Definition at line 1380 of file BasicTTIImpl.h.
References CostKind.
|
inline |
Definition at line 440 of file BasicTTIImpl.h.
References CostKind, llvm::TargetTransformInfoImplCRTPBase< T >::getGEPCost(), Operands, and Ptr.
|
inline |
Definition at line 582 of file BasicTTIImpl.h.
|
inline |
Definition at line 576 of file BasicTTIImpl.h.
|
inline |
Definition at line 1401 of file BasicTTIImpl.h.
References assert(), CostKind, llvm::BitVector::count(), llvm::divideCeil(), llvm::FixedVectorType::get(), llvm::APInt::getAllOnes(), llvm::Type::getInt8Ty(), llvm::InstructionCost::getInvalid(), llvm::MVT::getStoreSize(), llvm::BasicTTIImplBase< T >::getTypeLegalizationCost(), llvm::InstructionCost::getValue(), llvm::APInt::getZero(), llvm::InstructionCost::isValid(), llvm::BitVector::set(), llvm::APInt::setBit(), and llvm::ArrayRef< T >::size().
|
inline |
Get intrinsic cost based on arguments.
Definition at line 1545 of file BasicTTIImpl.h.
References assert(), CostKind, llvm::Data, llvm::BasicTTIImplBase< T >::DL, llvm::ArrayRef< T >::drop_back(), llvm::ArrayRef< T >::drop_front(), llvm::Exponent, llvm::VectorType::get(), llvm::IntrinsicCostAttributes::getArgs(), llvm::IntrinsicCostAttributes::getArgTypes(), llvm::TargetLoweringBase::getBitWidthForCttzElements(), llvm::ElementCount::getFixed(), llvm::IntrinsicCostAttributes::getFlags(), llvm::VPIntrinsic::getFunctionalIntrinsicIDForVP(), llvm::VPIntrinsic::getFunctionalOpcodeForVP(), llvm::IntrinsicCostAttributes::getID(), llvm::IntrinsicCostAttributes::getInst(), llvm::Type::getIntNTy(), llvm::TargetTransformInfoImplBase::getIntrinsicInstrCost(), llvm::InstructionCost::getInvalid(), llvm::TargetTransformInfo::getOperandInfo(), llvm::BasicTTIImplBase< T >::getOperandsScalarizationOverhead(), llvm::IntrinsicCostAttributes::getReturnType(), llvm::BasicTTIImplBase< T >::getScalarizationOverhead(), getType(), llvm::BasicTTIImplBase< T >::getTypeBasedIntrinsicInstrCost(), llvm::BasicTTIImplBase< T >::getTypeLegalizationCost(), llvm::TargetLoweringBase::getValueType(), llvm::EVT::getVectorElementCount(), llvm::getVScaleRange(), llvm::APInt::getZero(), I, llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_ULT, llvm::TargetLoweringBase::isBeneficialToExpandPowI(), llvm::TargetLoweringBase::isCheapToSpeculateCtlz(), llvm::TargetLoweringBase::isCheapToSpeculateCttz(), llvm::TargetTransformInfo::OperandValueInfo::isConstant(), llvm::isPowerOf2_32(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::isScalable(), llvm::ElementCount::isScalar(), llvm::Function::isTargetIntrinsic(), llvm::IntrinsicCostAttributes::isTypeBasedOnly(), llvm::ElementCount::isVector(), llvm::VPBinOpIntrinsic::isVPBinOp(), llvm::VPIntrinsic::isVPIntrinsic(), llvm::VPReductionIntrinsic::isVPReduction(), llvm::TargetTransformInfo::OperandValueInfo::Kind, llvm::TargetTransformInfo::None, llvm::TargetTransformInfo::OK_UniformConstantValue, llvm::TargetTransformInfo::OP_None, llvm::TargetTransformInfo::OP_PowerOf2, Ptr, RetTy, llvm::SmallVectorBase< Size_T >::size(), llvm::TargetTransformInfo::SK_ExtractSubvector, llvm::TargetTransformInfo::SK_InsertSubvector, llvm::TargetTransformInfo::SK_Reverse, llvm::TargetTransformInfo::SK_Splice, llvm::TargetTransformInfo::TCC_Basic, X, and Y.
Referenced by llvm::BasicTTIImplBase< T >::getMinMaxReductionCost().
|
inline |
Definition at line 1372 of file BasicTTIImpl.h.
References CostKind.
|
inline |
Definition at line 891 of file BasicTTIImpl.h.
|
inlinevirtual |
Definition at line 736 of file BasicTTIImpl.h.
References llvm::MCSubtargetInfo::getMaxPrefetchIterationsAhead().
|
inline |
Definition at line 757 of file BasicTTIImpl.h.
|
inline |
Definition at line 1328 of file BasicTTIImpl.h.
References llvm::TargetTransformInfo::OK_AnyValue, and llvm::TargetTransformInfo::OP_None.
|
inline |
Try to calculate op costs for min/max reduction operations.
CondTy | Conditional type for the Select instruction. |
Definition at line 2542 of file BasicTTIImpl.h.
References CostKind, llvm::FixedVectorType::get(), llvm::VectorType::getElementType(), llvm::BasicTTIImplBase< T >::getIntrinsicInstrCost(), llvm::InstructionCost::getInvalid(), llvm::Log2_32(), llvm::TargetTransformInfo::SK_ExtractSubvector, and llvm::TargetTransformInfo::SK_PermuteSingleSrc.
|
inlinevirtual |
Reimplemented in llvm::SystemZTTIImpl.
Definition at line 728 of file BasicTTIImpl.h.
References llvm::MCSubtargetInfo::getMinPrefetchStride().
|
inline |
Definition at line 2607 of file BasicTTIImpl.h.
References CostKind, llvm::VectorType::get(), and llvm::TargetTransformInfo::None.
|
inline |
Definition at line 2406 of file BasicTTIImpl.h.
References llvm::BasicTTIImplBase< T >::getTypeLegalizationCost().
|
inline |
Estimate the overhead of scalarizing an instructions unique non-constant operands.
The (potentially vector) types to use for each of argument are passes via Tys.
Definition at line 810 of file BasicTTIImpl.h.
References A, assert(), CostKind, E, llvm::BasicTTIImplBase< T >::getScalarizationOverhead(), I, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::Type::isFPOrFPVectorTy(), llvm::Type::isIntOrIntVectorTy(), llvm::Type::isPtrOrPtrVectorTy(), and llvm::ArrayRef< T >::size().
Referenced by llvm::BasicTTIImplBase< T >::getIntrinsicInstrCost(), and llvm::BasicTTIImplBase< T >::getScalarizationOverhead().
|
inline |
Try to calculate the cost of performing strict (in-order) reductions, which involves doing a sequence of floating point additions in lane order, starting with an initial value.
For example, consider a scalar initial value 'InitVal' of type float and a vector of type <4 x float>:
Vector = <float v0, float v1, float v2, float v3>
add1 = InitVal + v0 add2 = add1 + v1 add3 = add2 + v2 add4 = add3 + v3
As a simple estimate we can say the cost of such a reduction is 4 times the cost of a scalar FP addition. We can only estimate the costs for fixed-width vectors here because for scalable vectors we do not know the runtime number of operations.
Definition at line 2514 of file BasicTTIImpl.h.
References CostKind, llvm::VectorType::getElementType(), llvm::InstructionCost::getInvalid(), llvm::FixedVectorType::getNumElements(), and llvm::BasicTTIImplBase< T >::getScalarizationOverhead().
Referenced by llvm::BasicTTIImplBase< T >::getArithmeticReductionCost().
|
inline |
Definition at line 656 of file BasicTTIImpl.h.
References llvm::TargetTransformInfo::PeelingPreferences::AllowLoopNestsPeeling, llvm::TargetTransformInfo::PeelingPreferences::AllowPeeling, llvm::TargetTransformInfo::PeelingPreferences::PeelCount, and llvm::TargetTransformInfo::PeelingPreferences::PeelProfiledIterations.
|
inline |
Definition at line 319 of file BasicTTIImpl.h.
References llvm::TargetMachine::getPredicatedAddrSpace(), and llvm::TargetLoweringBase::getTargetMachine().
|
inline |
Definition at line 353 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::getPreferredLargeGEPBaseOffset().
|
inline |
Definition at line 676 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::getPreferredTailFoldingStyle().
|
inlinevirtual |
Reimplemented in llvm::GCNTTIImpl, llvm::HexagonTTIImpl, llvm::PPCTTIImpl, and llvm::SystemZTTIImpl.
Definition at line 724 of file BasicTTIImpl.h.
References llvm::MCSubtargetInfo::getPrefetchDistance().
|
inline |
Definition at line 753 of file BasicTTIImpl.h.
References llvm::TypeSize::getFixed().
|
inline |
Definition at line 435 of file BasicTTIImpl.h.
References llvm::BasicTTIImplBase< T >::DL, llvm::Type::getContext(), llvm::TargetLoweringBase::getNumRegisters(), and llvm::TargetLoweringBase::getValueType().
Referenced by llvm::BasicTTIImplBase< T >::getVectorInstrCost().
|
inline |
Definition at line 1294 of file BasicTTIImpl.h.
References assert(), CostKind, llvm::FixedVectorType::get(), llvm::APInt::getBitWidth(), and llvm::APIntOps::ScaleBitMask().
|
inline |
Helper wrapper for the DemandedElts variant of getScalarizationOverhead.
Definition at line 794 of file BasicTTIImpl.h.
References CostKind, llvm::APInt::getAllOnes(), and llvm::InstructionCost::getInvalid().
|
inline |
Estimate the overhead of scalarizing an instruction.
Insert and Extract are set if the demanded result elements need to be inserted and/or extracted from vectors.
FIXME: a bitfield is not a reasonable abstraction for talking about which elements are needed from a scalable vector
Definition at line 764 of file BasicTTIImpl.h.
References assert(), CostKind, llvm::APInt::getBitWidth(), and llvm::InstructionCost::getInvalid().
Referenced by llvm::BasicTTIImplBase< T >::getCastInstrCost(), llvm::BasicTTIImplBase< T >::getCmpSelInstrCost(), llvm::BasicTTIImplBase< T >::getIntrinsicInstrCost(), llvm::BasicTTIImplBase< T >::getOperandsScalarizationOverhead(), llvm::BasicTTIImplBase< T >::getOrderedReductionCost(), llvm::BasicTTIImplBase< T >::getScalarizationOverhead(), and llvm::BasicTTIImplBase< T >::getTypeBasedIntrinsicInstrCost().
|
inline |
Estimate the overhead of scalarizing the inputs and outputs of an instruction, with return type RetTy and arguments Args of type Tys.
If Args are unknown (empty), then the cost associated with one argument is added as a heuristic.
Definition at line 839 of file BasicTTIImpl.h.
References CostKind, llvm::BasicTTIImplBase< T >::getOperandsScalarizationOverhead(), llvm::BasicTTIImplBase< T >::getScalarizationOverhead(), and RetTy.
|
inline |
Definition at line 406 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::AddrMode::BaseGV, llvm::TargetLoweringBase::AddrMode::BaseOffs, llvm::BasicTTIImplBase< T >::DL, llvm::StackOffset::getFixed(), llvm::StackOffset::getScalable(), llvm::TargetLoweringBase::AddrMode::HasBaseReg, llvm::BasicTTIImplBase< T >::isLegalAddressingMode(), llvm::TargetLoweringBase::AddrMode::ScalableOffset, and llvm::TargetLoweringBase::AddrMode::Scale.
|
inline |
Definition at line 1019 of file BasicTTIImpl.h.
References CostKind, llvm::InstructionCost::getInvalid(), llvm::BasicTTIImplBase< T >::improveShuffleKindFromMask(), llvm_unreachable, llvm::TargetTransformInfo::SK_Broadcast, llvm::TargetTransformInfo::SK_ExtractSubvector, llvm::TargetTransformInfo::SK_InsertSubvector, llvm::TargetTransformInfo::SK_PermuteSingleSrc, llvm::TargetTransformInfo::SK_PermuteTwoSrc, llvm::TargetTransformInfo::SK_Reverse, llvm::TargetTransformInfo::SK_Select, llvm::TargetTransformInfo::SK_Splice, and llvm::TargetTransformInfo::SK_Transpose.
|
inline |
Definition at line 357 of file BasicTTIImpl.h.
References llvm::BasicTTIImplBase< T >::DL, llvm::FixedVectorType::get(), llvm::Type::getContext(), llvm::TargetLoweringBase::getTypeToTransformTo(), llvm::TargetLoweringBase::getValueType(), llvm::TargetLoweringBase::isTruncStoreLegal(), and llvm::ISD::STORE.
|
inline |
Definition at line 1389 of file BasicTTIImpl.h.
|
inline |
Try to calculate arithmetic and shuffle op costs for reduction intrinsics.
We're assuming that reduction operation are performing the following way:
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.
The cost model should take into account that the actual length of the vector is reduced on each iteration.
Definition at line 2437 of file BasicTTIImpl.h.
References llvm::CmpInst::BAD_ICMP_PREDICATE, CostKind, llvm::IntegerType::get(), llvm::FixedVectorType::get(), llvm::Type::getContext(), llvm::VectorType::getElementType(), llvm::Type::getInt1Ty(), llvm::InstructionCost::getInvalid(), llvm::Log2_32(), llvm::CmpInst::makeCmpResultType(), llvm::TargetTransformInfo::None, llvm::TargetTransformInfo::SK_ExtractSubvector, and llvm::TargetTransformInfo::SK_PermuteSingleSrc.
Referenced by llvm::BasicTTIImplBase< T >::getArithmeticReductionCost().
|
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 1898 of file BasicTTIImpl.h.
References llvm::any_of(), assert(), llvm::CmpInst::BAD_ICMP_PREDICATE, llvm::ISD::BITREVERSE, llvm::ISD::BSWAP, CostKind, llvm::StructType::create(), llvm::ISD::CTLZ, llvm::ISD::CTPOP, llvm::ISD::CTTZ, llvm::SmallVectorBase< Size_T >::empty(), llvm::ISD::FABS, llvm::ISD::FCANONICALIZE, llvm::ISD::FCEIL, llvm::CmpInst::FCMP_UNO, llvm::ISD::FCOPYSIGN, llvm::ISD::FCOS, llvm::ISD::FEXP, llvm::ISD::FEXP10, llvm::ISD::FEXP2, llvm::ISD::FFLOOR, llvm::ISD::FLOG, llvm::ISD::FLOG10, llvm::ISD::FLOG2, llvm::ISD::FMA, llvm::ISD::FMAXIMUM, llvm::ISD::FMAXNUM, llvm::ISD::FMINIMUM, llvm::ISD::FMINNUM, llvm::ISD::FNEARBYINT, llvm::ISD::FPOW, llvm::ISD::FRINT, llvm::ISD::FROUND, llvm::ISD::FROUNDEVEN, llvm::ISD::FSIN, llvm::ISD::FSQRT, llvm::ISD::FTRUNC, llvm::IntrinsicCostAttributes::getArgTypes(), llvm::getArithmeticReductionInstruction(), llvm::IntrinsicCostAttributes::getFlags(), llvm::IntrinsicCostAttributes::getID(), llvm::InstructionCost::getInvalid(), llvm::getMinMaxReductionIntrinsicOp(), llvm::IntrinsicCostAttributes::getReturnType(), llvm::IntrinsicCostAttributes::getScalarizationCost(), llvm::BasicTTIImplBase< T >::getScalarizationOverhead(), llvm::Type::getScalarSizeInBits(), llvm::Type::getScalarType(), llvm::BasicTTIImplBase< T >::getTypeLegalizationCost(), llvm::Type::getWithNewBitWidth(), llvm::CmpInst::ICMP_NE, llvm::CmpInst::ICMP_SGT, llvm::CmpInst::ICMP_UGT, llvm::CmpInst::ICMP_ULT, llvm::TargetLoweringBase::isFAbsFree(), llvm::TargetLoweringBase::isOperationExpand(), llvm::TargetLoweringBase::isOperationLegalOrPromote(), llvm::Type::isVectorTy(), llvm::ISD::LLRINT, llvm::ISD::LRINT, llvm::TargetTransformInfo::None, llvm::TargetTransformInfo::OK_AnyValue, llvm::TargetTransformInfo::OK_UniformConstantValue, llvm::TargetTransformInfo::OP_None, llvm::SmallVectorTemplateBase< T, bool >::push_back(), RetTy, llvm::SmallVectorBase< Size_T >::size(), llvm::IntrinsicCostAttributes::skipScalarizationCost(), llvm::ISD::STRICT_FMA, llvm::TargetTransformInfo::TCC_Expensive, and llvm::TargetTransformInfo::TCK_CodeSize.
Referenced by llvm::BasicTTIImplBase< T >::getIntrinsicInstrCost().
|
inline |
Estimate the cost of type-legalization and the legalized type.
Definition at line 857 of file BasicTTIImpl.h.
References llvm::CallingConv::C, llvm::BasicTTIImplBase< T >::DL, llvm::Type::getContext(), llvm::InstructionCost::getInvalid(), llvm::EVT::getSimpleVT(), llvm::TargetLoweringBase::getTypeConversion(), llvm::TargetLoweringBase::getValueType(), llvm::EVT::isSimple(), llvm::TargetLoweringBase::TypeExpandInteger, llvm::TargetLoweringBase::TypeLegal, llvm::TargetLoweringBase::TypeScalarizeScalableVector, and llvm::TargetLoweringBase::TypeSplitVector.
Referenced by llvm::BasicTTIImplBase< T >::getCastInstrCost(), llvm::BasicTTIImplBase< T >::getCmpSelInstrCost(), llvm::BasicTTIImplBase< T >::getInterleavedMemoryOpCost(), llvm::BasicTTIImplBase< T >::getIntrinsicInstrCost(), llvm::BasicTTIImplBase< T >::getNumberOfParts(), and llvm::BasicTTIImplBase< T >::getTypeBasedIntrinsicInstrCost().
|
inline |
Definition at line 584 of file BasicTTIImpl.h.
References llvm::TargetTransformInfo::UnrollingPreferences::BEInsns, llvm::OptimizationRemarkEmitter::emit(), F, getCalledFunction(), I, llvm::TargetTransformInfoImplBase::isLoweredToCall(), llvm::TargetTransformInfo::UnrollingPreferences::OptSizeThreshold, llvm::TargetTransformInfo::UnrollingPreferences::Partial, llvm::TargetTransformInfo::UnrollingPreferences::PartialOptSizeThreshold, llvm::TargetTransformInfo::UnrollingPreferences::PartialThreshold, llvm::PartialUnrollingThreshold, llvm::TargetTransformInfo::UnrollingPreferences::Runtime, and llvm::TargetTransformInfo::UnrollingPreferences::UpperBound.
Referenced by llvm::ARMTTIImpl::getUnrollingPreferences(), and llvm::RISCVTTIImpl::getUnrollingPreferences().
|
inline |
Definition at line 1281 of file BasicTTIImpl.h.
|
inline |
Definition at line 1275 of file BasicTTIImpl.h.
References llvm::BasicTTIImplBase< T >::getRegUsageForType(), and llvm::Type::getScalarType().
Referenced by llvm::WebAssemblyTTIImpl::getVectorInstrCost().
|
inline |
Definition at line 2626 of file BasicTTIImpl.h.
|
inline |
Definition at line 758 of file BasicTTIImpl.h.
|
inline |
Definition at line 281 of file BasicTTIImpl.h.
|
inline |
Definition at line 536 of file BasicTTIImpl.h.
References llvm::BasicTTIImplBase< T >::DL, llvm::ISD::FSQRT, llvm::TargetLoweringBase::getValueType(), llvm::TargetLoweringBase::isOperationLegalOrCustom(), and llvm::TargetLoweringBase::isTypeLegal().
|
inline |
Definition at line 971 of file BasicTTIImpl.h.
References llvm::FixedVectorType::get(), llvm::VectorType::getElementCount(), llvm::VectorType::getElementType(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getKnownMinValue(), llvm::ShuffleVectorInst::isExtractSubvectorMask(), llvm::ShuffleVectorInst::isInsertSubvectorMask(), llvm::ShuffleVectorInst::isReverseMask(), llvm::ShuffleVectorInst::isSelectMask(), llvm::ShuffleVectorInst::isSpliceMask(), llvm::ShuffleVectorInst::isTransposeMask(), llvm::ShuffleVectorInst::isZeroEltSplatMask(), llvm::TargetTransformInfo::SK_Broadcast, llvm::TargetTransformInfo::SK_ExtractSubvector, llvm::TargetTransformInfo::SK_InsertSubvector, llvm::TargetTransformInfo::SK_PermuteSingleSrc, llvm::TargetTransformInfo::SK_PermuteTwoSrc, llvm::TargetTransformInfo::SK_Reverse, llvm::TargetTransformInfo::SK_Select, llvm::TargetTransformInfo::SK_Splice, and llvm::TargetTransformInfo::SK_Transpose.
Referenced by llvm::BasicTTIImplBase< T >::getShuffleCost().
|
inline |
Definition at line 680 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::instCombineIntrinsic().
Definition at line 285 of file BasicTTIImpl.h.
|
inline |
Definition at line 543 of file BasicTTIImpl.h.
|
inline |
Definition at line 664 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::isHardwareLoopProfitable().
|
inline |
Definition at line 377 of file BasicTTIImpl.h.
References llvm::BasicTTIImplBase< T >::DL, llvm::TargetLoweringBase::getValueType(), and llvm::TargetLoweringBase::isIndexedLoadLegal().
|
inline |
Definition at line 383 of file BasicTTIImpl.h.
References llvm::BasicTTIImplBase< T >::DL, llvm::TargetLoweringBase::getValueType(), and llvm::TargetLoweringBase::isIndexedStoreLegal().
|
inline |
Definition at line 328 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::isLegalAddImmediate().
|
inline |
Definition at line 340 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::AddrMode::BaseGV, llvm::TargetLoweringBase::AddrMode::BaseOffs, llvm::BasicTTIImplBase< T >::DL, llvm::TargetLoweringBase::AddrMode::HasBaseReg, I, llvm::TargetLoweringBase::isLegalAddressingMode(), llvm::TargetLoweringBase::AddrMode::ScalableOffset, and llvm::TargetLoweringBase::AddrMode::Scale.
Referenced by llvm::BasicTTIImplBase< T >::getScalingFactorCost().
|
inline |
Definition at line 332 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::isLegalAddScalableImmediate().
|
inline |
Definition at line 336 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::isLegalICmpImmediate().
|
inline |
Definition at line 389 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::isLSRCostLess().
|
inline |
Definition at line 305 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::getTargetMachine(), and llvm::TargetMachine::isNoopAddrSpaceCast().
|
inline |
Definition at line 393 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::isNumRegsMajorCostOfLSR().
|
inline |
Definition at line 402 of file BasicTTIImpl.h.
References I, and llvm::TargetTransformInfoImplBase::isProfitableLSRChainElement().
|
inline |
Definition at line 424 of file BasicTTIImpl.h.
References I, and llvm::TargetLoweringBase::isProfitableToHoist().
|
inline |
Definition at line 313 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::getTargetMachine(), llvm::TargetMachine::Options, llvm::ThreadModel::Single, and llvm::TargetOptions::ThreadModel.
|
inline |
Definition at line 283 of file BasicTTIImpl.h.
|
inline |
Definition at line 420 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::isTruncateFree().
|
inline |
Definition at line 430 of file BasicTTIImpl.h.
References llvm::BasicTTIImplBase< T >::DL, llvm::TargetLoweringBase::getValueType(), and llvm::TargetLoweringBase::isTypeLegal().
|
inline |
Definition at line 287 of file BasicTTIImpl.h.
|
inline |
Definition at line 759 of file BasicTTIImpl.h.
|
inline |
Definition at line 671 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::preferPredicateOverEpilogue().
|
inline |
|
inline |
Definition at line 323 of file BasicTTIImpl.h.
|
inline |
Definition at line 505 of file BasicTTIImpl.h.
References llvm::ISD::BR_JT, llvm::ISD::BRIND, and llvm::TargetLoweringBase::isOperationLegalOrCustom().
|
inline |
Relative lookup table entries consist of 32-bit offsets. Do not generate relative lookup tables for large code models in 64-bit achitectures where 32-bit offsets might not be enough.
Definition at line 511 of file BasicTTIImpl.h.
References llvm::Triple::aarch64, llvm::Triple::getArch(), llvm::TargetLoweringBase::getTargetMachine(), llvm::Triple::isArch64Bit(), llvm::Triple::isOSDarwin(), llvm::CodeModel::Large, llvm::CodeModel::Medium, and TM.
|
inline |
Definition at line 397 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::shouldFoldTerminatingConditionAfterLSR().
|
inlinevirtual |
Reimplemented in llvm::GCNTTIImpl.
Definition at line 744 of file BasicTTIImpl.h.
References llvm::MCSubtargetInfo::shouldPrefetchAddressSpace().
|
inline |
Definition at line 686 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::simplifyDemandedUseBitsIntrinsic().
|
inline |
Definition at line 693 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::simplifyDemandedVectorEltsIntrinsic().
|
inline |
Definition at line 428 of file BasicTTIImpl.h.
References llvm::TargetSubtargetInfo::useAA().
|
protected |
Definition at line 39 of file TargetTransformInfoImpl.h.
Referenced by llvm::BasicTTIImplBase< T >::getCastInstrCost(), llvm::BasicTTIImplBase< T >::getEstimatedNumberOfCaseClusters(), llvm::BasicTTIImplBase< T >::getFPOpCost(), llvm::BasicTTIImplBase< T >::getIntrinsicInstrCost(), llvm::BasicTTIImplBase< T >::getRegUsageForType(), llvm::BasicTTIImplBase< T >::getScalingFactorCost(), llvm::BasicTTIImplBase< T >::getStoreMinimumVF(), llvm::BasicTTIImplBase< T >::getTypeLegalizationCost(), llvm::BasicTTIImplBase< T >::haveFastSqrt(), llvm::BasicTTIImplBase< T >::isIndexedLoadLegal(), llvm::BasicTTIImplBase< T >::isIndexedStoreLegal(), llvm::BasicTTIImplBase< T >::isLegalAddressingMode(), llvm::BasicTTIImplBase< T >::isTypeLegal(), and llvm::BasicTTIImplBase< T >::preferToKeepConstantsAttached().