Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
llvm::ARMTTIImpl Class Referencefinal

#include "Target/ARM/ARMTargetTransformInfo.h"

Inheritance diagram for llvm::ARMTTIImpl:
[legend]

Public Member Functions

 ARMTTIImpl (const ARMBaseTargetMachine *TM, const Function &F)
bool areInlineCompatible (const Function *Caller, const Function *Callee) const override
bool enableInterleavedAccessVectorization () const override
TTI::AddressingModeKind getPreferredAddressingMode (const Loop *L, ScalarEvolution *SE) const override
bool isFPVectorizationPotentiallyUnsafe () const override
 Floating-point computation using ARMv8 AArch32 Advanced SIMD instructions remains unchanged from ARMv7.
std::optional< Instruction * > instCombineIntrinsic (InstCombiner &IC, IntrinsicInst &II) 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
Scalar TTI Implementations
InstructionCost getIntImmCodeSizeCost (unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty) const override
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
Vector TTI Implementations
unsigned getNumberOfRegisters (unsigned ClassID) const override
TypeSize getRegisterBitWidth (TargetTransformInfo::RegisterKind K) const override
unsigned getMaxInterleaveFactor (ElementCount VF) const override
bool isProfitableLSRChainElement (Instruction *I) const override
bool isLegalMaskedLoad (Type *DataTy, Align Alignment, unsigned AddressSpace) const override
bool isLegalMaskedStore (Type *DataTy, Align Alignment, unsigned AddressSpace) const override
bool forceScalarizeMaskedGather (VectorType *VTy, Align Alignment) const override
bool forceScalarizeMaskedScatter (VectorType *VTy, Align Alignment) const override
bool isLegalMaskedGather (Type *Ty, Align Alignment) const override
bool isLegalMaskedScatter (Type *Ty, Align Alignment) const override
InstructionCost getMemcpyCost (const Instruction *I) const override
uint64_t getMaxMemIntrinsicInlineSizeThreshold () const override
int getNumMemOps (const IntrinsicInst *I) const
 Given a memcpy/memset/memmove instruction, return the number of memory operations performed, via querying findOptimalMemOpLowering.
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
bool preferInLoopReduction (RecurKind Kind, Type *Ty) const override
bool preferPredicatedReductionSelect () const override
bool shouldExpandReduction (const IntrinsicInst *II) const override
InstructionCost getCFInstrCost (unsigned Opcode, TTI::TargetCostKind CostKind, const Instruction *I=nullptr) const override
InstructionCost getCastInstrCost (unsigned Opcode, Type *Dst, Type *Src, TTI::CastContextHint CCH, TTI::TargetCostKind CostKind, 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 getVectorInstrCost (unsigned Opcode, Type *Val, TTI::TargetCostKind CostKind, unsigned Index, const Value *Op0, const Value *Op1) const override
InstructionCost getAddressComputationCost (Type *Val, ScalarEvolution *SE, const SCEV *Ptr, TTI::TargetCostKind CostKind) 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
InstructionCost getMemoryOpCost (unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, TTI::OperandValueInfo OpInfo={TTI::OK_AnyValue, TTI::OP_None}, const Instruction *I=nullptr) const override
InstructionCost getMaskedMemoryOpCost (unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace, 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 (unsigned Opcode, Type *DataTy, const Value *Ptr, bool VariableMask, Align Alignment, TTI::TargetCostKind CostKind, const Instruction *I=nullptr) const override
InstructionCost getArithmeticReductionCost (unsigned Opcode, VectorType *ValTy, 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 getMulAccReductionCost (bool IsUnsigned, unsigned RedOpcode, Type *ResTy, VectorType *ValTy, TTI::TargetCostKind CostKind) const override
InstructionCost getMinMaxReductionCost (Intrinsic::ID IID, VectorType *Ty, FastMathFlags FMF, TTI::TargetCostKind CostKind) const override
InstructionCost getIntrinsicInstrCost (const IntrinsicCostAttributes &ICA, TTI::TargetCostKind CostKind) const override
InstructionCost getScalingFactorCost (Type *Ty, GlobalValue *BaseGV, StackOffset BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace) const override
 getScalingFactorCost - Return the cost of the scaling used in addressing mode represented by AM.
bool maybeLoweredToCall (Instruction &I) const
bool isLoweredToCall (const Function *F) const override
bool isHardwareLoopProfitable (Loop *L, ScalarEvolution &SE, AssumptionCache &AC, TargetLibraryInfo *LibInfo, HardwareLoopInfo &HWLoopInfo) const override
bool preferPredicateOverEpilogue (TailFoldingInfo *TFI) const override
void getUnrollingPreferences (Loop *L, ScalarEvolution &SE, TTI::UnrollingPreferences &UP, OptimizationRemarkEmitter *ORE) const override
TailFoldingStyle getPreferredTailFoldingStyle (bool IVUpdateMayOverflow=true) const override
void getPeelingPreferences (Loop *L, ScalarEvolution &SE, TTI::PeelingPreferences &PP) const override
bool shouldBuildLookupTablesForConstant (Constant *C) const override
bool hasArmWideBranch (bool Thumb) const override
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.
unsigned getNumBytesToPadGlobalArray (unsigned Size, Type *ArrayType) 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
Public Member Functions inherited from llvm::BasicTTIImplBase< ARMTTIImpl >
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 *, unsignedgetPredicatedAddrSpace (const Value *V) const override
ValuerewriteIntrinsicWithAddressSpace (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 isLSRCostLess (const TTI::LSRCost &C1, const TTI::LSRCost &C2) 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
unsigned getRegUsageForType (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
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 isHardwareLoopProfitable (Loop *L, ScalarEvolution &SE, AssumptionCache &AC, TargetLibraryInfo *LibInfo, HardwareLoopInfo &HWLoopInfo) const override
unsigned getEpilogueVectorizationMinVF () const override
bool preferPredicateOverEpilogue (TailFoldingInfo *TFI) const override
TailFoldingStyle getPreferredTailFoldingStyle (bool IVUpdateMayOverflow=true) 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
virtual std::optional< unsignedgetCacheSize (TargetTransformInfo::CacheLevel Level) const override
virtual std::optional< unsignedgetCacheAssociativity (TargetTransformInfo::CacheLevel Level) const override
virtual unsigned getCacheLineSize () const override
virtual unsigned getPrefetchDistance () const override
virtual unsigned getMinPrefetchStride (unsigned NumMemAccesses, unsigned NumStridedMemAccesses, unsigned NumPrefetches, bool HasCall) const override
virtual unsigned getMaxPrefetchIterationsAhead () const override
virtual bool enableWritePrefetching () const override
virtual bool shouldPrefetchAddressSpace (unsigned AS) const override
TypeSize getRegisterBitWidth (TargetTransformInfo::RegisterKind K) const override
std::optional< unsignedgetMaxVScale () const override
std::optional< unsignedgetVScaleForTuning () const override
bool isVScaleKnownToBeAPowerOfTwo () const override
InstructionCost getScalarizationOverhead (VectorType *InTy, 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.
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, MVTgetTypeLegalizationCost (Type *Ty) const
 Estimate the cost of type-legalization and the legalized type.
unsigned getMaxInterleaveFactor (ElementCount VF) const override
InstructionCost getArithmeticInstrCost (unsigned Opcode, Type *Ty, TTI::TargetCostKind CostKind, TTI::OperandValueInfo Opd1Info={TTI::OK_AnyValue, TTI::OP_None}, TTI::OperandValueInfo Opd2Info={TTI::OK_AnyValue, TTI::OP_None}, ArrayRef< const Value * > Args={}, const Instruction *CxtI=nullptr) const override
TTI::ShuffleKind improveShuffleKindFromMask (TTI::ShuffleKind Kind, ArrayRef< int > Mask, VectorType *SrcTy, int &Index, VectorType *&SubTy) const
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 getCastInstrCost (unsigned Opcode, Type *Dst, Type *Src, TTI::CastContextHint CCH, TTI::TargetCostKind CostKind, const Instruction *I=nullptr) const override
InstructionCost getExtractWithExtendCost (unsigned Opcode, Type *Dst, VectorType *VecTy, unsigned Index, TTI::TargetCostKind CostKind) const override
InstructionCost getCFInstrCost (unsigned Opcode, TTI::TargetCostKind CostKind, 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 getVectorInstrCost (unsigned Opcode, Type *Val, TTI::TargetCostKind CostKind, unsigned Index, const Value *Op0, const Value *Op1) 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
InstructionCost getIndexedVectorInstrCostFromEnd (unsigned Opcode, Type *Val, TTI::TargetCostKind CostKind, unsigned Index) const override
InstructionCost getReplicationShuffleCost (Type *EltTy, int ReplicationFactor, int VF, const APInt &DemandedDstElts, TTI::TargetCostKind CostKind) const override
InstructionCost getMemoryOpCost (unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, TTI::OperandValueInfo OpInfo={TTI::OK_AnyValue, TTI::OP_None}, const Instruction *I=nullptr) const override
InstructionCost getMaskedMemoryOpCost (unsigned Opcode, Type *DataTy, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind) const override
InstructionCost getGatherScatterOpCost (unsigned Opcode, Type *DataTy, const Value *Ptr, bool VariableMask, Align Alignment, TTI::TargetCostKind CostKind, const Instruction *I=nullptr) const override
InstructionCost getExpandCompressMemoryOpCost (unsigned Opcode, Type *DataTy, bool VariableMask, Align Alignment, TTI::TargetCostKind CostKind, const Instruction *I=nullptr) const override
InstructionCost getStridedMemoryOpCost (unsigned Opcode, Type *DataTy, const Value *Ptr, bool VariableMask, Align Alignment, TTI::TargetCostKind CostKind, const Instruction *I) 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 getIntrinsicInstrCost (const IntrinsicCostAttributes &ICA, TTI::TargetCostKind CostKind) const override
 Get intrinsic cost based on arguments.
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 getAddressComputationCost (Type *PtrTy, ScalarEvolution *, const SCEV *, TTI::TargetCostKind) 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 getArithmeticReductionCost (unsigned Opcode, VectorType *Ty, std::optional< FastMathFlags > FMF, TTI::TargetCostKind CostKind) 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 getExtendedReductionCost (unsigned Opcode, bool IsUnsigned, Type *ResTy, VectorType *Ty, std::optional< FastMathFlags > FMF, TTI::TargetCostKind CostKind) const override
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 DataLayoutgetDataLayout () const
virtual unsigned getInliningCostBenefitAnalysisSavingsMultiplier () const
virtual unsigned getInliningCostBenefitAnalysisProfitableMultiplier () const
virtual int getInliningLastCallToStaticBonus () const
virtual BranchProbability getPredictableBranchThreshold () const
virtual InstructionCost getBranchMispredictPenalty () const
virtual bool canHaveNonUndefGlobalInitializerInAddressSpace (unsigned AS) 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 isLegalMaskedCompressStore (Type *DataType, Align Alignment) const
virtual bool isLegalAltInstr (VectorType *VecTy, unsigned Opcode0, unsigned Opcode1, const SmallBitVector &OpcodeMask) const
virtual bool isLegalMaskedExpandLoad (Type *DataType, Align Alignment) const
virtual bool isLegalStridedLoadStore (Type *DataType, Align Alignment) const
virtual bool isLegalInterleavedAccessType (VectorType *VTy, unsigned Factor, Align Alignment, unsigned AddrSpace) const
virtual bool isLegalMaskedVectorHistogram (Type *AddrType, Type *DataType) const
virtual bool enableOrderedReductions () 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 useColdCCForColdCall (Function &F) const
virtual bool supportsEfficientVectorElementLoadStore () const
virtual bool supportsTailCalls () const
virtual bool enableAggressiveInterleaving (bool LoopHasReductions) const
virtual TTI::MemCmpExpansionOptions enableMemCmpExpansion (bool OptSize, bool IsZeroCmp) const
virtual bool enableSelectOptimize () const
virtual bool shouldTreatInstructionLikeSelect (const Instruction *I) const
virtual bool enableMaskedInterleavedAccessVectorization () const
virtual TTI::PopcntSupportKind getPopcntSupport (unsigned IntTyWidthInBit) const
virtual InstructionCost getIntImmCostIntrin (Intrinsic::ID IID, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind) const
virtual bool hasConditionalLoadStoreForType (Type *Ty, bool IsStore) const
virtual unsigned getRegisterClassForType (bool Vector, Type *Ty=nullptr) const
virtual const chargetRegisterClassName (unsigned ClassID) const
virtual unsigned getMinVectorRegisterBitWidth () const
virtual bool shouldMaximizeVectorBandwidth (TargetTransformInfo::RegisterKind K) const
virtual ElementCount getMinimumVF (unsigned ElemWidth, bool IsScalable) const
virtual unsigned getMaximumVF (unsigned ElemWidth, unsigned Opcode) const
virtual bool shouldConsiderAddressTypePromotion (const Instruction &I, bool &AllowPromotionWithoutCommonHeader) const
virtual std::optional< unsignedgetMinPageSize () const
virtual 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
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 InstructionCost getVPMemoryOpCost (unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, const Instruction *I) const
virtual InstructionCost getCostOfKeepingLiveOverCall (ArrayRef< Type * > Tys) const
virtual bool getTgtMemIntrinsic (IntrinsicInst *Inst, MemIntrinsicInfo &Info) const
virtual unsigned getAtomicMemIntrinsicMaxElementSize () const
virtual ValuegetOrCreateResultFromMemIntrinsic (IntrinsicInst *Inst, Type *ExpectedType, bool CanCreate=true) const
virtual TypegetMemcpyLoopLoweringType (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, const 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 bool isLegalToVectorizeReduction (const RecurrenceDescriptor &RdxDesc, ElementCount VF) const
virtual bool isElementTypeLegalForScalableVector (Type *Ty) 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 preferAlternateOpcodeVectorization () const
virtual bool preferEpilogueVectorization () const
virtual bool shouldConsiderVectorizationRegPressure () const
virtual TTI::ReductionShuffle getPreferredExpandedReductionShuffle (const IntrinsicInst *II) const
virtual unsigned getGISelRematGlobalCost () const
virtual unsigned getMinTripCountTailFoldingThreshold () const
virtual bool supportsScalableVectors () const
virtual bool enableScalableVectorization () const
virtual bool hasActiveVectorLength () const
virtual bool isVectorShiftByScalarCheap (Type *Ty) const
virtual TargetTransformInfo::VPLegalization getVPLegalizationStrategy (const VPIntrinsic &PI) const
virtual APInt getFeatureMask (const Function &F) const
virtual bool isMultiversionedFunction (const Function &F) const
virtual unsigned getMaxNumArgs () const
virtual void collectKernelLaunchBounds (const Function &F, SmallVectorImpl< std::pair< StringRef, int64_t > > &LB) const
virtual bool allowVectorElementIndexingUsingGEP () const

Additional Inherited Members

Protected Types inherited from llvm::TargetTransformInfoImplBase
typedef TargetTransformInfo TTI
Protected Member Functions inherited from llvm::BasicTTIImplBase< ARMTTIImpl >
 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 SCEVConstantgetConstantStrideStep (ScalarEvolution *SE, const SCEV *Ptr) const
bool isConstantStridedAccessLessThan (ScalarEvolution *SE, const SCEV *Ptr, int64_t MergeDistance) const
Protected Attributes inherited from llvm::BasicTTIImplBase< ARMTTIImpl >
const DataLayoutDL
Protected Attributes inherited from llvm::TargetTransformInfoImplBase
const DataLayoutDL

Detailed Description

Definition at line 57 of file ARMTargetTransformInfo.h.

Constructor & Destructor Documentation

◆ ARMTTIImpl()

llvm::ARMTTIImpl::ARMTTIImpl ( const ARMBaseTargetMachine * TM,
const Function & F )
inlineexplicit

Member Function Documentation

◆ areInlineCompatible()

bool ARMTTIImpl::areInlineCompatible ( const Function * Caller,
const Function * Callee ) const
overridevirtual

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 90 of file ARMTargetTransformInfo.cpp.

◆ enableInterleavedAccessVectorization()

bool llvm::ARMTTIImpl::enableInterleavedAccessVectorization ( ) const
inlineoverridevirtual

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 110 of file ARMTargetTransformInfo.h.

◆ forceScalarizeMaskedGather()

bool llvm::ARMTTIImpl::forceScalarizeMaskedGather ( VectorType * VTy,
Align Alignment ) const
inlineoverridevirtual

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 197 of file ARMTargetTransformInfo.h.

Referenced by forceScalarizeMaskedScatter().

◆ forceScalarizeMaskedScatter()

bool llvm::ARMTTIImpl::forceScalarizeMaskedScatter ( VectorType * VTy,
Align Alignment ) const
inlineoverridevirtual

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 206 of file ARMTargetTransformInfo.h.

References forceScalarizeMaskedGather().

◆ getAddressComputationCost()

◆ getArithmeticInstrCost()

◆ getArithmeticReductionCost()

◆ getCastInstrCost()

◆ getCFInstrCost()

InstructionCost ARMTTIImpl::getCFInstrCost ( unsigned Opcode,
TTI::TargetCostKind CostKind,
const Instruction * I = nullptr ) const
overridevirtual

◆ getCmpSelInstrCost()

◆ getExtendedReductionCost()

◆ getGatherScatterOpCost()

◆ getInterleavedMemoryOpCost()

InstructionCost ARMTTIImpl::getInterleavedMemoryOpCost ( unsigned Opcode,
Type * VecTy,
unsigned Factor,
ArrayRef< unsigned > Indices,
Align Alignment,
unsigned AddressSpace,
TTI::TargetCostKind CostKind,
bool UseMaskForCond = false,
bool UseMaskForGaps = false ) const
overridevirtual

◆ getIntImmCodeSizeCost()

InstructionCost ARMTTIImpl::getIntImmCodeSizeCost ( unsigned Opcode,
unsigned Idx,
const APInt & Imm,
Type * Ty ) const
overridevirtual

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 355 of file ARMTargetTransformInfo.cpp.

◆ getIntImmCost()

InstructionCost ARMTTIImpl::getIntImmCost ( const APInt & Imm,
Type * Ty,
TTI::TargetCostKind CostKind ) const
overridevirtual

◆ getIntImmCostInst()

◆ getIntrinsicInstrCost()

◆ getMaskedMemoryOpCost()

InstructionCost ARMTTIImpl::getMaskedMemoryOpCost ( unsigned Opcode,
Type * Src,
Align Alignment,
unsigned AddressSpace,
TTI::TargetCostKind CostKind ) const
overridevirtual

◆ getMaxInterleaveFactor()

unsigned llvm::ARMTTIImpl::getMaxInterleaveFactor ( ElementCount VF) const
inlineoverridevirtual

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 183 of file ARMTargetTransformInfo.h.

◆ getMaxMemIntrinsicInlineSizeThreshold()

uint64_t llvm::ARMTTIImpl::getMaxMemIntrinsicInlineSizeThreshold ( ) const
inlineoverridevirtual

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 219 of file ARMTargetTransformInfo.h.

Referenced by getNumBytesToPadGlobalArray().

◆ getMemcpyCost()

InstructionCost ARMTTIImpl::getMemcpyCost ( const Instruction * I) const
overridevirtual

◆ getMemoryOpCost()

◆ getMinMaxReductionCost()

◆ getMulAccReductionCost()

◆ getNumberOfRegisters()

unsigned llvm::ARMTTIImpl::getNumberOfRegisters ( unsigned ClassID) const
inlineoverridevirtual

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 151 of file ARMTargetTransformInfo.h.

References llvm::Vector.

◆ getNumBytesToPadGlobalArray()

unsigned ARMTTIImpl::getNumBytesToPadGlobalArray ( unsigned Size,
Type * ArrayType ) const
overridevirtual

◆ getNumMemOps()

int ARMTTIImpl::getNumMemOps ( const IntrinsicInst * I) const

Given a memcpy/memset/memmove instruction, return the number of memory operations performed, via querying findOptimalMemOpLowering.

Returns -1 if a call is used.

Definition at line 1160 of file ARMTargetTransformInfo.cpp.

References llvm::CallingConv::C, llvm::MemOp::Copy(), llvm::dyn_cast(), F, I, llvm_unreachable, llvm::MemOp::Set(), and Size.

Referenced by getMemcpyCost(), and maybeLoweredToCall().

◆ getPeelingPreferences()

void ARMTTIImpl::getPeelingPreferences ( Loop * L,
ScalarEvolution & SE,
TTI::PeelingPreferences & PP ) const
overridevirtual

◆ getPreferredAddressingMode()

TTI::AddressingModeKind ARMTTIImpl::getPreferredAddressingMode ( const Loop * L,
ScalarEvolution * SE ) const
overridevirtual

◆ getPreferredTailFoldingStyle()

TailFoldingStyle ARMTTIImpl::getPreferredTailFoldingStyle ( bool IVUpdateMayOverflow = true) const
overridevirtual

◆ getRegisterBitWidth()

◆ getScalingFactorCost()

InstructionCost ARMTTIImpl::getScalingFactorCost ( Type * Ty,
GlobalValue * BaseGV,
StackOffset BaseOffset,
bool HasBaseReg,
int64_t Scale,
unsigned AddrSpace ) const
overridevirtual

◆ getShuffleCost()

◆ getUnrollingPreferences()

void ARMTTIImpl::getUnrollingPreferences ( Loop * L,
ScalarEvolution & SE,
TTI::UnrollingPreferences & UP,
OptimizationRemarkEmitter * ORE ) const
overridevirtual

◆ getVectorInstrCost() [1/3]

InstructionCost llvm::BasicTTIImplBase< ARMTTIImpl >::getVectorInstrCost ( const Instruction & I,
Type * Val,
TTI::TargetCostKind CostKind,
unsigned Index ) const
inlineoverridevirtual

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 1443 of file BasicTTIImpl.h.

◆ getVectorInstrCost() [2/3]

InstructionCost ARMTTIImpl::getVectorInstrCost ( unsigned Opcode,
Type * Val,
TTI::TargetCostKind CostKind,
unsigned Index,
const Value * Op0,
const Value * Op1 ) const
overridevirtual

◆ getVectorInstrCost() [3/3]

InstructionCost llvm::BasicTTIImplBase< ARMTTIImpl >::getVectorInstrCost ( unsigned Opcode,
Type * Val,
TTI::TargetCostKind CostKind,
unsigned Index,
Value * Scalar,
ArrayRef< std::tuple< Value *, User *, int > > ScalarUserAndIdx ) const
inlineoverridevirtual
Parameters
ScalarUserAndIdxencodes the information about extracts from a vector with 'Scalar' being the value being extracted,'User' being the user of the extract(nullptr if user is not known before vectorization) and 'Idx' being the extract lane.

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 1434 of file BasicTTIImpl.h.

◆ hasArmWideBranch()

bool ARMTTIImpl::hasArmWideBranch ( bool Thumb) const
overridevirtual

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 2774 of file ARMTargetTransformInfo.cpp.

◆ instCombineIntrinsic()

◆ isFPVectorizationPotentiallyUnsafe()

bool llvm::ARMTTIImpl::isFPVectorizationPotentiallyUnsafe ( ) const
inlineoverridevirtual

Floating-point computation using ARMv8 AArch32 Advanced SIMD instructions remains unchanged from ARMv7.

Only AArch64 SIMD and Arm MVE are IEEE-754 compliant.

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 118 of file ARMTargetTransformInfo.h.

◆ isHardwareLoopProfitable()

◆ isLegalMaskedGather()

bool ARMTTIImpl::isLegalMaskedGather ( Type * Ty,
Align Alignment ) const
overridevirtual

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 1148 of file ARMTargetTransformInfo.cpp.

References EnableMaskedGatherScatters.

Referenced by isLegalMaskedScatter().

◆ isLegalMaskedLoad()

bool ARMTTIImpl::isLegalMaskedLoad ( Type * DataTy,
Align Alignment,
unsigned AddressSpace ) const
overridevirtual

◆ isLegalMaskedScatter()

bool llvm::ARMTTIImpl::isLegalMaskedScatter ( Type * Ty,
Align Alignment ) const
inlineoverridevirtual

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 213 of file ARMTargetTransformInfo.h.

References isLegalMaskedGather().

◆ isLegalMaskedStore()

bool llvm::ARMTTIImpl::isLegalMaskedStore ( Type * DataTy,
Align Alignment,
unsigned AddressSpace ) const
inlineoverridevirtual

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 192 of file ARMTargetTransformInfo.h.

References isLegalMaskedLoad().

Referenced by getMaskedMemoryOpCost().

◆ isLoweredToCall()

bool ARMTTIImpl::isLoweredToCall ( const Function * F) const
overridevirtual

◆ isProfitableLSRChainElement()

bool ARMTTIImpl::isProfitableLSRChainElement ( Instruction * I) const
overridevirtual

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 1110 of file ARMTargetTransformInfo.cpp.

References llvm::dyn_cast(), I, and II.

◆ isProfitableToSinkOperands()

bool ARMTTIImpl::isProfitableToSinkOperands ( Instruction * I,
SmallVectorImpl< Use * > & Ops ) const
overridevirtual

◆ maybeLoweredToCall()

◆ preferInLoopReduction()

bool ARMTTIImpl::preferInLoopReduction ( RecurKind Kind,
Type * Ty ) const
overridevirtual

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 2737 of file ARMTargetTransformInfo.cpp.

References llvm::Add.

◆ preferPredicatedReductionSelect()

bool ARMTTIImpl::preferPredicatedReductionSelect ( ) const
overridevirtual

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 2750 of file ARMTargetTransformInfo.cpp.

◆ preferPredicateOverEpilogue()

◆ shouldBuildLookupTablesForConstant()

bool llvm::ARMTTIImpl::shouldBuildLookupTablesForConstant ( Constant * C) const
inlineoverridevirtual

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 338 of file ARMTargetTransformInfo.h.

References llvm::CallingConv::C.

◆ shouldExpandReduction()

bool llvm::ARMTTIImpl::shouldExpandReduction ( const IntrinsicInst * II) const
inlineoverridevirtual

Reimplemented from llvm::TargetTransformInfoImplBase.

Definition at line 235 of file ARMTargetTransformInfo.h.

References II.

◆ simplifyDemandedVectorEltsIntrinsic()

std::optional< Value * > ARMTTIImpl::simplifyDemandedVectorEltsIntrinsic ( InstCombiner & IC,
IntrinsicInst & II,
APInt DemandedElts,
APInt & UndefElts,
APInt & UndefElts2,
APInt & UndefElts3,
std::function< void(Instruction *, unsigned, APInt, APInt &)> SimplifyAndSetOp ) const
overridevirtual

The documentation for this class was generated from the following files: