LLVM 20.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 80 of file BasicTTIImpl.h.
|
inlineexplicitprotected |
Definition at line 263 of file BasicTTIImpl.h.
|
protectedvirtualdefault |
|
inline |
Definition at line 304 of file BasicTTIImpl.h.
|
inline |
Definition at line 589 of file BasicTTIImpl.h.
|
inline |
Definition at line 272 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::allowsMisalignedMemoryAccesses(), llvm::BitWidth, E, llvm::CallingConv::Fast, llvm::EVT::getIntegerVT(), and llvm::MachineMemOperand::MONone.
|
inline |
Definition at line 280 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::getTargetMachine().
|
inline |
Definition at line 313 of file BasicTTIImpl.h.
|
inlinevirtual |
Reimplemented in llvm::SystemZTTIImpl.
Definition at line 756 of file BasicTTIImpl.h.
References llvm::MCSubtargetInfo::enableWritePrefetching().
|
inline |
Definition at line 2655 of file BasicTTIImpl.h.
|
inline |
Definition at line 932 of file BasicTTIImpl.h.
References llvm::TargetTransformInfo::OK_AnyValue, and llvm::TargetTransformInfo::OP_None.
Referenced by llvm::WebAssemblyTTIImpl::getArithmeticInstrCost().
|
inline |
Definition at line 2774 of file BasicTTIImpl.h.
References assert(), CostKind, llvm::BasicTTIImplBase< T >::getOrderedReductionCost(), llvm::BasicTTIImplBase< T >::getTreeReductionCost(), and llvm::TargetTransformInfo::requiresOrderedReduction().
|
inline |
Definition at line 322 of file BasicTTIImpl.h.
References llvm::TargetMachine::getAssumedAddrSpace(), and llvm::TargetLoweringBase::getTargetMachine().
|
inlinevirtual |
Reimplemented in llvm::X86TTIImpl.
Definition at line 726 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 736 of file BasicTTIImpl.h.
References llvm::MCSubtargetInfo::getCacheLineSize().
|
inlinevirtual |
Reimplemented in llvm::X86TTIImpl.
Definition at line 720 of file BasicTTIImpl.h.
References llvm::BasicTTIImplBase< T >::getCacheSize().
Referenced by llvm::BasicTTIImplBase< T >::getCacheSize().
|
inline |
Definition at line 590 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 2632 of file BasicTTIImpl.h.
|
inline |
Definition at line 1087 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 1256 of file BasicTTIImpl.h.
References CostKind, llvm::TargetTransformInfoImplBase::getCFInstrCost(), and I.
|
inline |
Definition at line 1261 of file BasicTTIImpl.h.
References llvm::TargetTransformInfo::OK_AnyValue, and llvm::TargetTransformInfo::OP_None.
|
inline |
Definition at line 683 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::getEpilogueVectorizationMinVF().
|
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 458 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, Range, llvm::APInt::sgt(), llvm::SmallPtrSetImplBase::size(), and llvm::APInt::slt().
|
inline |
Definition at line 2833 of file BasicTTIImpl.h.
References CostKind, llvm::IntegerType::get(), llvm::VectorType::get(), llvm::Type::getContext(), llvm::Type::getInt1Ty(), and llvm::TargetTransformInfo::None.
|
inline |
Definition at line 1247 of file BasicTTIImpl.h.
References CostKind, llvm::VectorType::getElementType(), Index, llvm::TargetTransformInfo::None, and llvm::TargetTransformInfo::TCK_RecipThroughput.
|
inline |
Definition at line 308 of file BasicTTIImpl.h.
|
inline |
|
inline |
Definition at line 1433 of file BasicTTIImpl.h.
References CostKind.
|
inline |
Definition at line 452 of file BasicTTIImpl.h.
References CostKind, llvm::TargetTransformInfoImplCRTPBase< T >::getGEPCost(), Operands, and Ptr.
|
inline |
Definition at line 594 of file BasicTTIImpl.h.
|
inline |
Definition at line 588 of file BasicTTIImpl.h.
|
inline |
Definition at line 1454 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(), Index, llvm::InstructionCost::isValid(), llvm::BitVector::set(), llvm::APInt::setBit(), and llvm::ArrayRef< T >::size().
|
inline |
Get intrinsic cost based on arguments.
Definition at line 1598 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::DataLayout::getABITypeAlign(), 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, Index, 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::Intrinsic::isTargetIntrinsic(), llvm::IntrinsicCostAttributes::isTypeBasedOnly(), llvm::ElementCount::isVector(), llvm::VPBinOpIntrinsic::isVPBinOp(), llvm::VPCastIntrinsic::isVPCast(), llvm::VPCmpIntrinsic::isVPCmp(), 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::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 1425 of file BasicTTIImpl.h.
References CostKind.
|
inline |
Definition at line 930 of file BasicTTIImpl.h.
|
inlinevirtual |
Definition at line 752 of file BasicTTIImpl.h.
References llvm::MCSubtargetInfo::getMaxPrefetchIterationsAhead().
|
inline |
Definition at line 773 of file BasicTTIImpl.h.
|
inline |
Definition at line 1381 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 2785 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 744 of file BasicTTIImpl.h.
References llvm::MCSubtargetInfo::getMinPrefetchStride().
|
inline |
Definition at line 2861 of file BasicTTIImpl.h.
References CostKind, llvm::VectorType::get(), and llvm::TargetTransformInfo::None.
|
inline |
Definition at line 2638 of file BasicTTIImpl.h.
References llvm::divideCeil(), llvm::Type::getContext(), llvm::VectorType::getElementType(), llvm::EVT::getTypeForEVT(), llvm::BasicTTIImplBase< T >::getTypeLegalizationCost(), and llvm::has_single_bit().
|
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 849 of file BasicTTIImpl.h.
References A, assert(), CostKind, E, llvm::BasicTTIImplBase< T >::getScalarizationOverhead(), I, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::Type::isFPOrFPVectorTy(), llvm::Type::isIntOrIntVectorTy(), and llvm::Type::isPtrOrPtrVectorTy().
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 2757 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 668 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 332 of file BasicTTIImpl.h.
References llvm::TargetMachine::getPredicatedAddrSpace(), and llvm::TargetLoweringBase::getTargetMachine().
|
inline |
Definition at line 366 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::getPreferredLargeGEPBaseOffset().
|
inline |
Definition at line 692 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::getPreferredTailFoldingStyle().
|
inlinevirtual |
Reimplemented in llvm::GCNTTIImpl, llvm::HexagonTTIImpl, llvm::PPCTTIImpl, and llvm::SystemZTTIImpl.
Definition at line 740 of file BasicTTIImpl.h.
References llvm::MCSubtargetInfo::getPrefetchDistance().
|
inline |
Definition at line 769 of file BasicTTIImpl.h.
References llvm::TypeSize::getFixed().
|
inline |
Definition at line 447 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 1347 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 833 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 780 of file BasicTTIImpl.h.
Referenced by llvm::BasicTTIImplBase< T >::getCastInstrCost(), 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 878 of file BasicTTIImpl.h.
References CostKind, llvm::BasicTTIImplBase< T >::getOperandsScalarizationOverhead(), llvm::BasicTTIImplBase< T >::getScalarizationOverhead(), and RetTy.
|
inline |
Definition at line 418 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 1057 of file BasicTTIImpl.h.
|
inline |
Definition at line 370 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 1442 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 2681 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 1971 of file BasicTTIImpl.h.
References llvm::ISD::ABS, 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::BasicTTIImplBase< T >::DL, llvm::ISD::FABS, llvm::ISD::FACOS, llvm::ISD::FASIN, llvm::ISD::FATAN, llvm::ISD::FATAN2, llvm::ISD::FCANONICALIZE, llvm::ISD::FCEIL, llvm::CmpInst::FCMP_UNO, llvm::ISD::FCOPYSIGN, llvm::ISD::FCOS, llvm::ISD::FCOSH, 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::FMAXIMUMNUM, llvm::ISD::FMAXNUM, llvm::ISD::FMINIMUM, llvm::ISD::FMINIMUMNUM, llvm::ISD::FMINNUM, llvm::ISD::FNEARBYINT, llvm::ISD::FP_TO_SINT_SAT, llvm::ISD::FP_TO_UINT_SAT, llvm::ISD::FPOW, llvm::ISD::FRINT, llvm::ISD::FROUND, llvm::ISD::FROUNDEVEN, llvm::ISD::FSIN, llvm::ISD::FSINCOS, llvm::ISD::FSINH, llvm::ISD::FSQRT, llvm::ISD::FTAN, llvm::ISD::FTANH, llvm::ISD::FTRUNC, llvm::IntrinsicCostAttributes::getArgTypes(), llvm::getArithmeticReductionInstruction(), llvm::IntrinsicCostAttributes::getFlags(), llvm::CmpIntrinsic::getGTPredicate(), llvm::IntrinsicCostAttributes::getID(), llvm::InstructionCost::getInvalid(), llvm::CmpIntrinsic::getLTPredicate(), llvm::getMinMaxReductionIntrinsicOp(), getNumElements(), llvm::IntrinsicCostAttributes::getReturnType(), llvm::IntrinsicCostAttributes::getScalarizationCost(), llvm::BasicTTIImplBase< T >::getScalarizationOverhead(), llvm::Type::getScalarSizeInBits(), llvm::Type::getScalarType(), llvm::BasicTTIImplBase< T >::getTypeLegalizationCost(), llvm::TargetLoweringBase::getValueType(), llvm::Type::getWithNewBitWidth(), llvm::CmpInst::ICMP_EQ, 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::ISD::SADDO, llvm::ISD::SADDSAT, llvm::ISD::SCMP, llvm::TargetLoweringBase::shouldExpandCmpUsingSelects(), llvm::TargetTransformInfo::SK_Broadcast, llvm::IntrinsicCostAttributes::skipScalarizationCost(), llvm::ISD::SMAX, llvm::ISD::SMIN, llvm::ISD::SMULFIX, llvm::ISD::SMULO, llvm::ISD::SSUBO, llvm::ISD::SSUBSAT, llvm::ISD::STRICT_FMA, llvm::TargetTransformInfo::TCC_Expensive, llvm::TargetTransformInfo::TCK_CodeSize, llvm::ISD::UADDO, llvm::ISD::UADDSAT, llvm::ISD::UCMP, llvm::ISD::UMAX, llvm::ISD::UMIN, llvm::ISD::UMULFIX, llvm::ISD::UMULO, llvm::ISD::USUBO, and llvm::ISD::USUBSAT.
Referenced by llvm::BasicTTIImplBase< T >::getIntrinsicInstrCost().
|
inline |
Estimate the cost of type-legalization and the legalized type.
Definition at line 896 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 >::getInterleavedMemoryOpCost(), llvm::BasicTTIImplBase< T >::getIntrinsicInstrCost(), llvm::BasicTTIImplBase< T >::getNumberOfParts(), and llvm::BasicTTIImplBase< T >::getTypeBasedIntrinsicInstrCost().
|
inline |
Definition at line 596 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 1334 of file BasicTTIImpl.h.
|
inline |
Definition at line 1316 of file BasicTTIImpl.h.
References llvm::BasicTTIImplBase< T >::getRegUsageForType(), and llvm::Type::getScalarType().
Referenced by llvm::WebAssemblyTTIImpl::getVectorInstrCost().
|
inline |
ScalarUserAndIdx | encodes the information about extracts from a vector with 'Scalar' being the value being extracted,'User' being the user of the extract(nullptr if user is not known before vectorization) and 'Idx' being the extract lane. |
Definition at line 1326 of file BasicTTIImpl.h.
|
inline |
Definition at line 2880 of file BasicTTIImpl.h.
|
inline |
Definition at line 774 of file BasicTTIImpl.h.
|
inline |
Definition at line 294 of file BasicTTIImpl.h.
|
inline |
Definition at line 548 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 1009 of file BasicTTIImpl.h.
References llvm::FixedVectorType::get(), llvm::VectorType::getElementCount(), llvm::VectorType::getElementType(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getKnownMinValue(), Index, 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.
|
inline |
Definition at line 696 of file BasicTTIImpl.h.
References II, and llvm::TargetTransformInfoImplBase::instCombineIntrinsic().
Definition at line 298 of file BasicTTIImpl.h.
|
inline |
Definition at line 555 of file BasicTTIImpl.h.
|
inline |
Definition at line 676 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::isHardwareLoopProfitable().
|
inline |
Definition at line 390 of file BasicTTIImpl.h.
References llvm::BasicTTIImplBase< T >::DL, llvm::TargetLoweringBase::getValueType(), and llvm::TargetLoweringBase::isIndexedLoadLegal().
|
inline |
Definition at line 396 of file BasicTTIImpl.h.
References llvm::BasicTTIImplBase< T >::DL, llvm::TargetLoweringBase::getValueType(), and llvm::TargetLoweringBase::isIndexedStoreLegal().
|
inline |
Definition at line 341 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::isLegalAddImmediate().
|
inline |
Definition at line 353 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 345 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::isLegalAddScalableImmediate().
|
inline |
Definition at line 349 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::isLegalICmpImmediate().
|
inline |
Definition at line 402 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::isLSRCostLess().
|
inline |
Definition at line 318 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::getTargetMachine(), and llvm::TargetMachine::isNoopAddrSpaceCast().
|
inline |
Definition at line 406 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::isNumRegsMajorCostOfLSR().
|
inline |
Definition at line 414 of file BasicTTIImpl.h.
References I, and llvm::TargetTransformInfoImplBase::isProfitableLSRChainElement().
|
inline |
Definition at line 436 of file BasicTTIImpl.h.
References I, and llvm::TargetLoweringBase::isProfitableToHoist().
|
inline |
Definition at line 326 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::getTargetMachine(), llvm::TargetMachine::Options, llvm::ThreadModel::Single, and llvm::TargetOptions::ThreadModel.
|
inline |
Definition at line 296 of file BasicTTIImpl.h.
|
inline |
Definition at line 813 of file BasicTTIImpl.h.
|
inline |
Definition at line 822 of file BasicTTIImpl.h.
|
inline |
Definition at line 817 of file BasicTTIImpl.h.
|
inline |
Definition at line 827 of file BasicTTIImpl.h.
|
inline |
Definition at line 432 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::isTruncateFree().
|
inline |
Definition at line 442 of file BasicTTIImpl.h.
References llvm::BasicTTIImplBase< T >::DL, llvm::TargetLoweringBase::getValueType(), and llvm::TargetLoweringBase::isTypeLegal().
|
inline |
Definition at line 300 of file BasicTTIImpl.h.
|
inline |
Definition at line 775 of file BasicTTIImpl.h.
|
inline |
Definition at line 687 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::preferPredicateOverEpilogue().
|
inline |
|
inline |
Definition at line 336 of file BasicTTIImpl.h.
|
inline |
Definition at line 517 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 523 of file BasicTTIImpl.h.
References llvm::Triple::aarch64, llvm::Triple::getArch(), llvm::TargetLoweringBase::getTargetMachine(), llvm::Triple::isArch64Bit(), llvm::Triple::isOSDarwin(), llvm::CodeModel::Large, and llvm::CodeModel::Medium.
|
inline |
Definition at line 410 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::shouldDropLSRSolutionIfLessProfitable().
|
inlinevirtual |
Reimplemented in llvm::GCNTTIImpl.
Definition at line 760 of file BasicTTIImpl.h.
References llvm::MCSubtargetInfo::shouldPrefetchAddressSpace().
|
inline |
Definition at line 702 of file BasicTTIImpl.h.
References II, and llvm::TargetTransformInfoImplBase::simplifyDemandedUseBitsIntrinsic().
|
inline |
Definition at line 709 of file BasicTTIImpl.h.
References II, and llvm::TargetTransformInfoImplBase::simplifyDemandedVectorEltsIntrinsic().
|
inline |
Definition at line 440 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 >::getTypeBasedIntrinsicInstrCost(), 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().