LLVM 18.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 |
![]() | |
TargetTransformInfoImplCRTPBase (const DataLayout &DL) | |
![]() | |
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 |
![]() | |
const DataLayout & | DL |
Additional Inherited Members | |
![]() | |
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 79 of file BasicTTIImpl.h.
|
inlineexplicitprotected |
Definition at line 262 of file BasicTTIImpl.h.
|
protectedvirtualdefault |
|
inline |
Definition at line 289 of file BasicTTIImpl.h.
|
inline |
Definition at line 540 of file BasicTTIImpl.h.
|
inline |
Definition at line 271 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 298 of file BasicTTIImpl.h.
|
inlinevirtual |
Reimplemented in llvm::SystemZTTIImpl.
Definition at line 703 of file BasicTTIImpl.h.
References llvm::MCSubtargetInfo::enableWritePrefetching().
|
inline |
Definition at line 2244 of file BasicTTIImpl.h.
|
inline |
Definition at line 856 of file BasicTTIImpl.h.
References llvm::TargetTransformInfo::OK_AnyValue, and llvm::TargetTransformInfo::OP_None.
Referenced by llvm::WebAssemblyTTIImpl::getArithmeticInstrCost().
|
inline |
Definition at line 2364 of file BasicTTIImpl.h.
References assert(), CostKind, llvm::BasicTTIImplBase< T >::getOrderedReductionCost(), llvm::BasicTTIImplBase< T >::getTreeReductionCost(), and llvm::TargetTransformInfo::requiresOrderedReduction().
|
inline |
Definition at line 307 of file BasicTTIImpl.h.
References llvm::TargetMachine::getAssumedAddrSpace(), and llvm::TargetLoweringBase::getTargetMachine().
|
inlinevirtual |
Reimplemented in llvm::X86TTIImpl.
Definition at line 673 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::getCacheAssociativity(), and llvm::MCSubtargetInfo::getCacheAssociativity().
|
inlinevirtual |
Reimplemented in llvm::HexagonTTIImpl, llvm::PPCTTIImpl, and llvm::SystemZTTIImpl.
Definition at line 683 of file BasicTTIImpl.h.
References llvm::MCSubtargetInfo::getCacheLineSize().
|
inlinevirtual |
Reimplemented in llvm::X86TTIImpl.
Definition at line 667 of file BasicTTIImpl.h.
References llvm::BasicTTIImplBase< T >::getCacheSize().
Referenced by llvm::BasicTTIImplBase< T >::getCacheSize().
|
inline |
Definition at line 541 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 2233 of file BasicTTIImpl.h.
|
inline |
Definition at line 1007 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 1176 of file BasicTTIImpl.h.
References CostKind, llvm::TargetTransformInfoImplBase::getCFInstrCost(), and I.
|
inline |
Definition at line 1181 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 428 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 2424 of file BasicTTIImpl.h.
References CostKind, llvm::VectorType::get(), and llvm::TargetTransformInfo::None.
|
inline |
Definition at line 1167 of file BasicTTIImpl.h.
References CostKind, llvm::VectorType::getElementType(), llvm::TargetTransformInfo::None, and llvm::TargetTransformInfo::TCK_RecipThroughput.
|
inline |
Definition at line 293 of file BasicTTIImpl.h.
|
inline |
|
inline |
Definition at line 1337 of file BasicTTIImpl.h.
References CostKind.
|
inline |
Definition at line 422 of file BasicTTIImpl.h.
References CostKind, llvm::TargetTransformInfoImplCRTPBase< T >::getGEPCost(), Operands, and Ptr.
|
inline |
Definition at line 545 of file BasicTTIImpl.h.
|
inline |
Definition at line 539 of file BasicTTIImpl.h.
|
inline |
Definition at line 1346 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 1490 of file BasicTTIImpl.h.
References CostKind, llvm::BasicTTIImplBase< T >::DL, llvm::Exponent, llvm::VectorType::get(), llvm::IntrinsicCostAttributes::getArgs(), llvm::IntrinsicCostAttributes::getArgTypes(), llvm::ElementCount::getFixed(), llvm::IntrinsicCostAttributes::getFlags(), llvm::IntrinsicCostAttributes::getID(), llvm::IntrinsicCostAttributes::getInst(), 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(), 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::TargetTransformInfo::OperandValueInfo::Kind, llvm::TargetTransformInfo::OK_UniformConstantValue, llvm::TargetTransformInfo::OP_None, llvm::TargetTransformInfo::OP_PowerOf2, 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 1330 of file BasicTTIImpl.h.
References CostKind.
|
inline |
Definition at line 854 of file BasicTTIImpl.h.
|
inlinevirtual |
Definition at line 699 of file BasicTTIImpl.h.
References llvm::MCSubtargetInfo::getMaxPrefetchIterationsAhead().
|
inline |
Definition at line 720 of file BasicTTIImpl.h.
|
inline |
Definition at line 1286 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 2375 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 691 of file BasicTTIImpl.h.
References llvm::MCSubtargetInfo::getMinPrefetchStride().
|
inline |
Definition at line 2440 of file BasicTTIImpl.h.
References CostKind, llvm::VectorType::get(), and llvm::TargetTransformInfo::None.
|
inline |
Definition at line 2239 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 773 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 2347 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 619 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 317 of file BasicTTIImpl.h.
References llvm::TargetMachine::getPredicatedAddrSpace(), and llvm::TargetLoweringBase::getTargetMachine().
|
inline |
Definition at line 639 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::getPreferredTailFoldingStyle().
|
inlinevirtual |
Reimplemented in llvm::HexagonTTIImpl, llvm::PPCTTIImpl, and llvm::SystemZTTIImpl.
Definition at line 687 of file BasicTTIImpl.h.
References llvm::MCSubtargetInfo::getPrefetchDistance().
|
inline |
Definition at line 716 of file BasicTTIImpl.h.
References llvm::TypeSize::getFixed().
|
inline |
Definition at line 417 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 1252 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 757 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 727 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 802 of file BasicTTIImpl.h.
References CostKind, llvm::BasicTTIImplBase< T >::getOperandsScalarizationOverhead(), llvm::BasicTTIImplBase< T >::getScalarizationOverhead(), and RetTy.
|
inline |
Definition at line 389 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::AddrMode::BaseGV, llvm::TargetLoweringBase::AddrMode::BaseOffs, llvm::BasicTTIImplBase< T >::DL, llvm::TargetLoweringBase::AddrMode::HasBaseReg, llvm::BasicTTIImplBase< T >::isLegalAddressingMode(), and llvm::TargetLoweringBase::AddrMode::Scale.
|
inline |
Definition at line 978 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 345 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 |
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 2270 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 1714 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::IntrinsicCostAttributes::getFlags(), llvm::IntrinsicCostAttributes::getID(), llvm::InstructionCost::getInvalid(), 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::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 820 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 547 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 1239 of file BasicTTIImpl.h.
|
inline |
Definition at line 1233 of file BasicTTIImpl.h.
References llvm::BasicTTIImplBase< T >::getRegUsageForType(), and llvm::Type::getScalarType().
Referenced by llvm::WebAssemblyTTIImpl::getVectorInstrCost().
|
inline |
Definition at line 2459 of file BasicTTIImpl.h.
|
inline |
Definition at line 721 of file BasicTTIImpl.h.
|
inline |
Definition at line 279 of file BasicTTIImpl.h.
|
inline |
Definition at line 518 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 934 of file BasicTTIImpl.h.
References llvm::any_of(), llvm::FixedVectorType::get(), llvm::VectorType::getElementType(), I, 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 643 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::instCombineIntrinsic().
Definition at line 283 of file BasicTTIImpl.h.
|
inline |
Definition at line 525 of file BasicTTIImpl.h.
|
inline |
Definition at line 627 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::isHardwareLoopProfitable().
|
inline |
Definition at line 365 of file BasicTTIImpl.h.
References llvm::BasicTTIImplBase< T >::DL, llvm::TargetLoweringBase::getValueType(), and llvm::TargetLoweringBase::isIndexedLoadLegal().
|
inline |
Definition at line 371 of file BasicTTIImpl.h.
References llvm::BasicTTIImplBase< T >::DL, llvm::TargetLoweringBase::getValueType(), and llvm::TargetLoweringBase::isIndexedStoreLegal().
|
inline |
Definition at line 326 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::isLegalAddImmediate().
|
inline |
Definition at line 334 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(), and llvm::TargetLoweringBase::AddrMode::Scale.
Referenced by llvm::BasicTTIImplBase< T >::getScalingFactorCost().
|
inline |
Definition at line 330 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::isLegalICmpImmediate().
|
inline |
Definition at line 377 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::isLSRCostLess().
|
inline |
Definition at line 303 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::getTargetMachine(), and llvm::TargetMachine::isNoopAddrSpaceCast().
|
inline |
Definition at line 381 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::isNumRegsMajorCostOfLSR().
|
inline |
Definition at line 385 of file BasicTTIImpl.h.
References I, and llvm::TargetTransformInfoImplBase::isProfitableLSRChainElement().
|
inline |
Definition at line 406 of file BasicTTIImpl.h.
References I, and llvm::TargetLoweringBase::isProfitableToHoist().
|
inline |
Definition at line 311 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::getTargetMachine(), llvm::TargetMachine::Options, llvm::ThreadModel::Single, and llvm::TargetOptions::ThreadModel.
|
inline |
Definition at line 281 of file BasicTTIImpl.h.
|
inline |
Definition at line 402 of file BasicTTIImpl.h.
References llvm::TargetLoweringBase::isTruncateFree().
|
inline |
Definition at line 412 of file BasicTTIImpl.h.
References llvm::BasicTTIImplBase< T >::DL, llvm::TargetLoweringBase::getValueType(), and llvm::TargetLoweringBase::isTypeLegal().
|
inline |
Definition at line 285 of file BasicTTIImpl.h.
|
inline |
Definition at line 722 of file BasicTTIImpl.h.
|
inline |
Definition at line 634 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::preferPredicateOverEpilogue().
|
inline |
Definition at line 321 of file BasicTTIImpl.h.
|
inline |
Definition at line 487 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 493 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.
|
inlinevirtual |
Definition at line 707 of file BasicTTIImpl.h.
References llvm::MCSubtargetInfo::shouldPrefetchAddressSpace().
|
inline |
Definition at line 649 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::simplifyDemandedUseBitsIntrinsic().
|
inline |
Definition at line 656 of file BasicTTIImpl.h.
References llvm::TargetTransformInfoImplBase::simplifyDemandedVectorEltsIntrinsic().
|
inline |
Definition at line 410 of file BasicTTIImpl.h.
References llvm::TargetSubtargetInfo::useAA().
|
protected |
Definition at line 38 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(), and llvm::BasicTTIImplBase< T >::isTypeLegal().