LLVM 19.0.0git
|
#include "Target/RISCV/RISCVTargetTransformInfo.h"
Additional Inherited Members | |
Protected Types inherited from llvm::TargetTransformInfoImplBase | |
typedef TargetTransformInfo | TTI |
Protected Member Functions inherited from llvm::BasicTTIImplBase< RISCVTTIImpl > | |
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 inherited from llvm::BasicTTIImplBase< RISCVTTIImpl > | |
const DataLayout & | DL |
Protected Attributes inherited from llvm::TargetTransformInfoImplBase | |
const DataLayout & | DL |
Definition at line 29 of file RISCVTargetTransformInfo.h.
Enumerator | |
---|---|
GPRRC | |
FPRRC | |
VRRC |
Definition at line 345 of file RISCVTargetTransformInfo.h.
|
inlineexplicit |
Definition at line 59 of file RISCVTargetTransformInfo.h.
Definition at line 1880 of file RISCVTargetTransformInfo.cpp.
References llvm::TargetLoweringBase::getTargetMachine(), and TM.
|
inline |
Definition at line 343 of file RISCVTargetTransformInfo.h.
|
inline |
Definition at line 101 of file RISCVTargetTransformInfo.h.
|
inline |
Definition at line 102 of file RISCVTargetTransformInfo.h.
|
inline |
Definition at line 269 of file RISCVTargetTransformInfo.h.
|
inline |
Definition at line 274 of file RISCVTargetTransformInfo.h.
InstructionCost RISCVTTIImpl::getArithmeticInstrCost | ( | unsigned | Opcode, |
Type * | Ty, | ||
TTI::TargetCostKind | CostKind, | ||
TTI::OperandValueInfo | Op1Info = {TTI::OK_AnyValue, TTI::OP_None} , |
||
TTI::OperandValueInfo | Op2Info = {TTI::OK_AnyValue, TTI::OP_None} , |
||
ArrayRef< const Value * > | Args = std::nullopt , |
||
const Instruction * | CxtI = nullptr |
||
) |
Definition at line 1595 of file RISCVTargetTransformInfo.cpp.
References llvm::ISD::ADD, llvm::ISD::AND, llvm::RISCVTargetLowering::canSplatOperand(), CostKind, llvm::ISD::FADD, llvm::ISD::FDIV, llvm::ISD::FMUL, llvm::ISD::FNEG, llvm::ISD::FSUB, llvm::BasicTTIImplBase< RISCVTTIImpl >::getArithmeticInstrCost(), llvm::RISCVSubtarget::getELen(), llvm::Type::getScalarSizeInBits(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), llvm::TargetLoweringBase::InstructionOpcodeToISD(), llvm::TargetTransformInfo::OperandValueInfo::isConstant(), llvm::ISD::MUL, llvm::ISD::MULHS, llvm::ISD::MULHU, llvm::ISD::OR, 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, llvm::RISCVSubtarget::useRVVForFixedLengthVectors(), and llvm::ISD::XOR.
Referenced by getPointersChainCost().
InstructionCost RISCVTTIImpl::getArithmeticReductionCost | ( | unsigned | Opcode, |
VectorType * | Ty, | ||
std::optional< FastMathFlags > | FMF, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 1194 of file RISCVTargetTransformInfo.cpp.
References llvm::ISD::ADD, llvm::ISD::AND, assert(), CostKind, llvm::ISD::FADD, llvm::BasicTTIImplBase< RISCVTTIImpl >::getArithmeticReductionCost(), getCmpSelInstrCost(), llvm::VectorType::getElementType(), llvm::RISCVSubtarget::getELen(), llvm::Type::getScalarSizeInBits(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, llvm::TargetLoweringBase::InstructionOpcodeToISD(), llvm::Type::isIntegerTy(), llvm::ISD::OR, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::TargetTransformInfo::requiresOrderedReduction(), llvm::RISCVSubtarget::useRVVForFixedLengthVectors(), and llvm::ISD::XOR.
Referenced by getExtendedReductionCost(), and getMinMaxReductionCost().
InstructionCost RISCVTTIImpl::getCastInstrCost | ( | unsigned | Opcode, |
Type * | Dst, | ||
Type * | Src, | ||
TTI::CastContextHint | CCH, | ||
TTI::TargetCostKind | CostKind, | ||
const Instruction * | I = nullptr |
||
) |
Definition at line 970 of file RISCVTargetTransformInfo.cpp.
References assert(), llvm::MVT::changeVectorElementType(), CostKind, llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, llvm::BasicTTIImplBase< RISCVTTIImpl >::getCastInstrCost(), llvm::RISCVSubtarget::getELen(), llvm::MVT::getFloatingPointVT(), llvm::MVT::getIntegerVT(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), I, llvm::TargetLoweringBase::InstructionOpcodeToISD(), llvm::BasicTTIImplBase< RISCVTTIImpl >::isTypeLegal(), 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 getMinMaxReductionCost(), and getVectorInstrCost().
InstructionCost RISCVTTIImpl::getCFInstrCost | ( | unsigned | Opcode, |
TTI::TargetCostKind | CostKind, | ||
const Instruction * | I = nullptr |
||
) |
Definition at line 1472 of file RISCVTargetTransformInfo.cpp.
References CostKind, and llvm::TargetTransformInfo::TCK_RecipThroughput.
Referenced by getMinMaxReductionCost().
InstructionCost RISCVTTIImpl::getCmpSelInstrCost | ( | unsigned | Opcode, |
Type * | ValTy, | ||
Type * | CondTy, | ||
CmpInst::Predicate | VecPred, | ||
TTI::TargetCostKind | CostKind, | ||
const Instruction * | I = nullptr |
||
) |
Definition at line 1352 of file RISCVTargetTransformInfo.cpp.
References 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::RISCVSubtarget::getELen(), llvm::Type::getScalarSizeInBits(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), llvm::RISCVSubtarget::hasVInstructionsF16(), llvm::RISCVSubtarget::hasVInstructionsF32(), llvm::RISCVSubtarget::hasVInstructionsF64(), I, llvm::CmpInst::isFPPredicate(), llvm::CmpInst::isIntPredicate(), llvm::Type::isVectorTy(), llvm::TargetTransformInfo::TCK_RecipThroughput, and llvm::RISCVSubtarget::useRVVForFixedLengthVectors().
Referenced by getArithmeticReductionCost(), and getIntrinsicInstrCost().
InstructionCost RISCVTTIImpl::getExtendedReductionCost | ( | unsigned | Opcode, |
bool | IsUnsigned, | ||
Type * | ResTy, | ||
VectorType * | ValTy, | ||
FastMathFlags | FMF, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 1278 of file RISCVTargetTransformInfo.cpp.
References CostKind, getArithmeticReductionCost(), llvm::RISCVSubtarget::getELen(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getExtendedReductionCost(), llvm::Type::getScalarSizeInBits(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), and llvm::RISCVSubtarget::useRVVForFixedLengthVectors().
InstructionCost RISCVTTIImpl::getGatherScatterOpCost | ( | unsigned | Opcode, |
Type * | DataTy, | ||
const Value * | Ptr, | ||
bool | VariableMask, | ||
Align | Alignment, | ||
TTI::TargetCostKind | CostKind, | ||
const Instruction * | I | ||
) |
Definition at line 685 of file RISCVTargetTransformInfo.cpp.
References CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::getGatherScatterOpCost(), getMemoryOpCost(), I, isLegalMaskedGather(), isLegalMaskedScatter(), Ptr, and llvm::TargetTransformInfo::TCK_RecipThroughput.
InstructionCost RISCVTTIImpl::getInterleavedMemoryOpCost | ( | unsigned | Opcode, |
Type * | VecTy, | ||
unsigned | Factor, | ||
ArrayRef< unsigned > | Indices, | ||
Align | Alignment, | ||
unsigned | AddressSpace, | ||
TTI::TargetCostKind | CostKind, | ||
bool | UseMaskForCond = false , |
||
bool | UseMaskForGaps = false |
||
) |
Definition at line 599 of file RISCVTargetTransformInfo.cpp.
References assert(), CostKind, llvm::createInterleaveMask(), llvm::createStrideMask(), llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::VectorType::get(), llvm::FixedVectorType::get(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getInterleavedMemoryOpCost(), llvm::InstructionCost::getInvalid(), getMemoryOpCost(), getShuffleCost(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), llvm::RISCVTargetLowering::isLegalInterleavedAccessType(), and llvm::TargetTransformInfo::SK_PermuteSingleSrc.
InstructionCost RISCVTTIImpl::getIntImmCost | ( | const APInt & | Imm, |
Type * | Ty, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 110 of file RISCVTargetTransformInfo.cpp.
References assert(), llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::TargetTransformInfoImplBase::getDataLayout(), llvm::RISCVMatInt::getIntMatCost(), llvm::DataLayout::getTypeSizeInBits(), llvm::Type::isIntegerTy(), and llvm::TargetTransformInfo::TCC_Free.
Referenced by getIntImmCostInst().
InstructionCost RISCVTTIImpl::getIntImmCostInst | ( | unsigned | Opcode, |
unsigned | Idx, | ||
const APInt & | Imm, | ||
Type * | Ty, | ||
TTI::TargetCostKind | CostKind, | ||
Instruction * | Inst = nullptr |
||
) |
Definition at line 151 of file RISCVTargetTransformInfo.cpp.
References assert(), canUseShiftPair(), CostKind, getIntImmCost(), llvm::RISCVSubtarget::getXLen(), Idx, llvm::Instruction::isCommutative(), llvm::Type::isIntegerTy(), llvm::BasicTTIImplBase< RISCVTTIImpl >::isLegalAddImmediate(), and llvm::TargetTransformInfo::TCC_Free.
InstructionCost RISCVTTIImpl::getIntImmCostIntrin | ( | Intrinsic::ID | IID, |
unsigned | Idx, | ||
const APInt & | Imm, | ||
Type * | Ty, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 246 of file RISCVTargetTransformInfo.cpp.
References llvm::TargetTransformInfo::TCC_Free.
InstructionCost RISCVTTIImpl::getIntrinsicInstrCost | ( | const IntrinsicCostAttributes & | ICA, |
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 807 of file RISCVTargetTransformInfo.cpp.
References llvm::CmpInst::BAD_ICMP_PREDICATE, CostKind, llvm::CostTableLookup(), llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::ISD::FCEIL, llvm::VectorType::get(), llvm::IntrinsicCostAttributes::getArgs(), llvm::IntrinsicCostAttributes::getArgTypes(), getCmpSelInstrCost(), llvm::IntrinsicCostAttributes::getID(), llvm::Type::getInt1Ty(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getIntrinsicInstrCost(), getISDForVPIntrinsicID(), llvm::IntrinsicCostAttributes::getReturnType(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), llvm::TargetLoweringBase::getValueType(), llvm::RISCVSubtarget::hasVInstructions(), llvm::CmpInst::ICMP_SLT, llvm::TargetLoweringBase::isOperationCustom(), RetTy, llvm::RISCVTargetLowering::shouldExpandCttzElements(), llvm::SmallVectorBase< Size_T >::size(), and VectorIntrinsicCostTable.
InstructionCost RISCVTTIImpl::getMaskedMemoryOpCost | ( | unsigned | Opcode, |
Type * | Src, | ||
Align | Alignment, | ||
unsigned | AddressSpace, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 588 of file RISCVTargetTransformInfo.cpp.
References CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::getMaskedMemoryOpCost(), getMemoryOpCost(), isLegalMaskedLoadStore(), and llvm::TargetTransformInfo::TCK_RecipThroughput.
Definition at line 1843 of file RISCVTargetTransformInfo.cpp.
References llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getFixedValue(), getRegisterBitWidth(), llvm::TargetTransformInfo::RGK_FixedWidthVector, and SLPMaxVF.
|
inline |
Definition at line 334 of file RISCVTargetTransformInfo.h.
References llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::isScalable(), and llvm::ElementCount::isScalar().
std::optional< unsigned > RISCVTTIImpl::getMaxVScale | ( | ) | const |
Definition at line 279 of file RISCVTargetTransformInfo.cpp.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::getMaxVScale(), llvm::RISCVSubtarget::getRealMaxVLen(), llvm::RISCVSubtarget::hasVInstructions(), and llvm::RISCV::RVVBitsPerBlock.
InstructionCost RISCVTTIImpl::getMemoryOpCost | ( | unsigned | Opcode, |
Type * | Src, | ||
MaybeAlign | Alignment, | ||
unsigned | AddressSpace, | ||
TTI::TargetCostKind | CostKind, | ||
TTI::OperandValueInfo | OpdInfo = {TTI::OK_AnyValue, TTI::OP_None} , |
||
const Instruction * | I = nullptr |
||
) |
Definition at line 1324 of file RISCVTargetTransformInfo.cpp.
References CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::RISCVTargetLowering::getLMULCost(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getMemoryOpCost(), getStoreImmCost(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), llvm::TargetLoweringBase::getValueType(), I, llvm::TargetTransformInfo::OperandValueInfo::isConstant(), and llvm::TargetTransformInfo::TCK_CodeSize.
Referenced by getGatherScatterOpCost(), getInterleavedMemoryOpCost(), getMaskedMemoryOpCost(), getStridedMemoryOpCost(), and getVectorInstrCost().
InstructionCost RISCVTTIImpl::getMinMaxReductionCost | ( | Intrinsic::ID | IID, |
VectorType * | Ty, | ||
FastMathFlags | FMF, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 1088 of file RISCVTargetTransformInfo.cpp.
References CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, getArithmeticReductionCost(), getCastInstrCost(), getCFInstrCost(), llvm::Type::getContext(), llvm::VectorType::getElementType(), llvm::RISCVSubtarget::getELen(), llvm::Type::getIntNTy(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getMinMaxReductionCost(), llvm::Type::getScalarSizeInBits(), llvm::Type::getScalarType(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), llvm::DataLayout::getTypeSizeInBits(), llvm::Type::isIntegerTy(), llvm_unreachable, llvm::FastMathFlags::noNaNs(), llvm::TargetTransformInfo::None, and llvm::RISCVSubtarget::useRVVForFixedLengthVectors().
|
inline |
Definition at line 141 of file RISCVTargetTransformInfo.h.
Definition at line 346 of file RISCVTargetTransformInfo.h.
References FPRRC, GPRRC, llvm_unreachable, and VRRC.
void RISCVTTIImpl::getPeelingPreferences | ( | Loop * | L, |
ScalarEvolution & | SE, | ||
TTI::PeelingPreferences & | PP | ||
) |
Definition at line 1825 of file RISCVTargetTransformInfo.cpp.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::getPeelingPreferences().
InstructionCost RISCVTTIImpl::getPointersChainCost | ( | ArrayRef< const Value * > | Ptrs, |
const Value * | Base, | ||
const TTI::PointersChainInfo & | Info, | ||
Type * | AccessTy, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 1699 of file RISCVTargetTransformInfo.cpp.
References llvm::sampleprof::Base, CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::enumerate(), GEP, getArithmeticInstrCost(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getGEPCost(), llvm::DataLayout::getTypeStoreSize(), I, Info, llvm::BasicTTIImplBase< RISCVTTIImpl >::isLegalAddressingMode(), and llvm::TargetTransformInfo::TCC_Free.
TargetTransformInfo::PopcntSupportKind RISCVTTIImpl::getPopcntSupport | ( | unsigned | TyWidth | ) |
Definition at line 258 of file RISCVTargetTransformInfo.cpp.
References assert(), llvm::isPowerOf2_32(), llvm::TargetTransformInfo::PSK_FastHardware, and llvm::TargetTransformInfo::PSK_Software.
|
inline |
Definition at line 104 of file RISCVTargetTransformInfo.h.
References llvm::Data, and llvm::DataWithoutLaneMask.
TypeSize RISCVTTIImpl::getRegisterBitWidth | ( | TargetTransformInfo::RegisterKind | K | ) | const |
Definition at line 294 of file RISCVTargetTransformInfo.cpp.
References llvm::bit_floor(), llvm::TypeSize::getFixed(), llvm::RISCVSubtarget::getRealMinVLen(), llvm::TypeSize::getScalable(), llvm::RISCVSubtarget::getXLen(), llvm::RISCVSubtarget::hasVInstructions(), llvm_unreachable, llvm::TargetTransformInfo::RGK_FixedWidthVector, llvm::TargetTransformInfo::RGK_ScalableVector, llvm::TargetTransformInfo::RGK_Scalar, llvm::RISCV::RVVBitsPerBlock, RVVRegisterWidthLMUL, and llvm::RISCVSubtarget::useRVVForFixedLengthVectors().
Referenced by getMaximumVF().
|
inline |
Definition at line 366 of file RISCVTargetTransformInfo.h.
References FPRRC, llvm::Type::getScalarType(), GPRRC, llvm::Type::isDoubleTy(), llvm::Type::isFloatTy(), llvm::Type::isHalfTy(), llvm::Vector, and VRRC.
Definition at line 382 of file RISCVTargetTransformInfo.h.
References FPRRC, GPRRC, llvm_unreachable, and VRRC.
Definition at line 1830 of file RISCVTargetTransformInfo.cpp.
References llvm::divideCeil(), llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::RISCVSubtarget::getRealMinVLen(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getRegUsageForType(), llvm::DataLayout::getTypeSizeInBits(), llvm::RISCVSubtarget::hasVInstructions(), llvm::Type::isVectorTy(), llvm::RISCV::RVVBitsPerBlock, Size, and llvm::RISCVSubtarget::useRVVForFixedLengthVectors().
InstructionCost RISCVTTIImpl::getShuffleCost | ( | TTI::ShuffleKind | Kind, |
VectorType * | Tp, | ||
ArrayRef< int > | Mask, | ||
TTI::TargetCostKind | CostKind, | ||
int | Index, | ||
VectorType * | SubTp, | ||
ArrayRef< const Value * > | Args = std::nullopt , |
||
const Instruction * | CxtI = nullptr |
||
) |
Definition at line 333 of file RISCVTargetTransformInfo.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::CallingConv::C, CostKind, llvm::createStrideMask(), llvm::divideCeil(), llvm::equal(), llvm::VectorType::get(), llvm::FixedVectorType::get(), llvm::Type::getContext(), llvm::VectorType::getElementCount(), llvm::VectorType::getElementType(), llvm::RISCVSubtarget::getELen(), llvm::Type::getInt1Ty(), llvm::RISCVTargetLowering::getLMULCost(), llvm::Operator::getOpcode(), llvm::Type::getPrimitiveSizeInBits(), llvm::RISCVSubtarget::getRealMaxVLen(), llvm::RISCVSubtarget::getRealMinVLen(), llvm::MVT::getScalarSizeInBits(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getShuffleCost(), getShuffleCost(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), getVRGatherIndexType(), I, llvm::BasicTTIImplBase< RISCVTTIImpl >::improveShuffleKindFromMask(), llvm::Type::isIntegerTy(), llvm::ShuffleVectorInst::isInterleaveMask(), llvm::PoisonMaskElem, llvm::PowerOf2Ceil(), 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, llvm::TargetTransformInfo::TCC_Free, and llvm::transform().
Referenced by getInterleavedMemoryOpCost(), and getShuffleCost().
InstructionCost RISCVTTIImpl::getStoreImmCost | ( | Type * | VecTy, |
TTI::OperandValueInfo | OpInfo, | ||
TTI::TargetCostKind | CostKind | ||
) |
Return the cost of materializing an immediate for a value operand of a store instruction.
Definition at line 1304 of file RISCVTargetTransformInfo.cpp.
References assert(), CostKind, llvm::TargetTransformInfo::OperandValueInfo::isConstant(), and llvm::TargetTransformInfo::OperandValueInfo::isUniform().
Referenced by getMemoryOpCost().
InstructionCost RISCVTTIImpl::getStridedMemoryOpCost | ( | unsigned | Opcode, |
Type * | DataTy, | ||
const Value * | Ptr, | ||
bool | VariableMask, | ||
Align | Alignment, | ||
TTI::TargetCostKind | CostKind, | ||
const Instruction * | I | ||
) |
Definition at line 710 of file RISCVTargetTransformInfo.cpp.
References CostKind, getMemoryOpCost(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getStridedMemoryOpCost(), I, isLegalStridedLoadStore(), Ptr, llvm::TargetTransformInfo::TCC_Basic, and llvm::TargetTransformInfo::TCK_CodeSize.
void RISCVTTIImpl::getUnrollingPreferences | ( | Loop * | L, |
ScalarEvolution & | SE, | ||
TTI::UnrollingPreferences & | UP, | ||
OptimizationRemarkEmitter * | ORE | ||
) |
Definition at line 1747 of file RISCVTargetTransformInfo.cpp.
References llvm::dbgs(), F, llvm::TargetTransformInfo::UnrollingPreferences::Force, llvm::getBooleanLoopAttribute(), getCalledFunction(), llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), llvm::BasicTTIImplBase< T >::getUnrollingPreferences(), I, llvm::TargetTransformInfoImplBase::isLoweredToCall(), LLVM_DEBUG, Operands, llvm::TargetTransformInfo::UnrollingPreferences::OptSizeThreshold, llvm::TargetTransformInfo::UnrollingPreferences::Partial, llvm::TargetTransformInfo::UnrollingPreferences::PartialOptSizeThreshold, llvm::TargetTransformInfo::UnrollingPreferences::Runtime, llvm::SmallVectorBase< Size_T >::size(), llvm::TargetTransformInfo::TCK_SizeAndLatency, llvm::TargetTransformInfo::UnrollingPreferences::UnrollAndJam, llvm::TargetTransformInfo::UnrollingPreferences::UnrollAndJamInnerLoopThreshold, llvm::TargetTransformInfo::UnrollingPreferences::UnrollRemainder, and llvm::TargetTransformInfo::UnrollingPreferences::UpperBound.
InstructionCost RISCVTTIImpl::getVectorInstrCost | ( | unsigned | Opcode, |
Type * | Val, | ||
TTI::TargetCostKind | CostKind, | ||
unsigned | Index, | ||
Value * | Op0, | ||
Value * | Op1 | ||
) |
Definition at line 1481 of file RISCVTargetTransformInfo.cpp.
References assert(), CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::IntegerType::get(), llvm::VectorType::get(), getCastInstrCost(), llvm::Type::getContext(), getMemoryOpCost(), llvm::DataLayout::getPrefTypeAlign(), llvm::Type::getScalarSizeInBits(), llvm::Type::getScalarType(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getVectorInstrCost(), getVectorInstrCost(), llvm::RISCVSubtarget::getXLen(), if(), llvm::Type::isIntegerTy(), llvm::BasicTTIImplBase< RISCVTTIImpl >::isTypeLegal(), llvm::Type::isVectorTy(), and llvm::TargetTransformInfo::None.
Referenced by getVectorInstrCost().
|
inline |
Definition at line 293 of file RISCVTargetTransformInfo.h.
References llvm::TargetTransformInfo::VPLegalization::Convert, llvm::TargetTransformInfo::VPLegalization::Discard, llvm::CallBase::getArgOperand(), llvm::IntrinsicInst::getIntrinsicID(), llvm::Value::getType(), and llvm::TargetTransformInfo::VPLegalization::Legal.
std::optional< unsigned > RISCVTTIImpl::getVScaleForTuning | ( | ) | const |
Definition at line 285 of file RISCVTargetTransformInfo.cpp.
References llvm::RISCVSubtarget::getRealMinVLen(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getVScaleForTuning(), llvm::RISCVSubtarget::hasVInstructions(), and llvm::RISCV::RVVBitsPerBlock.
bool RISCVTTIImpl::hasActiveVectorLength | ( | unsigned | Opcode, |
Type * | DataType, | ||
Align | Alignment | ||
) | const |
Definition at line 253 of file RISCVTargetTransformInfo.cpp.
References llvm::RISCVSubtarget::hasVInstructions().
Definition at line 216 of file RISCVTargetTransformInfo.h.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::TargetLoweringBase::getValueType(), and llvm::RISCVTargetLowering::isLegalElementTypeForRVV().
Definition at line 1870 of file RISCVTargetTransformInfo.cpp.
References isLegalMaskedLoadStore().
Definition at line 262 of file RISCVTargetTransformInfo.h.
References isLegalMaskedGatherScatter().
Referenced by getGatherScatterOpCost().
Definition at line 245 of file RISCVTargetTransformInfo.h.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::EVT::getScalarType(), llvm::EVT::getStoreSize(), llvm::TargetLoweringBase::getValueType(), llvm::EVT::isFixedLengthVector(), and llvm::RISCVTargetLowering::isLegalElementTypeForRVV().
Referenced by isLegalMaskedGather(), and isLegalMaskedScatter().
Definition at line 238 of file RISCVTargetTransformInfo.h.
References isLegalMaskedLoadStore().
Definition at line 220 of file RISCVTargetTransformInfo.h.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::EVT::getScalarType(), llvm::EVT::getStoreSize(), llvm::TargetLoweringBase::getValueType(), llvm::EVT::isFixedLengthVector(), and llvm::RISCVTargetLowering::isLegalElementTypeForRVV().
Referenced by getMaskedMemoryOpCost(), isLegalMaskedCompressStore(), isLegalMaskedLoad(), and isLegalMaskedStore().
Definition at line 265 of file RISCVTargetTransformInfo.h.
References isLegalMaskedGatherScatter().
Referenced by getGatherScatterOpCost().
Definition at line 241 of file RISCVTargetTransformInfo.h.
References isLegalMaskedLoadStore().
Definition at line 279 of file RISCVTargetTransformInfo.h.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::TargetLoweringBase::getValueType(), and llvm::RISCVTargetLowering::isLegalStridedLoadStore().
Referenced by getStridedMemoryOpCost().
|
inline |
Definition at line 304 of file RISCVTargetTransformInfo.h.
References llvm::Add, llvm::And, llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::FAdd, llvm::FAnyOf, llvm::FMax, llvm::FMin, llvm::FMulAdd, llvm::RecurrenceDescriptor::getRecurrenceKind(), llvm::RecurrenceDescriptor::getRecurrenceType(), llvm::TargetLoweringBase::getValueType(), llvm::IAnyOf, llvm::RISCVTargetLowering::isLegalElementTypeForRVV(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::isScalable(), llvm::Or, llvm::SMax, llvm::SMin, llvm::UMax, llvm::UMin, and llvm::Xor.
bool RISCVTTIImpl::isLSRCostLess | ( | const TargetTransformInfo::LSRCost & | C1, |
const TargetTransformInfo::LSRCost & | C2 | ||
) |
Definition at line 1859 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.
|
inline |
Definition at line 286 of file RISCVTargetTransformInfo.h.
References llvm::RISCVTargetLowering::isVScaleKnownToBeAPowerOfTwo().
|
inline |
Definition at line 117 of file RISCVTargetTransformInfo.h.
bool RISCVTTIImpl::shouldExpandReduction | ( | const IntrinsicInst * | II | ) | const |
Definition at line 265 of file RISCVTargetTransformInfo.cpp.
References llvm::IntrinsicInst::getIntrinsicID().
|
inline |
Definition at line 397 of file RISCVTargetTransformInfo.h.
|
inline |
Definition at line 100 of file RISCVTargetTransformInfo.h.