LLVM: llvm::RISCVTTIImpl Class Reference (original ) (raw )#include "[Target/RISCV/RISCVTargetTransformInfo.h](RISCVTargetTransformInfo%5F8h%5Fsource.html)"
Public Member Functions
RISCVTTIImpl (const RISCVTargetMachine *TM, const Function &F )
InstructionCost
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.
InstructionCost
getIntImmCost (const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind ) const override
InstructionCost
getIntImmCostInst (unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind , Instruction *Inst=nullptr) const override
InstructionCost
getIntImmCostIntrin (Intrinsic::ID IID, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind ) const override
Public Member Functions inherited from llvm::BasicTTIImplBase< RISCVTTIImpl >
bool
allowsMisalignedMemoryAccesses (LLVMContext &Context , unsigned BitWidth , unsigned AddressSpace , Align Alignment, unsigned *Fast ) const override
bool
areInlineCompatible (const Function *Caller, const Function *Callee) const override
bool
hasBranchDivergence (const Function *F =nullptr) const override
bool
isSourceOfDivergence (const Value *V) const override
bool
isAlwaysUniform (const Value *V) const override
bool
isValidAddrSpaceCast (unsigned FromAS, unsigned ToAS) const override
bool
addrspacesMayAlias (unsigned AS0, unsigned AS1) const override
unsigned
getFlatAddressSpace () const override
bool
collectFlatAddressOperands (SmallVectorImpl < int > &OpIndexes, Intrinsic::ID IID) const override
bool
isNoopAddrSpaceCast (unsigned FromAS, unsigned ToAS) const override
unsigned
getAssumedAddrSpace (const Value *V) const override
bool
isSingleThreaded () const override
std::pair< const Value *, unsigned >
getPredicatedAddrSpace (const Value *V) const override
Value *
rewriteIntrinsicWithAddressSpace (IntrinsicInst *II , Value *OldV, Value *NewV) const override
bool
isLegalAddImmediate (int64_t imm) const override
bool
isLegalAddScalableImmediate (int64_t Imm) const override
bool
isLegalICmpImmediate (int64_t imm) const override
bool
isLegalAddressingMode (Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace, Instruction *I =nullptr, int64_t ScalableOffset=0) const override
int64_t
getPreferredLargeGEPBaseOffset (int64_t MinOffset, int64_t MaxOffset)
unsigned
getStoreMinimumVF (unsigned VF, Type *ScalarMemTy, Type *ScalarValTy) const override
bool
isIndexedLoadLegal (TTI::MemIndexedMode M, Type *Ty) const override
bool
isIndexedStoreLegal (TTI::MemIndexedMode M, Type *Ty) const override
bool
isNumRegsMajorCostOfLSR () const override
bool
shouldDropLSRSolutionIfLessProfitable () const override
bool
isProfitableLSRChainElement (Instruction *I ) const override
InstructionCost
getScalingFactorCost (Type *Ty, GlobalValue *BaseGV, StackOffset BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace) const override
bool
isTruncateFree (Type *Ty1, Type *Ty2) const override
bool
isProfitableToHoist (Instruction *I ) const override
bool
useAA () const override
bool
isTypeLegal (Type *Ty) const override
InstructionCost
getGEPCost (Type *PointeeType, const Value *Ptr, ArrayRef < const Value * > Operands, Type *AccessType, TTI::TargetCostKind CostKind ) const override
unsigned
getEstimatedNumberOfCaseClusters (const SwitchInst &SI, unsigned &JumpTableSize, ProfileSummaryInfo *PSI, BlockFrequencyInfo *BFI) const override
bool
shouldBuildLookupTables () const override
bool
shouldBuildRelLookupTables () const override
bool
haveFastSqrt (Type *Ty) const override
bool
isFCmpOrdCheaperThanFCmpZero (Type *Ty) const override
InstructionCost
getFPOpCost (Type *Ty) const override
bool
preferToKeepConstantsAttached (const Instruction &Inst, const Function &Fn) const override
unsigned
getInliningThresholdMultiplier () const override
unsigned
adjustInliningThreshold (const CallBase *CB) const override
unsigned
getCallerAllocaCost (const CallBase *CB, const AllocaInst *AI) const override
int
getInlinerVectorBonusPercent () const override
bool
isHardwareLoopProfitable (Loop *L, ScalarEvolution &SE, AssumptionCache &AC, TargetLibraryInfo *LibInfo, HardwareLoopInfo &HWLoopInfo) const override
unsigned
getEpilogueVectorizationMinVF () const override
std::optional< Instruction * >
instCombineIntrinsic (InstCombiner &IC, IntrinsicInst &II ) const override
std::optional< Value * >
simplifyDemandedUseBitsIntrinsic (InstCombiner &IC, IntrinsicInst &II , APInt DemandedMask, KnownBits &Known, bool &KnownBitsComputed) const override
std::optional< Value * >
simplifyDemandedVectorEltsIntrinsic (InstCombiner &IC, IntrinsicInst &II , APInt DemandedElts, APInt &UndefElts, APInt &UndefElts2, APInt &UndefElts3, std::function< void(Instruction *, unsigned , APInt , APInt &)> SimplifyAndSetOp) const override
std::optional< unsigned >
getCacheSize (TargetTransformInfo::CacheLevel Level) const override
std::optional< unsigned >
getCacheAssociativity (TargetTransformInfo::CacheLevel Level) const override
unsigned
getCacheLineSize () const override
unsigned
getPrefetchDistance () const override
unsigned
getMinPrefetchStride (unsigned NumMemAccesses, unsigned NumStridedMemAccesses, unsigned NumPrefetches, bool HasCall) const override
unsigned
getMaxPrefetchIterationsAhead () const override
bool
enableWritePrefetching () const override
bool
shouldPrefetchAddressSpace (unsigned AS) const override
bool
isTargetIntrinsicTriviallyScalarizable (Intrinsic::ID ID ) const override
bool
isTargetIntrinsicWithScalarOpAtArg (Intrinsic::ID ID , unsigned ScalarOpdIdx) const override
bool
isTargetIntrinsicWithOverloadTypeAtArg (Intrinsic::ID ID , int OpdIdx) const override
bool
isTargetIntrinsicWithStructReturnOverloadAtField (Intrinsic::ID ID , int RetIdx) const override
InstructionCost
getScalarizationOverhead (VectorType *InTy, bool Insert, bool Extract, TTI::TargetCostKind CostKind ) const
Helper wrapper for the DemandedElts variant of getScalarizationOverhead.
InstructionCost
getOperandsScalarizationOverhead (ArrayRef < Type * > Tys, TTI::TargetCostKind CostKind ) const override
Estimate the overhead of scalarizing an instruction's operands.
InstructionCost
getScalarizationOverhead (VectorType *RetTy, ArrayRef < const Value * > Args, ArrayRef < Type * > Tys, TTI::TargetCostKind CostKind ) const
Estimate the overhead of scalarizing the inputs and outputs of an instruction, with return type RetTy and arguments Args of type Tys.
std::pair< InstructionCost , MVT >
getTypeLegalizationCost (Type *Ty) const
Estimate the cost of type-legalization and the legalized type.
TTI::ShuffleKind
improveShuffleKindFromMask (TTI::ShuffleKind Kind, ArrayRef < int > Mask, VectorType *SrcTy, int &Index, VectorType *&SubTy) const
InstructionCost
getExtractWithExtendCost (unsigned Opcode, Type *Dst, VectorType *VecTy, unsigned Index, TTI::TargetCostKind CostKind ) const override
InstructionCost
getReplicationShuffleCost (Type *EltTy, int ReplicationFactor, int VF, const APInt &DemandedDstElts, TTI::TargetCostKind CostKind ) const override
InstructionCost
getTypeBasedIntrinsicInstrCost (const IntrinsicCostAttributes &ICA, TTI::TargetCostKind CostKind ) const
Get intrinsic cost based on argument types.
InstructionCost
getCallInstrCost (Function *F , Type *RetTy, ArrayRef < Type * > Tys, TTI::TargetCostKind CostKind ) const override
Compute a cost of the given call instruction.
unsigned
getNumberOfParts (Type *Tp) const override
InstructionCost
getTreeReductionCost (unsigned Opcode, VectorType *Ty, TTI::TargetCostKind CostKind ) const
Try to calculate arithmetic and shuffle op costs for reduction intrinsics.
InstructionCost
getOrderedReductionCost (unsigned Opcode, VectorType *Ty, TTI::TargetCostKind CostKind ) const
Try to calculate the cost of performing strict (in-order) reductions, which involves doing a sequence of floating point additions in lane order, starting with an initial value.
InstructionCost
getMulAccReductionCost (bool IsUnsigned, unsigned RedOpcode, Type *ResTy, VectorType *Ty, TTI::TargetCostKind CostKind ) const override
InstructionCost
getVectorSplitCost () const
Public Member Functions inherited from llvm::TargetTransformInfoImplCRTPBase< T >
InstructionCost
getGEPCost (Type *PointeeType, const Value *Ptr, ArrayRef < const Value * > Operands, Type *AccessType, TTI::TargetCostKind CostKind ) const override
InstructionCost
getPointersChainCost (ArrayRef < const Value * > Ptrs, const Value *Base , const TTI::PointersChainInfo &Info , Type *AccessTy, TTI::TargetCostKind CostKind ) const override
InstructionCost
getInstructionCost (const User *U, ArrayRef < const Value * > Operands, TTI::TargetCostKind CostKind ) const override
bool
isExpensiveToSpeculativelyExecute (const Instruction *I ) const override
bool
supportsTailCallFor (const CallBase *CB) const override
Public Member Functions inherited from llvm::TargetTransformInfoImplBase
virtual
~TargetTransformInfoImplBase ()
TargetTransformInfoImplBase (const TargetTransformInfoImplBase &Arg)=default
TargetTransformInfoImplBase (TargetTransformInfoImplBase &&Arg)
virtual const DataLayout &
getDataLayout () const
virtual unsigned
getInliningCostBenefitAnalysisSavingsMultiplier () const
virtual unsigned
getInliningCostBenefitAnalysisProfitableMultiplier () const
virtual int
getInliningLastCallToStaticBonus () const
virtual InstructionCost
getMemcpyCost (const Instruction *I ) const
virtual uint64_t
getMaxMemIntrinsicInlineSizeThreshold () const
virtual BranchProbability
getPredictableBranchThreshold () const
virtual InstructionCost
getBranchMispredictPenalty () const
virtual bool
canHaveNonUndefGlobalInitializerInAddressSpace (unsigned AS) const
virtual bool
isLoweredToCall (const Function *F ) const
virtual bool
canMacroFuseCmp () const
virtual bool
canSaveCmp (Loop *L, BranchInst **BI, ScalarEvolution *SE, LoopInfo *LI, DominatorTree *DT, AssumptionCache *AC, TargetLibraryInfo *LibInfo) const
virtual bool
isLegalNTStore (Type *DataType, Align Alignment) const
virtual bool
isLegalNTLoad (Type *DataType, Align Alignment) const
virtual bool
isLegalBroadcastLoad (Type *ElementTy, ElementCount NumElements) const
virtual bool
isLegalAltInstr (VectorType *VecTy, unsigned Opcode0, unsigned Opcode1, const SmallBitVector &OpcodeMask) const
virtual bool
isLegalMaskedVectorHistogram (Type *AddrType, Type *DataType) const
virtual bool
hasDivRemOp (Type *DataType, bool IsSigned) const
virtual bool
hasVolatileVariant (Instruction *I , unsigned AddrSpace) const
virtual bool
prefersVectorizedAddressing () const
virtual bool
LSRWithInstrQueries () const
virtual bool
shouldBuildLookupTablesForConstant (Constant *C ) const
virtual bool
useColdCCForColdCall (Function &F ) const
virtual bool
useFastCCForInternalCall (Function &F ) const
virtual bool
supportsEfficientVectorElementLoadStore () const
virtual bool
supportsTailCalls () const
virtual bool
enableAggressiveInterleaving (bool LoopHasReductions) const
virtual bool
enableSelectOptimize () const
virtual bool
shouldTreatInstructionLikeSelect (const Instruction *I ) const
virtual bool
isFPVectorizationPotentiallyUnsafe () const
virtual InstructionCost
getIntImmCodeSizeCost (unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty) const
virtual bool
hasConditionalLoadStoreForType (Type *Ty, bool IsStore) const
virtual bool
shouldMaximizeVectorBandwidth (TargetTransformInfo::RegisterKind K) const
virtual ElementCount
getMinimumVF (unsigned ElemWidth, bool IsScalable) const
virtual InstructionCost
getAltInstrCost (VectorType *VecTy, unsigned Opcode0, unsigned Opcode1, const SmallBitVector &OpcodeMask, TTI::TargetCostKind CostKind ) const
virtual InstructionCost
getInsertExtractValueCost (unsigned Opcode, TTI::TargetCostKind CostKind ) const
virtual unsigned
getAtomicMemIntrinsicMaxElementSize () const
virtual Value *
getOrCreateResultFromMemIntrinsic (IntrinsicInst *Inst, Type *ExpectedType, bool CanCreate=true) const
virtual Type *
getMemcpyLoopLoweringType (LLVMContext &Context , Value *Length , unsigned SrcAddrSpace, unsigned DestAddrSpace, Align SrcAlign, Align DestAlign, std::optional< uint32_t > AtomicElementSize) const
virtual void
getMemcpyLoopResidualLoweringType (SmallVectorImpl < Type * > &OpsOut, LLVMContext &Context , unsigned RemainingBytes, unsigned SrcAddrSpace, unsigned DestAddrSpace, Align SrcAlign, Align DestAlign, std::optional< uint32_t > AtomicCpySize) const
virtual unsigned
getInlineCallPenalty (const Function *F , const CallBase &Call , unsigned DefaultCallPenalty) const
virtual bool
areTypesABICompatible (const Function *Caller, const Function *Callee, ArrayRef < Type * > Types) const
virtual unsigned
getLoadStoreVecRegBitWidth (unsigned AddrSpace) const
virtual bool
isLegalToVectorizeLoad (LoadInst *LI) const
virtual bool
isLegalToVectorizeStore (StoreInst *SI) const
virtual bool
isLegalToVectorizeLoadChain (unsigned ChainSizeInBytes, Align Alignment, unsigned AddrSpace) const
virtual bool
isLegalToVectorizeStoreChain (unsigned ChainSizeInBytes, Align Alignment, unsigned AddrSpace) const
virtual unsigned
getLoadVectorFactor (unsigned VF, unsigned LoadSize, unsigned ChainSizeInBytes, VectorType *VecTy) const
virtual unsigned
getStoreVectorFactor (unsigned VF, unsigned StoreSize, unsigned ChainSizeInBytes, VectorType *VecTy) const
virtual bool
preferFixedOverScalableIfEqualCost (bool IsEpilogue) const
virtual bool
preferInLoopReduction (RecurKind Kind, Type *Ty) const
virtual bool
preferPredicatedReductionSelect () const
virtual TTI::ReductionShuffle
getPreferredExpandedReductionShuffle (const IntrinsicInst *II ) const
virtual unsigned
getGISelRematGlobalCost () const
virtual bool
isVectorShiftByScalarCheap (Type *Ty) const
virtual bool
hasArmWideBranch (bool ) const
virtual APInt
getFeatureMask (const Function &F ) const
virtual bool
isMultiversionedFunction (const Function &F ) const
virtual unsigned
getMaxNumArgs () const
virtual unsigned
getNumBytesToPadGlobalArray (unsigned Size , Type *ArrayType ) const
virtual void
collectKernelLaunchBounds (const Function &F , SmallVectorImpl < std::pair< StringRef , int64_t > > &LB) const
virtual bool
allowVectorElementIndexingUsingGEP () const
EVL Support for predicated vectorization.
Whether the target supports the evl parameter of VP intrinsic efficiently in hardware. (see LLVM Language Reference - "Vector Predication Intrinsics", https://llvm.org/docs/LangRef.html#vector-predication-intrinsics and "IR-level VP intrinsics", https://llvm.org/docs/Proposals/VectorPredication.html#ir-level-vp-intrinsics ).
enum
RISCVRegisterClass { GPRRC , FPRRC , VRRC }
bool
hasActiveVectorLength () const override
TargetTransformInfo::PopcntSupportKind
getPopcntSupport (unsigned TyWidth) const override
InstructionCost
getPartialReductionCost (unsigned Opcode, Type *InputTypeA, Type *InputTypeB, Type *AccumType, ElementCount VF, TTI::PartialReductionExtendKind OpAExtend, TTI::PartialReductionExtendKind OpBExtend, std::optional< unsigned > BinOp, TTI::TargetCostKind CostKind ) const override
bool
shouldExpandReduction (const IntrinsicInst *II ) const override
bool
supportsScalableVectors () const override
bool
enableOrderedReductions () const override
bool
enableScalableVectorization () const override
bool
preferPredicateOverEpilogue (TailFoldingInfo *TFI) const override
TailFoldingStyle
getPreferredTailFoldingStyle (bool IVUpdateMayOverflow) const override
std::optional< unsigned >
getMaxVScale () const override
std::optional< unsigned >
getVScaleForTuning () const override
TypeSize
getRegisterBitWidth (TargetTransformInfo::RegisterKind K) const override
unsigned
getRegUsageForType (Type *Ty) const override
unsigned
getMaximumVF (unsigned ElemWidth, unsigned Opcode) const override
bool
preferAlternateOpcodeVectorization () const override
bool
preferEpilogueVectorization () const override
bool
shouldConsiderVectorizationRegPressure () const override
InstructionCost
getMemIntrinsicInstrCost (const MemIntrinsicCostAttributes &MICA, TTI::TargetCostKind CostKind ) const override
Get memory intrinsic cost based on arguments.
InstructionCost
getMaskedMemoryOpCost (const MemIntrinsicCostAttributes &MICA, TTI::TargetCostKind CostKind ) const
InstructionCost
getPointersChainCost (ArrayRef < const Value * > Ptrs, const Value *Base , const TTI::PointersChainInfo &Info , Type *AccessTy, TTI::TargetCostKind CostKind ) const override
void
getUnrollingPreferences (Loop *L, ScalarEvolution &SE, TTI::UnrollingPreferences &UP, OptimizationRemarkEmitter *ORE) const override
void
getPeelingPreferences (Loop *L, ScalarEvolution &SE, TTI::PeelingPreferences &PP) const override
bool
getTgtMemIntrinsic (IntrinsicInst *Inst, MemIntrinsicInfo &Info ) const override
unsigned
getMinVectorRegisterBitWidth () const override
InstructionCost
getShuffleCost (TTI::ShuffleKind Kind, VectorType *DstTy, VectorType *SrcTy, ArrayRef < int > Mask, TTI::TargetCostKind CostKind , int Index, VectorType *SubTp, ArrayRef < const Value * > Args={}, const Instruction *CxtI=nullptr) const override
InstructionCost
getScalarizationOverhead (VectorType *Ty, const APInt &DemandedElts, bool Insert, bool Extract, TTI::TargetCostKind CostKind , bool ForPoisonSrc=true, ArrayRef < Value * > VL={}) const override
Estimate the overhead of scalarizing an instruction.
InstructionCost
getIntrinsicInstrCost (const IntrinsicCostAttributes &ICA, TTI::TargetCostKind CostKind ) const override
Get intrinsic cost based on arguments.
InstructionCost
getAddressComputationCost (Type *PTy, ScalarEvolution *SE, const SCEV *Ptr, TTI::TargetCostKind CostKind ) const override
InstructionCost
getInterleavedMemoryOpCost (unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef < unsigned > Indices, Align Alignment, unsigned AddressSpace , TTI::TargetCostKind CostKind , bool UseMaskForCond=false, bool UseMaskForGaps=false) const override
InstructionCost
getGatherScatterOpCost (const MemIntrinsicCostAttributes &MICA, TTI::TargetCostKind CostKind ) const
InstructionCost
getExpandCompressMemoryOpCost (const MemIntrinsicCostAttributes &MICA, TTI::TargetCostKind CostKind ) const
InstructionCost
getStridedMemoryOpCost (const MemIntrinsicCostAttributes &MICA, TTI::TargetCostKind CostKind ) const
InstructionCost
getCostOfKeepingLiveOverCall (ArrayRef < Type * > Tys) const override
InstructionCost
getCastInstrCost (unsigned Opcode, Type *Dst, Type *Src, TTI::CastContextHint CCH, TTI::TargetCostKind CostKind , const Instruction *I =nullptr) const override
InstructionCost
getMinMaxReductionCost (Intrinsic::ID IID, VectorType *Ty, FastMathFlags FMF, TTI::TargetCostKind CostKind ) const override
Try to calculate op costs for min/max reduction operations.
InstructionCost
getArithmeticReductionCost (unsigned Opcode, VectorType *Ty, std::optional< FastMathFlags > FMF, TTI::TargetCostKind CostKind ) const override
InstructionCost
getExtendedReductionCost (unsigned Opcode, bool IsUnsigned, Type *ResTy, VectorType *ValTy, std::optional< FastMathFlags > FMF, TTI::TargetCostKind CostKind ) const override
InstructionCost
getMemoryOpCost (unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace , TTI::TargetCostKind CostKind , TTI::OperandValueInfo OpdInfo={TTI::OK_AnyValue , TTI::OP_None }, const Instruction *I =nullptr) const override
InstructionCost
getCmpSelInstrCost (unsigned Opcode, Type *ValTy, Type *CondTy, CmpInst::Predicate VecPred, TTI::TargetCostKind CostKind , TTI::OperandValueInfo Op1Info={TTI::OK_AnyValue , TTI::OP_None }, TTI::OperandValueInfo Op2Info={TTI::OK_AnyValue , TTI::OP_None }, const Instruction *I =nullptr) const override
InstructionCost
getCFInstrCost (unsigned Opcode, TTI::TargetCostKind CostKind , const Instruction *I =nullptr) const override
InstructionCost
getVectorInstrCost (unsigned Opcode, Type *Val, TTI::TargetCostKind CostKind , unsigned Index, const Value *Op0, const Value *Op1) const override
InstructionCost
getIndexedVectorInstrCostFromEnd (unsigned Opcode, Type *Val, TTI::TargetCostKind CostKind , unsigned Index) const override
InstructionCost
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={}, const Instruction *CxtI=nullptr) const override
bool
isElementTypeLegalForScalableVector (Type *Ty) const override
bool
isLegalMaskedLoadStore (Type *DataType, Align Alignment) const
bool
isLegalMaskedLoad (Type *DataType, Align Alignment, unsigned , TTI::MaskKind ) const override
bool
isLegalMaskedStore (Type *DataType, Align Alignment, unsigned , TTI::MaskKind ) const override
bool
isLegalMaskedGatherScatter (Type *DataType, Align Alignment) const
bool
isLegalMaskedGather (Type *DataType, Align Alignment) const override
bool
isLegalMaskedScatter (Type *DataType, Align Alignment) const override
bool
forceScalarizeMaskedGather (VectorType *VTy, Align Alignment) const override
bool
forceScalarizeMaskedScatter (VectorType *VTy, Align Alignment) const override
bool
isLegalStridedLoadStore (Type *DataType, Align Alignment) const override
bool
isLegalInterleavedAccessType (VectorType *VTy, unsigned Factor, Align Alignment, unsigned AddrSpace) const override
bool
isLegalMaskedExpandLoad (Type *DataType, Align Alignment) const override
bool
isLegalMaskedCompressStore (Type *DataTy, Align Alignment) const override
bool
isVScaleKnownToBeAPowerOfTwo () const override
TargetTransformInfo::VPLegalization
getVPLegalizationStrategy (const VPIntrinsic &PI) const override
bool
isLegalToVectorizeReduction (const RecurrenceDescriptor &RdxDesc, ElementCount VF) const override
unsigned
getMaxInterleaveFactor (ElementCount VF) const override
bool
enableInterleavedAccessVectorization () const override
bool
enableMaskedInterleavedAccessVectorization () const override
unsigned
getMinTripCountTailFoldingThreshold () const override
unsigned
getNumberOfRegisters (unsigned ClassID) const override
TTI::AddressingModeKind
getPreferredAddressingMode (const Loop *L, ScalarEvolution *SE) const override
unsigned
getRegisterClassForType (bool Vector , Type *Ty=nullptr) const override
const char *
getRegisterClassName (unsigned ClassID) const override
bool
isLSRCostLess (const TargetTransformInfo::LSRCost &C1, const TargetTransformInfo::LSRCost &C2) const override
bool
shouldConsiderAddressTypePromotion (const Instruction &I , bool &AllowPromotionWithoutCommonHeader) const override
See if I should be considered for address type promotion.
std::optional< unsigned >
getMinPageSize () const override
bool
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.
bool
canSplatOperand (unsigned Opcode, int Operand) const
Return true if a vector instruction will lower to a target instruction able to splat the given operand.
bool
isProfitableToSinkOperands (Instruction *I , SmallVectorImpl < Use * > &Ops ) const override
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.
TTI::MemCmpExpansionOptions
enableMemCmpExpansion (bool OptSize, bool IsZeroCmp) const override
InstructionCost
getVectorInstrCost (unsigned Opcode, Type *Val, TTI::TargetCostKind CostKind , unsigned Index, Value *Scalar, ArrayRef < std::tuple< Value *, User *, int > > ScalarUserAndIdx) const override
InstructionCost
getVectorInstrCost (const Instruction &I , Type *Val, TTI::TargetCostKind CostKind , unsigned Index) const override
Definition at line 28 of file RISCVTargetTransformInfo.h .
◆ RISCVRegisterClass◆ canSplatOperand() [1/2]◆ canSplatOperand() [2/2]
bool RISCVTTIImpl::canSplatOperand
(
unsigned
Opcode ,
int
Operand ) const
Return true if a vector instruction will lower to a target instruction able to splat the given operand.
Definition at line 3268 of file RISCVTargetTransformInfo.cpp .
◆ enableInterleavedAccessVectorization()
bool llvm::RISCVTTIImpl::enableInterleavedAccessVectorization ( ) const
inlineoverridevirtual
◆ enableMaskedInterleavedAccessVectorization()
bool llvm::RISCVTTIImpl::enableMaskedInterleavedAccessVectorization ( ) const
inlineoverridevirtual
◆ enableMemCmpExpansion()◆ enableOrderedReductions()
bool llvm::RISCVTTIImpl::enableOrderedReductions ( ) const
inlineoverridevirtual
◆ enableScalableVectorization()
bool llvm::RISCVTTIImpl::enableScalableVectorization ( ) const
inlineoverridevirtual
◆ forceScalarizeMaskedGather()
bool llvm::RISCVTTIImpl::forceScalarizeMaskedGather ( VectorType * VTy , Align Alignment ) const
inlineoverridevirtual
◆ forceScalarizeMaskedScatter()
bool llvm::RISCVTTIImpl::forceScalarizeMaskedScatter ( VectorType * VTy , Align Alignment ) const
inlineoverridevirtual
◆ getAddressComputationCost()◆ getArithmeticInstrCost()Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl > .
Definition at line 2582 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() .
◆ getArithmeticReductionCost()Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl > .
Definition at line 2020 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() .
◆ getCastInstrCost()Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl > .
Definition at line 1698 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() .
◆ getCFInstrCost()◆ getCmpSelInstrCost()Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl > .
Definition at line 2237 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() .
◆ getCostOfKeepingLiveOverCall()◆ getExpandCompressMemoryOpCost()Definition at line 1188 of file RISCVTargetTransformInfo.cpp .
References llvm::SmallVectorImpl< T >::append() , CostKind , llvm::MemIntrinsicCostAttributes::getAlignment() , llvm::MemIntrinsicCostAttributes::getDataType() , llvm::MemIntrinsicCostAttributes::getID() , llvm::BasicTTIImplBase< RISCVTTIImpl >::getMemIntrinsicInstrCost() , getMemoryOpCost() , llvm::BasicTTIImplBase< RISCVTTIImpl >::getTypeLegalizationCost() , llvm::MemIntrinsicCostAttributes::getVariableMask() , isLegalMaskedCompressStore() , isLegalMaskedExpandLoad() , llvm::SmallVectorTemplateBase< T, bool >::push_back() , and llvm::TargetTransformInfo::TCK_RecipThroughput .
Referenced by getMemIntrinsicInstrCost() .
◆ getExtendedReductionCost()◆ getGatherScatterOpCost()Definition at line 1159 of file RISCVTargetTransformInfo.cpp .
References llvm::cast() , CostKind , llvm::MemIntrinsicCostAttributes::getAlignment() , llvm::MemIntrinsicCostAttributes::getDataType() , llvm::MemIntrinsicCostAttributes::getID() , llvm::MemIntrinsicCostAttributes::getInst() , llvm::BasicTTIImplBase< RISCVTTIImpl >::getMemIntrinsicInstrCost() , getMemoryOpCost() , I , isLegalMaskedGather() , isLegalMaskedScatter() , and llvm::TargetTransformInfo::TCK_RecipThroughput .
Referenced by getMemIntrinsicInstrCost() .
◆ getIndexedVectorInstrCostFromEnd()◆ getInterleavedMemoryOpCost()Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl > .
Definition at line 1061 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 .
◆ getIntImmCost()◆ getIntImmCostInst()Reimplemented from llvm::TargetTransformInfoImplBase .
Definition at line 206 of file RISCVTargetTransformInfo.cpp .
References assert() , canUseShiftCmp() , 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 .
◆ getIntImmCostIntrin()◆ getIntrinsicInstrCost()Get intrinsic cost based on arguments.
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl > .
Definition at line 1345 of file RISCVTargetTransformInfo.cpp .
References AbstractManglingParser< Derived, Alloc >::Ops , llvm::CmpInst::BAD_ICMP_PREDICATE , llvm::cast() , CostKind , llvm::CostTableLookup() , llvm::BasicTTIImplBase< RISCVTTIImpl >::DL , llvm::SmallVectorTemplateCommon< T, typename >::empty() , 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 .
◆ getMaskedMemoryOpCost()◆ getMaximumVF()◆ getMaxInterleaveFactor()◆ getMaxVScale()
std::optional< unsigned > RISCVTTIImpl::getMaxVScale ( ) const
overridevirtual
◆ getMemIntrinsicInstrCost()Get memory intrinsic cost based on arguments.
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl > .
Definition at line 1011 of file RISCVTargetTransformInfo.cpp .
References CostKind , llvm::BasicTTIImplBase< RISCVTTIImpl >::DL , llvm::MemIntrinsicCostAttributes::getAddressSpace() , llvm::MemIntrinsicCostAttributes::getAlignment() , llvm::MemIntrinsicCostAttributes::getDataType() , getExpandCompressMemoryOpCost() , getGatherScatterOpCost() , llvm::MemIntrinsicCostAttributes::getID() , getMaskedMemoryOpCost() , llvm::BasicTTIImplBase< RISCVTTIImpl >::getMemIntrinsicInstrCost() , getMemoryOpCost() , getStridedMemoryOpCost() , llvm::TargetTransformInfo::OK_AnyValue , and llvm::TargetTransformInfo::OP_None .
◆ getMemoryOpCost()Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl > .
Definition at line 2191 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() , getMemIntrinsicInstrCost() , getStridedMemoryOpCost() , and getVectorInstrCost() .
◆ getMinMaxReductionCost()Try to calculate op costs for min/max reduction operations.
Parameters
CondTy
Conditional type for the Select instruction.
Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl > .
Definition at line 1914 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 .
◆ getMinPageSize()
std::optional< unsigned > llvm::RISCVTTIImpl::getMinPageSize ( ) const
inlineoverridevirtual
◆ getMinTripCountTailFoldingThreshold()
unsigned RISCVTTIImpl::getMinTripCountTailFoldingThreshold ( ) const
overridevirtual
◆ getMinVectorRegisterBitWidth()
unsigned llvm::RISCVTTIImpl::getMinVectorRegisterBitWidth ( ) const
inlineoverridevirtual
◆ getNumberOfRegisters()
unsigned llvm::RISCVTTIImpl::getNumberOfRegisters ( unsigned ClassID ) const
inlineoverridevirtual
◆ getPartialReductionCost()◆ getPeelingPreferences()◆ getPointersChainCost()Reimplemented from llvm::TargetTransformInfoImplBase .
Definition at line 2712 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 .
◆ getPopcntSupport()◆ getPreferredAddressingMode()◆ getPreferredTailFoldingStyle()
TailFoldingStyle llvm::RISCVTTIImpl::getPreferredTailFoldingStyle ( bool IVUpdateMayOverflow ) const
inlineoverridevirtual
◆ getRegisterBitWidth()◆ getRegisterClassForType()
unsigned llvm::RISCVTTIImpl::getRegisterClassForType ( bool Vector , Type * Ty = nullptr ) const
inlineoverridevirtual
◆ getRegisterClassName()
const char * llvm::RISCVTTIImpl::getRegisterClassName ( unsigned ClassID ) const
inlineoverridevirtual
◆ getRegUsageForType()
unsigned RISCVTTIImpl::getRegUsageForType ( Type * Ty ) const
overridevirtual
◆ getScalarizationOverhead()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 965 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() .
◆ getShuffleCost()Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl > .
Definition at line 647 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() .
◆ getStoreImmCost()◆ getStridedMemoryOpCost()Definition at line 1232 of file RISCVTargetTransformInfo.cpp .
References llvm::cast() , CostKind , llvm::MemIntrinsicCostAttributes::getAlignment() , llvm::MemIntrinsicCostAttributes::getDataType() , llvm::MemIntrinsicCostAttributes::getID() , llvm::MemIntrinsicCostAttributes::getInst() , llvm::BasicTTIImplBase< RISCVTTIImpl >::getMemIntrinsicInstrCost() , getMemoryOpCost() , I , isLegalStridedLoadStore() , llvm::TargetTransformInfo::TCC_Basic , and llvm::TargetTransformInfo::TCK_CodeSize .
Referenced by getMemIntrinsicInstrCost() .
◆ getTgtMemIntrinsic()Reimplemented from llvm::TargetTransformInfoImplBase .
Definition at line 2840 of file RISCVTargetTransformInfo.cpp .
References llvm::CallBase::arg_size() , llvm::CallingConv::C , llvm::cast() , llvm::BasicTTIImplBase< RISCVTTIImpl >::DL , llvm::dyn_cast() , llvm::IntegerType::get() , llvm::ScalableVectorType::get() , llvm::VectorType::get() , llvm::CallBase::getArgOperand() , llvm::Value::getContext() , llvm::TargetTransformInfoImplBase::getDataLayout() , llvm::Type::getInt1Ty() , llvm::IntrinsicInst::getIntrinsicID() , llvm::Value::getPointerAlignment() , llvm::ConstantInt::getTrue() , llvm::Value::getType() , llvm::Type::getWithNewType() , II , llvm::isa() , llvm::Type::isVoidTy() , llvm::Align::value() , and llvm::MaybeAlign::valueOrOne() .
◆ getUnrollingPreferences()Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl > .
Definition at line 2759 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 , 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 .
◆ getVectorInstrCost() [1/3]◆ getVectorInstrCost() [2/3]Reimplemented from llvm::BasicTTIImplBase< RISCVTTIImpl > .
Definition at line 2406 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::isa() , llvm::Type::isIntegerTy() , llvm::isUInt() , llvm::Type::isVectorTy() , and llvm::TargetTransformInfo::None .
Referenced by getIndexedVectorInstrCostFromEnd() , and getVectorInstrCost() .
◆ getVectorInstrCost() [3/3]◆ getVPLegalizationStrategy()◆ getVScaleForTuning()
std::optional< unsigned > RISCVTTIImpl::getVScaleForTuning ( ) const
overridevirtual
◆ hasActiveVectorLength()
bool RISCVTTIImpl::hasActiveVectorLength ( ) const
overridevirtual
◆ isElementTypeLegalForScalableVector()
bool llvm::RISCVTTIImpl::isElementTypeLegalForScalableVector ( Type * Ty ) const
inlineoverridevirtual
◆ isLegalInterleavedAccessType()◆ isLegalMaskedCompressStore()
bool RISCVTTIImpl::isLegalMaskedCompressStore ( Type * DataTy , Align Alignment ) const
overridevirtual
◆ isLegalMaskedExpandLoad()
bool RISCVTTIImpl::isLegalMaskedExpandLoad ( Type * DataType , Align Alignment ) const
overridevirtual
◆ isLegalMaskedGather()
bool llvm::RISCVTTIImpl::isLegalMaskedGather ( Type * DataType , Align Alignment ) const
inlineoverridevirtual
◆ isLegalMaskedGatherScatter()
bool llvm::RISCVTTIImpl::isLegalMaskedGatherScatter ( Type * DataType , Align Alignment ) const
inline
◆ isLegalMaskedLoad()◆ isLegalMaskedLoadStore()
bool llvm::RISCVTTIImpl::isLegalMaskedLoadStore ( Type * DataType , Align Alignment ) const
inline
◆ isLegalMaskedScatter()
bool llvm::RISCVTTIImpl::isLegalMaskedScatter ( Type * DataType , Align Alignment ) const
inlineoverridevirtual
◆ isLegalMaskedStore()◆ isLegalStridedLoadStore()
bool llvm::RISCVTTIImpl::isLegalStridedLoadStore ( Type * DataType , Align Alignment ) const
inlineoverridevirtual
◆ isLegalToVectorizeReduction()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 .
◆ isLSRCostLess()◆ isProfitableToSinkOperands()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 3362 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_Value() , llvm::MIPatternMatch::m_ZeroInt() , llvm::PatternMatch::match() , and OpIdx .
◆ isVScaleKnownToBeAPowerOfTwo()
bool llvm::RISCVTTIImpl::isVScaleKnownToBeAPowerOfTwo ( ) const
inlineoverridevirtual
◆ preferAlternateOpcodeVectorization()
bool RISCVTTIImpl::preferAlternateOpcodeVectorization ( ) const
overridevirtual
◆ preferEpilogueVectorization()
bool llvm::RISCVTTIImpl::preferEpilogueVectorization ( ) const
inlineoverridevirtual
◆ preferPredicateOverEpilogue()
bool llvm::RISCVTTIImpl::preferPredicateOverEpilogue ( TailFoldingInfo * TFI ) const
inlineoverridevirtual
bool RISCVTTIImpl::shouldConsiderAddressTypePromotion ( const Instruction & I , bool & AllowPromotionWithoutCommonHeader ) const
overridevirtual
◆ shouldConsiderVectorizationRegPressure()
bool llvm::RISCVTTIImpl::shouldConsiderVectorizationRegPressure ( ) const
inlineoverridevirtual
◆ shouldExpandReduction()◆ supportsScalableVectors()
bool llvm::RISCVTTIImpl::supportsScalableVectors ( ) const
inlineoverridevirtual
The documentation for this class was generated from the following files: