17 #ifndef LLVM_LIB_TARGET_ARM_ARMTARGETTRANSFORMINFO_H 18 #define LLVM_LIB_TARGET_ARM_ARMTARGETTRANSFORMINFO_H 33 class ARMTargetLowering;
37 class ScalarEvolution;
57 ARM::FeatureVFP2, ARM::FeatureVFP3, ARM::FeatureNEON, ARM::FeatureThumb2,
58 ARM::FeatureFP16, ARM::FeatureVFP4, ARM::FeatureFPARMv8,
59 ARM::FeatureFullFP16, ARM::FeatureFP16FML, ARM::FeatureHWDivThumb,
60 ARM::FeatureHWDivARM, ARM::FeatureDB, ARM::FeatureV7Clrex,
61 ARM::FeatureAcquireRelease, ARM::FeatureSlowFPBrcc,
62 ARM::FeaturePerfMon, ARM::FeatureTrustZone, ARM::Feature8MSecExt,
63 ARM::FeatureCrypto, ARM::FeatureCRC, ARM::FeatureRAS,
64 ARM::FeatureFPAO, ARM::FeatureFuseAES, ARM::FeatureZCZeroing,
65 ARM::FeatureProfUnpredicate, ARM::FeatureSlowVGETLNi32,
66 ARM::FeatureSlowVDUP32, ARM::FeaturePreferVMOVSR,
67 ARM::FeaturePrefISHSTBarrier, ARM::FeatureMuxedUnits,
68 ARM::FeatureSlowOddRegister, ARM::FeatureSlowLoadDSubreg,
69 ARM::FeatureDontWidenVMOVS, ARM::FeatureExpandMLx,
70 ARM::FeatureHasVMLxHazards, ARM::FeatureNEONForFPMovs,
71 ARM::FeatureNEONForFP, ARM::FeatureCheckVLDnAlign,
72 ARM::FeatureHasSlowFPVMLx, ARM::FeatureHasSlowFPVFMx,
73 ARM::FeatureVMLxForwarding, ARM::FeaturePref32BitThumb,
74 ARM::FeatureAvoidPartialCPSR, ARM::FeatureCheapPredicableCPSR,
75 ARM::FeatureAvoidMOVsShOp, ARM::FeatureHasRetAddrStack,
76 ARM::FeatureHasNoBranchPredictor, ARM::FeatureDSP, ARM::FeatureMP,
77 ARM::FeatureVirtualization, ARM::FeatureMClass, ARM::FeatureRClass,
78 ARM::FeatureAClass, ARM::FeatureNaClTrap, ARM::FeatureStrictAlign,
79 ARM::FeatureLongCalls, ARM::FeatureExecuteOnly, ARM::FeatureReserveR9,
80 ARM::FeatureNoMovt, ARM::FeatureNoNegativeImmediates
89 TLI(ST->getTargetLowering()) {}
126 bool Vector = (ClassID == 1);
175 case Intrinsic::experimental_vector_reduce_v2_fadd:
176 case Intrinsic::experimental_vector_reduce_v2_fmul:
183 case Intrinsic::experimental_vector_reduce_fmin:
184 case Intrinsic::experimental_vector_reduce_fmax:
208 unsigned Opcode,
Type *Ty,
221 unsigned AddressSpace,
222 bool UseMaskForCond =
false,
223 bool UseMaskForGaps =
false);
253 #endif // LLVM_LIB_TARGET_ARM_ARMTARGETTRANSFORMINFO_H
int getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy, const Instruction *I=nullptr)
bool enableInterleavedAccessVectorization()
This class represents lattice values for constants.
bool isLegalMaskedStore(Type *DataTy, MaybeAlign Alignment)
unsigned getMaxInterleaveFactor(unsigned VF)
bool hasOptSize() const
Optimize this function for size (-Os) or minimum size (-Oz).
bool needsRelocation() const
This method classifies the entry according to whether or not it may generate a relocation entry...
int getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src, const Instruction *I=nullptr)
The main scalar evolution driver.
A cache of @llvm.assume calls within a function.
bool isThumb1Only() const
Base class which can be used to help build a TTI implementation.
int getInterleavedMemoryOpCost(unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, unsigned Alignment, unsigned AddressSpace, bool UseMaskForCond=false, bool UseMaskForGaps=false)
int getIntImmCostInst(unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty)
unsigned getMaxInterleaveFactor() const
bool isLoweredToCall(const Function *F)
bool preferPredicateOverEpilogue(Loop *L, LoopInfo *LI, ScalarEvolution &SE, AssumptionCache &AC, TargetLibraryInfo *TLI, DominatorTree *DT, const LoopAccessInfo *LAI)
BlockT * getHeader() const
int getShuffleCost(TTI::ShuffleKind Kind, Type *Tp, int Index, Type *SubTp)
FastMathFlags getFastMathFlags() const
Convenience function for getting all the fast-math flags, which must be an operator which supports th...
bool useReductionIntrinsic(unsigned Opcode, Type *Ty, TTI::ReductionFlags Flags) const
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
bool isTargetDarwin() const
bool shouldExpandReduction(const IntrinsicInst *II) const
ARMTTIImpl(const ARMBaseTargetMachine *TM, const Function &F)
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree...
bool useSoftFloat() const override
Container class for subtarget features.
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important base class in LLVM.
bool shouldBuildLookupTablesForConstant(Constant *C) const
This file provides a helper that implements much of the TTI interface in terms of the target-independ...
const ARMSubtarget * getSubtarget() const
Attributes of a target dependent hardware loop.
Intrinsic::ID getIntrinsicID() const
Return the intrinsic ID of this intrinsic.
bool shouldFavorBackedgeIndex(const Loop *L) const
bool isHardwareLoopProfitable(Loop *L, ScalarEvolution &SE, AssumptionCache &AC, TargetLibraryInfo *LibInfo, HardwareLoopInfo &HWLoopInfo)
This struct is a compact representation of a valid (power of two) or undefined (0) alignment...
bool hasMVEFloatOps() const
Provides information about what library functions are available for the current target.
int getAddressComputationCost(Type *Val, ScalarEvolution *SE, const SCEV *Ptr)
unsigned getNumberOfRegisters(unsigned ClassID) const
Drive the analysis of memory accesses in the loop.
Class for arbitrary precision integers.
amdgpu Simplify well known AMD library false FunctionCallee Callee
int getArithmeticInstrCost(unsigned Opcode, Type *Ty, TTI::OperandValueKind Op1Info=TTI::OK_AnyValue, TTI::OperandValueKind Op2Info=TTI::OK_AnyValue, TTI::OperandValueProperties Opd1PropInfo=TTI::OP_None, TTI::OperandValueProperties Opd2PropInfo=TTI::OP_None, ArrayRef< const Value *> Args=ArrayRef< const Value *>(), const Instruction *CxtI=nullptr)
bool isLegalMaskedGather(Type *Ty, MaybeAlign Alignment)
bool isFPVectorizationPotentiallyUnsafe()
Floating-point computation using ARMv8 AArch32 Advanced SIMD instructions remains unchanged from ARMv...
int getMemoryOpCost(unsigned Opcode, Type *Src, MaybeAlign Alignment, unsigned AddressSpace, const Instruction *I=nullptr)
unsigned getNumBlocks() const
Get the number of blocks in this loop in constant time.
bool areInlineCompatible(const Function *Caller, const Function *Callee) const
int getMemcpyCost(const Instruction *I)
This class represents an analyzed expression in the program.
Represents a single loop in the control flow graph.
const Function * getParent() const
Return the enclosing method, or null if none.
int getIntImmCost(const APInt &Imm, Type *Ty)
bool isLegalMaskedLoad(Type *DataTy, MaybeAlign Alignment)
void getUnrollingPreferences(Loop *L, ScalarEvolution &SE, TTI::UnrollingPreferences &UP)
static const Function * getParent(const Value *V)
int getIntImmCodeSizeCost(unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty)
bool hasMVEIntegerOps() const
unsigned getRegisterBitWidth(bool Vector) const
bool allowReassoc() const
Flag queries.
int getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index)
bool isLegalMaskedScatter(Type *Ty, MaybeAlign Alignment)
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
A wrapper class for inspecting calls to intrinsic functions.