LLVM
15.0.0git
|
#include "Target/RISCV/RISCVTargetTransformInfo.h"
Public Types | |
enum | RISCVRegisterClass { GPRRC, FPRRC, VRRC } |
Definition at line 28 of file RISCVTargetTransformInfo.h.
Enumerator | |
---|---|
GPRRC | |
FPRRC | |
VRRC |
Definition at line 220 of file RISCVTargetTransformInfo.h.
|
inlineexplicit |
Definition at line 41 of file RISCVTargetTransformInfo.h.
|
inline |
Definition at line 169 of file RISCVTargetTransformInfo.h.
|
inline |
Definition at line 174 of file RISCVTargetTransformInfo.h.
InstructionCost RISCVTTIImpl::getArithmeticReductionCost | ( | unsigned | Opcode, |
VectorType * | Ty, | ||
Optional< FastMathFlags > | FMF, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 343 of file RISCVTargetTransformInfo.cpp.
References llvm::ISD::ADD, llvm::ISD::AND, assert(), CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::ISD::FADD, llvm::BasicTTIImplBase< RISCVTTIImpl >::getArithmeticReductionCost(), llvm::VectorType::getElementType(), llvm::RISCVSubtarget::getELEN(), llvm::Type::getScalarSizeInBits(), llvm::TargetLoweringBase::getTypeLegalizationCost(), llvm::TargetLoweringBase::InstructionOpcodeToISD(), llvm::Type::isIntegerTy(), llvm::Log2_32_Ceil(), llvm::AArch64CC::LT, llvm::ISD::OR, llvm::TargetTransformInfo::requiresOrderedReduction(), llvm::RISCVSubtarget::useRVVForFixedLengthVectors(), and llvm::ISD::XOR.
InstructionCost RISCVTTIImpl::getCastInstrCost | ( | unsigned | Opcode, |
Type * | Dst, | ||
Type * | Src, | ||
TTI::CastContextHint | CCH, | ||
TTI::TargetCostKind | CostKind, | ||
const Instruction * | I = nullptr |
||
) |
Definition at line 268 of file RISCVTargetTransformInfo.cpp.
References llvm::abs(), 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(), I, llvm::TargetLoweringBase::InstructionOpcodeToISD(), int, 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.
InstructionCost RISCVTTIImpl::getGatherScatterOpCost | ( | unsigned | Opcode, |
Type * | DataTy, | ||
const Value * | Ptr, | ||
bool | VariableMask, | ||
Align | Alignment, | ||
TTI::TargetCostKind | CostKind, | ||
const Instruction * | I | ||
) |
Definition at line 219 of file RISCVTargetTransformInfo.cpp.
References Align, llvm::RISCVTargetLowering::computeVLMAX(), CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::BasicTTIImplBase< RISCVTTIImpl >::getGatherScatterOpCost(), llvm::LinearPolySize< LeafTy >::getKnownMinValue(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getMemoryOpCost(), llvm::RISCVSubtarget::getRealMaxVLen(), llvm::DataLayout::getTypeSizeInBits(), I, isLegalMaskedGather(), isLegalMaskedScatter(), llvm::SPII::Load, llvm::SPII::Store, and llvm::TargetTransformInfo::TCK_RecipThroughput.
InstructionCost RISCVTTIImpl::getIntImmCost | ( | const APInt & | Imm, |
Type * | Ty, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 26 of file RISCVTargetTransformInfo.cpp.
References assert(), llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::TargetTransformInfoImplBase::getDataLayout(), llvm::RISCVMatInt::getIntMatCost(), llvm::DataLayout::getTypeSizeInBits(), llvm::RISCVMatInt::Imm, 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 41 of file RISCVTargetTransformInfo.cpp.
References llvm::MCID::Add, assert(), CostKind, getIntImmCost(), llvm::RISCVSubtarget::hasStdExtZbb(), llvm::RISCVMatInt::Imm, llvm::Instruction::isCommutative(), llvm::Type::isIntegerTy(), llvm::BasicTTIImplBase< RISCVTTIImpl >::isLegalAddImmediate(), LLVM_FALLTHROUGH, Mul, and llvm::TargetTransformInfo::TCC_Free.
InstructionCost RISCVTTIImpl::getIntImmCostIntrin | ( | Intrinsic::ID | IID, |
unsigned | Idx, | ||
const APInt & | Imm, | ||
Type * | Ty, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 107 of file RISCVTargetTransformInfo.cpp.
References llvm::TargetTransformInfo::TCC_Free.
InstructionCost RISCVTTIImpl::getIntrinsicInstrCost | ( | const IntrinsicCostAttributes & | ICA, |
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 252 of file RISCVTargetTransformInfo.cpp.
References CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::IntrinsicCostAttributes::getID(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getIntrinsicInstrCost(), llvm::IntrinsicCostAttributes::getReturnType(), llvm::TargetLoweringBase::getTypeLegalizationCost(), and llvm::AArch64CC::LT.
InstructionCost RISCVTTIImpl::getMaskedMemoryOpCost | ( | unsigned | Opcode, |
Type * | Src, | ||
Align | Alignment, | ||
unsigned | AddressSpace, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 209 of file RISCVTargetTransformInfo.cpp.
References CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::getMaskedMemoryOpCost(), and llvm::BasicTTIImplBase< RISCVTTIImpl >::getMemoryOpCost().
|
inline |
Definition at line 214 of file RISCVTargetTransformInfo.h.
Optional< unsigned > RISCVTTIImpl::getMaxVScale | ( | ) | const |
Definition at line 134 of file RISCVTargetTransformInfo.cpp.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::getMaxVScale(), llvm::RISCVSubtarget::getRealMaxVLen(), llvm::RISCVSubtarget::hasVInstructions(), and llvm::RISCV::RVVBitsPerBlock.
InstructionCost RISCVTTIImpl::getMinMaxReductionCost | ( | VectorType * | Ty, |
VectorType * | CondTy, | ||
bool | IsUnsigned, | ||
TTI::TargetCostKind | CostKind | ||
) |
Definition at line 316 of file RISCVTargetTransformInfo.cpp.
References CostKind, llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::VectorType::getElementType(), llvm::RISCVSubtarget::getELEN(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getMinMaxReductionCost(), llvm::Type::getScalarSizeInBits(), llvm::TargetLoweringBase::getTypeLegalizationCost(), llvm::Type::isIntegerTy(), llvm::Log2_32_Ceil(), llvm::AArch64CC::LT, and llvm::RISCVSubtarget::useRVVForFixedLengthVectors().
|
inline |
Definition at line 77 of file RISCVTargetTransformInfo.h.
|
inline |
Definition at line 221 of file RISCVTargetTransformInfo.h.
References llvm_unreachable.
void RISCVTTIImpl::getPeelingPreferences | ( | Loop * | L, |
ScalarEvolution & | SE, | ||
TTI::PeelingPreferences & | PP | ||
) |
Definition at line 455 of file RISCVTargetTransformInfo.cpp.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::getPeelingPreferences().
TargetTransformInfo::PopcntSupportKind RISCVTTIImpl::getPopcntSupport | ( | unsigned | TyWidth | ) |
Definition at line 115 of file RISCVTargetTransformInfo.cpp.
References assert(), llvm::RISCVSubtarget::hasStdExtZbb(), llvm::isPowerOf2_32(), llvm::TargetTransformInfo::PSK_FastHardware, and llvm::TargetTransformInfo::PSK_Software.
TypeSize RISCVTTIImpl::getRegisterBitWidth | ( | TargetTransformInfo::RegisterKind | K | ) | const |
Definition at line 147 of file RISCVTargetTransformInfo.cpp.
References llvm::LinearPolySize< TypeSize >::getFixed(), llvm::RISCVSubtarget::getRealMinVLen(), llvm::LinearPolySize< TypeSize >::getScalable(), llvm::RISCVSubtarget::getXLen(), llvm::RISCVSubtarget::hasVInstructions(), llvm_unreachable, llvm::XCoreISD::LMUL, llvm::PowerOf2Floor(), llvm::TargetTransformInfo::RGK_FixedWidthVector, llvm::TargetTransformInfo::RGK_ScalableVector, llvm::TargetTransformInfo::RGK_Scalar, llvm::RISCV::RVVBitsPerBlock, RVVRegisterWidthLMUL, and llvm::RISCVSubtarget::useRVVForFixedLengthVectors().
|
inline |
Definition at line 241 of file RISCVTargetTransformInfo.h.
References llvm::Type::getScalarType(), llvm::Type::isDoubleTy(), llvm::Type::isFloatTy(), llvm::Type::isHalfTy(), and Vector.
|
inline |
Definition at line 257 of file RISCVTargetTransformInfo.h.
References llvm_unreachable.
unsigned RISCVTTIImpl::getRegUsageForType | ( | Type * | Ty | ) |
Definition at line 460 of file RISCVTargetTransformInfo.cpp.
References llvm::divideCeil(), llvm::Type::getPrimitiveSizeInBits(), llvm::RISCVSubtarget::getRealMinVLen(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getRegUsageForType(), llvm::RISCVSubtarget::hasVInstructions(), llvm::Type::isVectorTy(), llvm::RISCV::RVVBitsPerBlock, and llvm::RISCVSubtarget::useRVVForFixedLengthVectors().
InstructionCost RISCVTTIImpl::getShuffleCost | ( | TTI::ShuffleKind | Kind, |
VectorType * | Tp, | ||
ArrayRef< int > | Mask, | ||
int | Index, | ||
VectorType * | SubTp, | ||
ArrayRef< const Value * > | Args = None |
||
) |
Definition at line 174 of file RISCVTargetTransformInfo.cpp.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::BasicTTIImplBase< RISCVTTIImpl >::getShuffleCost(), getSpliceCost(), llvm::TargetLoweringBase::getTypeLegalizationCost(), llvm::AArch64CC::LT, llvm::BitmaskEnumDetail::Mask(), llvm::TargetTransformInfo::SK_Broadcast, llvm::TargetTransformInfo::SK_Reverse, and llvm::TargetTransformInfo::SK_Splice.
InstructionCost RISCVTTIImpl::getSpliceCost | ( | VectorType * | Tp, |
int | Index | ||
) |
Definition at line 164 of file RISCVTargetTransformInfo.cpp.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::TargetLoweringBase::getTypeLegalizationCost(), and llvm::AArch64CC::LT.
Referenced by getShuffleCost().
void RISCVTTIImpl::getUnrollingPreferences | ( | Loop * | L, |
ScalarEvolution & | SE, | ||
TTI::UnrollingPreferences & | UP, | ||
OptimizationRemarkEmitter * | ORE | ||
) |
Definition at line 377 of file RISCVTargetTransformInfo.cpp.
References BB, llvm::dbgs(), llvm::RISCVSubtarget::enableDefaultUnroll(), F, llvm::TargetTransformInfo::UnrollingPreferences::Force, llvm::LoopBase< BlockT, LoopT >::getBlocks(), llvm::getBooleanLoopAttribute(), getCalledFunction(), llvm::LoopBase< BlockT, LoopT >::getExitingBlocks(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::LoopBase< BlockT, LoopT >::getNumBlocks(), llvm::BasicBlock::getParent(), llvm::BasicTTIImplBase< T >::getUnrollingPreferences(), llvm::TargetTransformInfoImplCRTPBase< RISCVTTIImpl >::getUserCost(), llvm::Function::hasOptSize(), I, llvm::TargetTransformInfoImplBase::isLoweredToCall(), LLVM_DEBUG, Operands, llvm::TargetTransformInfo::UnrollingPreferences::OptSizeThreshold, llvm::TargetTransformInfo::UnrollingPreferences::Partial, llvm::TargetTransformInfo::UnrollingPreferences::PartialOptSizeThreshold, llvm::TargetTransformInfo::UnrollingPreferences::Runtime, llvm::TargetTransformInfo::TCK_SizeAndLatency, llvm::TargetTransformInfo::UnrollingPreferences::UnrollAndJam, llvm::TargetTransformInfo::UnrollingPreferences::UnrollAndJamInnerLoopThreshold, llvm::TargetTransformInfo::UnrollingPreferences::UnrollRemainder, and llvm::TargetTransformInfo::UnrollingPreferences::UpperBound.
|
inline |
Definition at line 182 of file RISCVTargetTransformInfo.h.
References llvm::TargetTransformInfo::VPLegalization::Legal.
Optional< unsigned > RISCVTTIImpl::getVScaleForTuning | ( | ) | const |
Definition at line 140 of file RISCVTargetTransformInfo.cpp.
References llvm::RISCVSubtarget::getRealMinVLen(), llvm::BasicTTIImplBase< RISCVTTIImpl >::getVScaleForTuning(), llvm::RISCVSubtarget::hasVInstructions(), and llvm::RISCV::RVVBitsPerBlock.
|
inline |
Definition at line 109 of file RISCVTargetTransformInfo.h.
References llvm::RISCVTargetLowering::isLegalElementTypeForRVV().
Definition at line 162 of file RISCVTargetTransformInfo.h.
References isLegalMaskedGatherScatter().
Referenced by getGatherScatterOpCost().
Definition at line 141 of file RISCVTargetTransformInfo.h.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::TypeSize::getFixedSize(), llvm::Type::getScalarSizeInBits(), llvm::Type::getScalarType(), llvm::DataLayout::getTypeStoreSize(), and llvm::RISCVTargetLowering::isLegalElementTypeForRVV().
Referenced by isLegalMaskedGather(), and isLegalMaskedScatter().
Definition at line 134 of file RISCVTargetTransformInfo.h.
References isLegalMaskedLoadStore().
Definition at line 113 of file RISCVTargetTransformInfo.h.
References llvm::BasicTTIImplBase< RISCVTTIImpl >::DL, llvm::TypeSize::getFixedSize(), llvm::Type::getScalarSizeInBits(), llvm::Type::getScalarType(), llvm::DataLayout::getTypeStoreSize(), and llvm::RISCVTargetLowering::isLegalElementTypeForRVV().
Referenced by isLegalMaskedLoad(), and isLegalMaskedStore().
Definition at line 165 of file RISCVTargetTransformInfo.h.
References isLegalMaskedGatherScatter().
Referenced by getGatherScatterOpCost().
Definition at line 137 of file RISCVTargetTransformInfo.h.
References isLegalMaskedLoadStore().
|
inline |
Definition at line 187 of file RISCVTargetTransformInfo.h.
References llvm::Add, llvm::And, llvm::FAdd, llvm::FMax, llvm::FMin, llvm::RecurrenceDescriptor::getRecurrenceKind(), llvm::RecurrenceDescriptor::getRecurrenceType(), llvm::RISCVTargetLowering::isLegalElementTypeForRVV(), llvm::LinearPolySize< LeafTy >::isScalable(), llvm::Or, llvm::SMax, llvm::SMin, llvm::UMax, llvm::UMin, and llvm::Xor.
bool RISCVTTIImpl::shouldExpandReduction | ( | const IntrinsicInst * | II | ) | const |
Definition at line 120 of file RISCVTargetTransformInfo.cpp.
References llvm::IntrinsicInst::getIntrinsicID().
|
inline |
Definition at line 58 of file RISCVTargetTransformInfo.h.