LLVM 19.0.0git
|
#include "Target/RISCV/RISCVTargetTransformInfo.h"
Public Types | |
enum | RISCVRegisterClass { GPRRC , FPRRC , VRRC } |
Definition at line 29 of file RISCVTargetTransformInfo.h.
Enumerator | |
---|---|
GPRRC | |
FPRRC | |
VRRC |
Definition at line 328 of file RISCVTargetTransformInfo.h.
|
inlineexplicit |
Definition at line 59 of file RISCVTargetTransformInfo.h.
Definition at line 1690 of file RISCVTargetTransformInfo.cpp.
References llvm::TargetLoweringBase::getTargetMachine(), and TM.
|
inline |
Definition at line 326 of file RISCVTargetTransformInfo.h.
|
inline |
Definition at line 85 of file RISCVTargetTransformInfo.h.
|
inline |
Definition at line 86 of file RISCVTargetTransformInfo.h.
|
inline |
Definition at line 252 of file RISCVTargetTransformInfo.h.
|
inline |
Definition at line 257 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 = ArrayRef<const Value *>() , |
||
const Instruction * | CxtI = nullptr |
||
) |
Definition at line 1435 of file RISCVTargetTransformInfo.cpp.
References llvm::ISD::ADD, llvm::ISD::AND, llvm::RISCVTargetLowering::canSplatOperand(), CostKind, llvm::ISD::FADD, llvm::ISD::FMUL, llvm::ISD::FNEG, llvm::ISD::FSUB, llvm::BasicTTIImplBase< RISCVTTIImpl >::getArithmeticInstrCost(), llvm::RISCVSubtarget::getELen(), llvm::RISCVTargetLowering::getLMULCost(), 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::SHL, llvm::ISD::SRA, llvm::ISD::SRL, llvm::ISD::SUB, llvm::TargetTransformInfo::TCK_RecipThroughput, 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 1071 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 895 of file RISCVTargetTransformInfo.cpp.
References assert(), 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::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 1312 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 1229 of file RISCVTargetTransformInfo.cpp.
References CostKind, llvm::CmpInst::FCMP_OEQ, llvm::CmpInst::FCMP_OGE, llvm::CmpInst::FCMP_OGT, llvm::CmpInst::FCMP_OLE, llvm::CmpInst::FCMP_OLT, llvm::CmpInst::FCMP_UNE, 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::isIntPredicate(), llvm::Type::isVectorTy(), llvm::TargetTransformInfo::TCK_RecipThroughput, and llvm::RISCVSubtarget::useRVVForFixedLengthVectors().
Referenced by getArithmeticReductionCost().
InstructionCost RISCVTTIImpl::getExtendedReductionCost | ( | unsigned | Opcode, |
bool | IsUnsigned, | ||
Type * | ResTy, | ||
VectorType * | ValTy, | ||
FastMathFlags | FMF, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 1155 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 668 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 589 of file RISCVTargetTransformInfo.cpp.
References assert(), CostKind, llvm::createInterleaveMask(), llvm::createStrideMask(), llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, 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 105 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 146 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 241 of file RISCVTargetTransformInfo.cpp.
References llvm::TargetTransformInfo::TCC_Free.
InstructionCost RISCVTTIImpl::getIntrinsicInstrCost | ( | const IntrinsicCostAttributes & | ICA, |
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 790 of file RISCVTargetTransformInfo.cpp.
References CostKind, llvm::CostTableLookup(), llvm::ISD::FCEIL, llvm::IntrinsicCostAttributes::getID(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getIntrinsicInstrCost(), getISDForVPIntrinsicID(), llvm::IntrinsicCostAttributes::getReturnType(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost(), llvm::RISCVSubtarget::hasVInstructions(), llvm::TargetLoweringBase::isOperationCustom(), RetTy, and VectorIntrinsicCostTable.
InstructionCost RISCVTTIImpl::getMaskedMemoryOpCost | ( | unsigned | Opcode, |
Type * | Src, | ||
Align | Alignment, | ||
unsigned | AddressSpace, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 578 of file RISCVTargetTransformInfo.cpp.
References CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::getMaskedMemoryOpCost(), getMemoryOpCost(), isLegalMaskedLoadStore(), and llvm::TargetTransformInfo::TCK_RecipThroughput.
Definition at line 1653 of file RISCVTargetTransformInfo.cpp.
References llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getFixedValue(), getRegisterBitWidth(), llvm::TargetTransformInfo::RGK_FixedWidthVector, and SLPMaxVF.
|
inline |
Definition at line 317 of file RISCVTargetTransformInfo.h.
References llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::isScalable(), and llvm::ElementCount::isScalar().
std::optional< unsigned > RISCVTTIImpl::getMaxVScale | ( | ) | const |
Definition at line 270 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 1201 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 994 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::Log2_32_Ceil(), llvm::FastMathFlags::noNaNs(), llvm::TargetTransformInfo::None, llvm::TargetTransformInfo::TCK_CodeSize, and llvm::RISCVSubtarget::useRVVForFixedLengthVectors().
|
inline |
Definition at line 125 of file RISCVTargetTransformInfo.h.
Definition at line 329 of file RISCVTargetTransformInfo.h.
References FPRRC, GPRRC, llvm_unreachable, and VRRC.
void RISCVTTIImpl::getPeelingPreferences | ( | Loop * | L, |
ScalarEvolution & | SE, | ||
TTI::PeelingPreferences & | PP | ||
) |
Definition at line 1635 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 1509 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 249 of file RISCVTargetTransformInfo.cpp.
References assert(), llvm::isPowerOf2_32(), llvm::TargetTransformInfo::PSK_FastHardware, and llvm::TargetTransformInfo::PSK_Software.
|
inline |
Definition at line 88 of file RISCVTargetTransformInfo.h.
References llvm::Data, and llvm::DataWithoutLaneMask.
TypeSize RISCVTTIImpl::getRegisterBitWidth | ( | TargetTransformInfo::RegisterKind | K | ) | const |
Definition at line 285 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 349 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 365 of file RISCVTargetTransformInfo.h.
References FPRRC, GPRRC, llvm_unreachable, and VRRC.
Definition at line 1640 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 |
||
) |
Definition at line 324 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 1181 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 693 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 1557 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 1321 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 276 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 276 of file RISCVTargetTransformInfo.cpp.
References llvm::RISCVSubtarget::getRealMinVLen(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getVScaleForTuning(), llvm::RISCVSubtarget::hasVInstructions(), and llvm::RISCV::RVVBitsPerBlock.
Definition at line 199 of file RISCVTargetTransformInfo.h.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::TargetLoweringBase::getValueType(), and llvm::RISCVTargetLowering::isLegalElementTypeForRVV().
Definition at line 1680 of file RISCVTargetTransformInfo.cpp.
References isLegalMaskedLoadStore().
Definition at line 245 of file RISCVTargetTransformInfo.h.
References isLegalMaskedGatherScatter().
Referenced by getGatherScatterOpCost().
Definition at line 228 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 221 of file RISCVTargetTransformInfo.h.
References isLegalMaskedLoadStore().
Definition at line 203 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 248 of file RISCVTargetTransformInfo.h.
References isLegalMaskedGatherScatter().
Referenced by getGatherScatterOpCost().
Definition at line 224 of file RISCVTargetTransformInfo.h.
References isLegalMaskedLoadStore().
Definition at line 262 of file RISCVTargetTransformInfo.h.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::TargetLoweringBase::getValueType(), and llvm::RISCVTargetLowering::isLegalStridedLoadStore().
Referenced by getStridedMemoryOpCost().
|
inline |
Definition at line 287 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 1669 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 269 of file RISCVTargetTransformInfo.h.
References llvm::RISCVTargetLowering::isVScaleKnownToBeAPowerOfTwo().
|
inline |
Definition at line 101 of file RISCVTargetTransformInfo.h.
bool RISCVTTIImpl::shouldExpandReduction | ( | const IntrinsicInst * | II | ) | const |
Definition at line 256 of file RISCVTargetTransformInfo.cpp.
References llvm::IntrinsicInst::getIntrinsicID().
|
inline |
Definition at line 380 of file RISCVTargetTransformInfo.h.
|
inline |
Definition at line 84 of file RISCVTargetTransformInfo.h.