LLVM 22.0.0git
|
#include "Target/RISCV/RISCVTargetTransformInfo.h"
Definition at line 28 of file RISCVTargetTransformInfo.h.
Enumerator | |
---|---|
GPRRC | |
FPRRC | |
VRRC |
Definition at line 423 of file RISCVTargetTransformInfo.h.
|
inlineexplicit |
Definition at line 72 of file RISCVTargetTransformInfo.h.
References F, and llvm::TargetTransformInfoImplBase::getDataLayout().
bool RISCVTTIImpl::canSplatOperand | ( | Instruction * | I, |
int | Operand ) const |
Return true if the (vector) instruction I will be lowered to an instruction with a scalar splat operand for the given Operand number.
Definition at line 2862 of file RISCVTargetTransformInfo.cpp.
References canSplatOperand(), llvm::dyn_cast(), I, and II.
Referenced by canSplatOperand(), getArithmeticInstrCost(), and isProfitableToSinkOperands().
Return true if a vector instruction will lower to a target instruction able to splat the given operand.
Definition at line 2833 of file RISCVTargetTransformInfo.cpp.
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 415 of file RISCVTargetTransformInfo.h.
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 417 of file RISCVTargetTransformInfo.h.
|
overridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 3021 of file RISCVTargetTransformInfo.cpp.
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 113 of file RISCVTargetTransformInfo.h.
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 114 of file RISCVTargetTransformInfo.h.
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 324 of file RISCVTargetTransformInfo.h.
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 330 of file RISCVTargetTransformInfo.h.
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 1568 of file RISCVTargetTransformInfo.cpp.
References CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::getAddressComputationCost(), getArithmeticInstrCost(), llvm::Type::isVectorTy(), and Ptr.
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 2446 of file RISCVTargetTransformInfo.cpp.
References llvm::ISD::ADD, llvm::ISD::AND, canSplatOperand(), CostKind, llvm::ISD::FADD, llvm::ISD::FDIV, llvm::ISD::FMUL, llvm::ISD::FSUB, llvm::BasicTTIImplBase< RISCVTTIImpl >::getArithmeticInstrCost(), getCastInstrCost(), llvm::EVT::getTypeForEVT(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), InstrCost, llvm::isa(), llvm::TargetTransformInfo::OperandValueInfo::isConstant(), llvm::ISD::MUL, llvm::ISD::MULHS, llvm::ISD::MULHU, llvm::TargetTransformInfo::None, llvm::ISD::OR, llvm::TargetLoweringBase::Promote, llvm::ISD::SDIV, llvm::ISD::SHL, llvm::ISD::SRA, llvm::ISD::SREM, llvm::ISD::SRL, llvm::ISD::SUB, llvm::TargetTransformInfo::TCK_RecipThroughput, llvm::ISD::UDIV, llvm::ISD::UREM, and llvm::ISD::XOR.
Referenced by getAddressComputationCost(), and getPointersChainCost().
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 1892 of file RISCVTargetTransformInfo.cpp.
References llvm::ISD::ADD, llvm::ISD::AND, assert(), CostKind, llvm::ISD::FADD, llvm::BasicTTIImplBase< RISCVTTIImpl >::getArithmeticReductionCost(), getCmpSelInstrCost(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, llvm::isa(), llvm::Type::isIntegerTy(), llvm::ISD::OR, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::TargetTransformInfo::requiresOrderedReduction(), and llvm::ISD::XOR.
Referenced by getExtendedReductionCost(), and getMinMaxReductionCost().
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 1579 of file RISCVTargetTransformInfo.cpp.
References assert(), llvm::cast(), CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::ISD::FP_ROUND, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, llvm::IntegerType::get(), llvm::VectorType::get(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getCastInstrCost(), getCastInstrCost(), llvm::TargetTransformInfoImplBase::getDataLayout(), llvm::MVT::getFloatingPointVT(), llvm::Type::getFloatTy(), llvm::MVT::getIntegerVT(), llvm::EVT::getTypeForEVT(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), I, llvm::isa(), llvm::details::FixedOrScalableQuantity< TypeSize, uint64_t >::isKnownLE(), llvm::Log2_32(), llvm::ISD::SIGN_EXTEND, llvm::ISD::SINT_TO_FP, llvm::ISD::TRUNCATE, llvm::ISD::UINT_TO_FP, and llvm::ISD::ZERO_EXTEND.
Referenced by getArithmeticInstrCost(), getCastInstrCost(), getIntrinsicInstrCost(), getMinMaxReductionCost(), getScalarizationOverhead(), getShuffleCost(), and getVectorInstrCost().
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 2268 of file RISCVTargetTransformInfo.cpp.
References CostKind, I, and llvm::TargetTransformInfo::TCK_RecipThroughput.
Referenced by getMinMaxReductionCost().
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 2108 of file RISCVTargetTransformInfo.cpp.
References llvm::all_of(), CostKind, llvm::CmpInst::FCMP_FALSE, llvm::CmpInst::FCMP_OEQ, llvm::CmpInst::FCMP_OGE, llvm::CmpInst::FCMP_OGT, llvm::CmpInst::FCMP_OLE, llvm::CmpInst::FCMP_OLT, llvm::CmpInst::FCMP_ONE, llvm::CmpInst::FCMP_ORD, llvm::CmpInst::FCMP_TRUE, llvm::CmpInst::FCMP_UEQ, llvm::CmpInst::FCMP_UGE, llvm::CmpInst::FCMP_UGT, llvm::CmpInst::FCMP_ULE, llvm::CmpInst::FCMP_ULT, llvm::CmpInst::FCMP_UNE, llvm::CmpInst::FCMP_UNO, llvm::BasicTTIImplBase< RISCVTTIImpl >::getCmpSelInstrCost(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), I, llvm::isa(), llvm::TargetTransformInfo::OperandValueInfo::isConstant(), llvm::CmpInst::isFPPredicate(), llvm::CmpInst::isIntPredicate(), llvm::Type::isVectorTy(), and llvm::TargetTransformInfo::TCK_RecipThroughput.
Referenced by getArithmeticReductionCost(), and getIntrinsicInstrCost().
|
overridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 1159 of file RISCVTargetTransformInfo.cpp.
References A(), CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, getMemoryOpCost(), and llvm::TargetTransformInfo::TCK_RecipThroughput.
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 1097 of file RISCVTargetTransformInfo.cpp.
References llvm::SmallVectorImpl< T >::append(), CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::getExpandCompressMemoryOpCost(), getMemoryOpCost(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), I, isLegalMaskedCompressStore(), isLegalMaskedExpandLoad(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::TargetTransformInfo::TCK_RecipThroughput.
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 2010 of file RISCVTargetTransformInfo.cpp.
References CostKind, getArithmeticReductionCost(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getExtendedReductionCost(), llvm::Type::getScalarSizeInBits(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), and llvm::isa().
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 1072 of file RISCVTargetTransformInfo.cpp.
References llvm::cast(), CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::getGatherScatterOpCost(), getMemoryOpCost(), I, isLegalMaskedGather(), isLegalMaskedScatter(), Ptr, and llvm::TargetTransformInfo::TCK_RecipThroughput.
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 2429 of file RISCVTargetTransformInfo.cpp.
References assert(), llvm::cast(), CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::getIndexedVectorInstrCostFromEnd(), getVectorInstrCost(), and llvm::isa().
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 975 of file RISCVTargetTransformInfo.cpp.
References assert(), llvm::cast(), CostKind, llvm::createInterleaveMask(), llvm::createStrideMask(), llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::FixedVectorType::get(), llvm::VectorType::get(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getInterleavedMemoryOpCost(), llvm::InstructionCost::getInvalid(), getMemoryOpCost(), getShuffleCost(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), llvm::isa(), and llvm::TargetTransformInfo::SK_PermuteSingleSrc.
|
overridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 137 of file RISCVTargetTransformInfo.cpp.
References CostKind, llvm::TargetTransformInfoImplBase::getDataLayout(), and getIntImmCostImpl().
Referenced by getIntImmCostInst().
|
overridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 169 of file RISCVTargetTransformInfo.cpp.
References assert(), canUseShiftPair(), llvm::cast(), CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::TargetTransformInfoImplBase::getDataLayout(), getIntImmCost(), getIntImmCostImpl(), llvm::Type::getPointerAddressSpace(), getValueType(), llvm::Instruction::isCommutative(), llvm::BasicTTIImplBase< RISCVTTIImpl >::isLegalAddImmediate(), and llvm::TargetTransformInfo::TCC_Free.
|
overridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 278 of file RISCVTargetTransformInfo.cpp.
References CostKind, and llvm::TargetTransformInfo::TCC_Free.
|
overridevirtual |
Get intrinsic cost based on arguments.
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 1243 of file RISCVTargetTransformInfo.cpp.
References AbstractManglingParser< Derived, Alloc >::Ops, llvm::CmpInst::BAD_ICMP_PREDICATE, llvm::cast(), CostKind, llvm::CostTableLookup(), llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::CmpInst::FCMP_UNO, llvm::VectorType::get(), llvm::IntrinsicCostAttributes::getArgs(), llvm::IntrinsicCostAttributes::getArgTypes(), getCastInstrCost(), getCmpSelInstrCost(), llvm::IntrinsicCostAttributes::getID(), llvm::Type::getInt1Ty(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getIntrinsicInstrCost(), llvm::InstructionCost::getInvalid(), llvm::IntrinsicCostAttributes::getReturnType(), getShuffleCost(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), llvm::Type::getWithNewBitWidth(), llvm::CmpInst::ICMP_SLT, llvm::TargetTransformInfo::None, llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::TargetTransformInfo::SK_Splice, and VectorIntrinsicCostTable.
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 964 of file RISCVTargetTransformInfo.cpp.
References CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::getMaskedMemoryOpCost(), getMemoryOpCost(), isLegalMaskedLoadStore(), and llvm::TargetTransformInfo::TCK_RecipThroughput.
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 2724 of file RISCVTargetTransformInfo.cpp.
References llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getFixedValue(), getRegisterBitWidth(), llvm::TargetTransformInfo::RGK_FixedWidthVector, and SLPMaxVF.
|
inlineoverridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 406 of file RISCVTargetTransformInfo.h.
References llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::isScalable(), and llvm::ElementCount::isScalar().
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 330 of file RISCVTargetTransformInfo.cpp.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::getMaxVScale(), and llvm::RISCV::RVVBitsPerBlock.
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 2063 of file RISCVTargetTransformInfo.cpp.
References CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::TargetTransformInfoImplBase::getDataLayout(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getMemoryOpCost(), getStoreImmCost(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), I, llvm::details::FixedOrScalableQuantity< TypeSize, uint64_t >::isKnownLT(), llvm::Type::isVectorTy(), llvm::TargetTransformInfo::TCK_CodeSize, and llvm::TargetTransformInfo::TCK_RecipThroughput.
Referenced by getCostOfKeepingLiveOverCall(), getExpandCompressMemoryOpCost(), getGatherScatterOpCost(), getInterleavedMemoryOpCost(), getMaskedMemoryOpCost(), getStridedMemoryOpCost(), and getVectorInstrCost().
|
overridevirtual |
Try to calculate op costs for min/max reduction operations.
CondTy | Conditional type for the Select instruction. |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 1786 of file RISCVTargetTransformInfo.cpp.
References CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, getArithmeticReductionCost(), getCastInstrCost(), getCFInstrCost(), llvm::Type::getContext(), llvm::Type::getIntNTy(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getMinMaxReductionCost(), llvm::Type::getScalarSizeInBits(), llvm::Type::getScalarType(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), llvm::isa(), llvm_unreachable, llvm::FastMathFlags::noNaNs(), and llvm::TargetTransformInfo::None.
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 482 of file RISCVTargetTransformInfo.h.
|
overridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 2740 of file RISCVTargetTransformInfo.cpp.
References RVVMinTripCount.
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 163 of file RISCVTargetTransformInfo.h.
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 424 of file RISCVTargetTransformInfo.h.
References FPRRC, GPRRC, llvm_unreachable, and VRRC.
|
overridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 295 of file RISCVTargetTransformInfo.cpp.
References CostKind, llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::divideCoefficientBy(), llvm::VectorType::get(), llvm::InstructionCost::getInvalid(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), llvm::Type::isIntegerTy(), and llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::isKnownMultipleOf().
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 2699 of file RISCVTargetTransformInfo.cpp.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::getPeelingPreferences().
|
overridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 2576 of file RISCVTargetTransformInfo.cpp.
References llvm::sampleprof::Base, CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::dyn_cast(), llvm::enumerate(), GEP, getArithmeticInstrCost(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getGEPCost(), I, llvm::BasicTTIImplBase< RISCVTTIImpl >::isLegalAddressingMode(), and llvm::TargetTransformInfo::TCC_Free.
|
overridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 290 of file RISCVTargetTransformInfo.cpp.
References assert(), llvm::isPowerOf2_32(), llvm::TargetTransformInfo::PSK_FastHardware, and llvm::TargetTransformInfo::PSK_Software.
|
overridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 2749 of file RISCVTargetTransformInfo.cpp.
References llvm::TargetTransformInfo::AMK_PostIndexed, and llvm::TargetTransformInfoImplBase::getPreferredAddressingMode().
|
inlineoverridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 121 of file RISCVTargetTransformInfo.h.
References llvm::DataWithEVL, and llvm::None.
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 345 of file RISCVTargetTransformInfo.cpp.
References llvm::bit_floor(), llvm::TypeSize::getFixed(), llvm::TypeSize::getScalable(), llvm_unreachable, llvm::TargetTransformInfo::RGK_FixedWidthVector, llvm::TargetTransformInfo::RGK_ScalableVector, llvm::TargetTransformInfo::RGK_Scalar, llvm::RISCV::RVVBitsPerBlock, and RVVRegisterWidthLMUL.
Referenced by getMaximumVF().
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 447 of file RISCVTargetTransformInfo.h.
References FPRRC, llvm::Type::getScalarType(), GPRRC, llvm::Type::isDoubleTy(), llvm::Type::isFloatTy(), llvm::Type::isHalfTy(), llvm::Vector, and VRRC.
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 464 of file RISCVTargetTransformInfo.h.
References FPRRC, GPRRC, llvm_unreachable, and VRRC.
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 2704 of file RISCVTargetTransformInfo.cpp.
References llvm::cast(), llvm::divideCeil(), llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::VectorType::get(), llvm::Type::getFloatTy(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getRegUsageForType(), llvm::Type::isBFloatTy(), llvm::Type::isHalfTy(), llvm::RISCV::RVVBitsPerBlock, and Size.
|
overridevirtual |
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
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 925 of file RISCVTargetTransformInfo.cpp.
References assert(), llvm::cast(), CostKind, getCastInstrCost(), llvm::InstructionCost::getInvalid(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getScalarizationOverhead(), getScalarizationOverhead(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), llvm::isa(), isM1OrSmaller(), and llvm::TargetTransformInfo::None.
Referenced by getScalarizationOverhead().
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 607 of file RISCVTargetTransformInfo.cpp.
References assert(), llvm::MVT::bitsLE(), llvm::CallingConv::C, llvm::cast(), CostKind, costShuffleViaSplitting(), costShuffleViaVRegSplitting(), llvm::createStrideMask(), llvm::dyn_cast(), llvm::equal(), llvm::FixedVectorType::get(), llvm::IntegerType::get(), llvm::VectorType::get(), getCastInstrCost(), llvm::FixedVectorType::getDoubleElementsVectorType(), llvm::VectorType::getElementCount(), llvm::Type::getInt1Ty(), llvm::InstructionCost::getInvalid(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getKnownMinValue(), llvm::RISCVTargetLowering::getM1VT(), llvm::Operator::getOpcode(), llvm::MVT::getScalarSizeInBits(), llvm::Type::getScalarType(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getShuffleCost(), getShuffleCost(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), llvm::MVT::getVectorMinNumElements(), getVRGatherIndexType(), I, llvm::BasicTTIImplBase< RISCVTTIImpl >::improveShuffleKindFromMask(), llvm::isInt(), llvm::ShuffleVectorInst::isInterleaveMask(), isRepeatedConcatMask(), llvm::Type::isScalableTy(), llvm::InstructionCost::isValid(), llvm::Log2_32(), llvm::TargetTransformInfo::None, shouldSplit(), 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, llvm::TargetTransformInfo::SK_Transpose, and llvm::TargetTransformInfo::TCC_Free.
Referenced by getInterleavedMemoryOpCost(), getIntrinsicInstrCost(), and getShuffleCost().
InstructionCost RISCVTTIImpl::getStoreImmCost | ( | Type * | VecTy, |
TTI::OperandValueInfo | OpInfo, | ||
TTI::TargetCostKind | CostKind ) const |
Return the cost of materializing an immediate for a value operand of a store instruction.
Definition at line 2045 of file RISCVTargetTransformInfo.cpp.
References assert(), CostKind, and llvm::isa().
Referenced by getMemoryOpCost().
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 1135 of file RISCVTargetTransformInfo.cpp.
References llvm::cast(), CostKind, getMemoryOpCost(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getStridedMemoryOpCost(), I, isLegalStridedLoadStore(), Ptr, llvm::TargetTransformInfo::TCC_Basic, and llvm::TargetTransformInfo::TCK_CodeSize.
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 2623 of file RISCVTargetTransformInfo.cpp.
References llvm::cast(), llvm::dbgs(), F, llvm::TargetTransformInfo::UnrollingPreferences::Force, llvm::getBooleanLoopAttribute(), getCalledFunction(), llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), llvm::BasicTTIImplBase< T >::getUnrollingPreferences(), I, llvm::isa(), llvm::TargetTransformInfoImplBase::isLoweredToCall(), LLVM_DEBUG, Operands, llvm::TargetTransformInfo::UnrollingPreferences::OptSizeThreshold, llvm::TargetTransformInfo::UnrollingPreferences::Partial, llvm::TargetTransformInfo::UnrollingPreferences::PartialOptSizeThreshold, llvm::TargetTransformInfo::UnrollingPreferences::Runtime, llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::TargetTransformInfo::TCK_SizeAndLatency, llvm::TargetTransformInfo::UnrollingPreferences::UnrollAndJam, llvm::TargetTransformInfo::UnrollingPreferences::UnrollRemainder, and llvm::TargetTransformInfo::UnrollingPreferences::UpperBound.
|
inlineoverridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 1443 of file BasicTTIImpl.h.
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 2277 of file RISCVTargetTransformInfo.cpp.
References assert(), llvm::cast(), CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::IntegerType::get(), llvm::VectorType::get(), getCastInstrCost(), llvm::Type::getContext(), getMemoryOpCost(), llvm::Type::getScalarSizeInBits(), llvm::Type::getScalarType(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getVectorInstrCost(), getVectorInstrCost(), llvm::Type::isIntegerTy(), llvm::isUInt(), llvm::Type::isVectorTy(), and llvm::TargetTransformInfo::None.
Referenced by getIndexedVectorInstrCostFromEnd(), and getVectorInstrCost().
|
inlineoverridevirtual |
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. |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 1434 of file BasicTTIImpl.h.
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 359 of file RISCVTargetTransformInfo.h.
References llvm::cast(), llvm::TargetTransformInfo::VPLegalization::Convert, llvm::TargetTransformInfo::VPLegalization::Discard, llvm::CallBase::getArgOperand(), llvm::IntrinsicInst::getIntrinsicID(), llvm::Value::getType(), and llvm::TargetTransformInfo::VPLegalization::Legal.
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 336 of file RISCVTargetTransformInfo.cpp.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::getVScaleForTuning(), and llvm::RISCV::RVVBitsPerBlock.
|
overridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 285 of file RISCVTargetTransformInfo.cpp.
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 264 of file RISCVTargetTransformInfo.h.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::DL.
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 341 of file RISCVTargetTransformInfo.h.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::DL.
|
overridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 2790 of file RISCVTargetTransformInfo.cpp.
References llvm::dyn_cast(), and isLegalMaskedLoadStore().
Referenced by getExpandCompressMemoryOpCost().
|
overridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 2772 of file RISCVTargetTransformInfo.cpp.
References llvm::dyn_cast(), and isLegalMaskedLoadStore().
Referenced by getExpandCompressMemoryOpCost().
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 317 of file RISCVTargetTransformInfo.h.
References isLegalMaskedGatherScatter().
Referenced by getGatherScatterOpCost().
|
inline |
Definition at line 294 of file RISCVTargetTransformInfo.h.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::EVT::getScalarType(), llvm::EVT::getStoreSize(), llvm::EVT::isFixedLengthVector(), and llvm::EVT::isScalableVector().
Referenced by isLegalMaskedGather(), and isLegalMaskedScatter().
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 285 of file RISCVTargetTransformInfo.h.
References isLegalMaskedLoadStore().
Definition at line 268 of file RISCVTargetTransformInfo.h.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::EVT::getScalarType(), llvm::EVT::getStoreSize(), and llvm::EVT::isFixedLengthVector().
Referenced by getMaskedMemoryOpCost(), isLegalMaskedCompressStore(), isLegalMaskedExpandLoad(), isLegalMaskedLoad(), and isLegalMaskedStore().
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 320 of file RISCVTargetTransformInfo.h.
References isLegalMaskedGatherScatter().
Referenced by getGatherScatterOpCost().
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 289 of file RISCVTargetTransformInfo.h.
References isLegalMaskedLoadStore().
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 336 of file RISCVTargetTransformInfo.h.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::DL.
Referenced by getStridedMemoryOpCost().
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 370 of file RISCVTargetTransformInfo.h.
References llvm::Add, llvm::AddChainWithSubs, llvm::And, llvm::AnyOf, llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::FAdd, llvm::FMax, llvm::FMin, llvm::FMulAdd, llvm::RecurrenceDescriptor::getRecurrenceKind(), llvm::RecurrenceDescriptor::getRecurrenceType(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::isScalable(), llvm::Or, llvm::SMax, llvm::SMin, llvm::Sub, llvm::UMax, llvm::UMin, and llvm::Xor.
|
overridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 2757 of file RISCVTargetTransformInfo.cpp.
References llvm::TargetTransformInfo::LSRCost::AddRecCost, llvm::TargetTransformInfo::LSRCost::ImmCost, llvm::TargetTransformInfo::LSRCost::Insns, llvm::TargetTransformInfo::LSRCost::NumBaseAdds, llvm::TargetTransformInfo::LSRCost::NumIVMuls, llvm::TargetTransformInfo::LSRCost::NumRegs, llvm::TargetTransformInfo::LSRCost::ScaleCost, and llvm::TargetTransformInfo::LSRCost::SetupCost.
|
overridevirtual |
Check if sinking I's
operands to I's basic block is profitable, because the operands can be folded into a target instruction, e.g.
splats of scalars can fold into vector instructions.
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 2927 of file RISCVTargetTransformInfo.cpp.
References AbstractManglingParser< Derived, Alloc >::Ops, llvm::any_of(), canSplatOperand(), llvm::cast(), llvm::dyn_cast(), llvm::enumerate(), I, llvm::isa(), llvm::PatternMatch::m_InsertElt(), llvm::PatternMatch::m_Intrinsic(), llvm::MIPatternMatch::m_Not(), llvm::PatternMatch::m_Shuffle(), llvm::PatternMatch::m_Undef(), llvm::PatternMatch::m_Value(), llvm::MIPatternMatch::m_ZeroInt(), llvm::PatternMatch::match(), and OpIdx.
|
inlineoverridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 352 of file RISCVTargetTransformInfo.h.
|
overridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 2744 of file RISCVTargetTransformInfo.cpp.
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 137 of file RISCVTargetTransformInfo.h.
|
inlineoverridevirtual |
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl >.
Definition at line 117 of file RISCVTargetTransformInfo.h.
|
overridevirtual |
See if I
should be considered for address type promotion.
We check if I
is a sext with right type and used in memory accesses. If it used in a "complex" getelementptr, we allow it to be promoted without finding other sext instructions that sign extended the same initial value. A getelementptr is considered as "complex" if it has more than 2 operands.
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 2806 of file RISCVTargetTransformInfo.cpp.
References llvm::dyn_cast(), llvm::Type::getInt64Ty(), I, and llvm::isa().
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 144 of file RISCVTargetTransformInfo.h.
|
overridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 316 of file RISCVTargetTransformInfo.cpp.
References II.
|
inlineoverridevirtual |
Reimplemented from llvm::TargetTransformInfoImplBase.
Definition at line 110 of file RISCVTargetTransformInfo.h.