16 #ifndef LLVM_LIB_TARGET_AARCH64_AARCH64TARGETTRANSFORMINFO_H 17 #define LLVM_LIB_TARGET_AARCH64_AARCH64TARGETTRANSFORMINFO_H 36 class ScalarEvolution;
53 enum MemIntrinsicType {
54 VECTOR_LDST_TWO_ELEMENTS,
55 VECTOR_LDST_THREE_ELEMENTS,
56 VECTOR_LDST_FOUR_ELEMENTS
59 bool isWideningInstruction(
Type *Ty,
unsigned Opcode,
65 TLI(ST->getTargetLowering()) {}
90 bool Vector = (ClassID == 1);
123 unsigned Opcode,
Type *Ty,
137 bool IsZeroCmp)
const;
153 if (!isa<VectorType>(DataType) || !ST->
hasSVE())
177 unsigned AddressSpace,
178 bool UseMaskForCond =
false,
179 bool UseMaskForGaps =
false);
183 bool &AllowPromotionWithoutCommonHeader);
187 case Intrinsic::experimental_vector_reduce_v2_fadd:
188 case Intrinsic::experimental_vector_reduce_v2_fmul:
192 case Intrinsic::experimental_vector_reduce_fmax:
193 case Intrinsic::experimental_vector_reduce_fmin:
211 bool IsPairwiseForm);
219 #endif // LLVM_LIB_TARGET_AARCH64_AARCH64TARGETTRANSFORMINFO_H Type * getVectorElementType() const
This class represents lattice values for constants.
unsigned getMinVectorRegisterBitWidth()
TTI::PopcntSupportKind getPopcntSupport(unsigned TyWidth)
The main scalar evolution driver.
unsigned getRegisterBitWidth(bool Vector) const
Base class which can be used to help build a TTI implementation.
unsigned getMaxInterleaveFactor(unsigned VF)
int getExtractWithExtendCost(unsigned Opcode, Type *Dst, VectorType *VecTy, unsigned Index)
int getAddressComputationCost(Type *Ty, ScalarEvolution *SE, const SCEV *Ptr)
bool enableInterleavedAccessVectorization()
bool isIntegerTy() const
True if this is an instance of IntegerType.
int getIntImmCostIntrin(Intrinsic::ID IID, unsigned Idx, const APInt &Imm, Type *Ty)
FastMathFlags getFastMathFlags() const
Convenience function for getting all the fast-math flags, which must be an operator which supports th...
int getArithmeticInstrCost(unsigned Opcode, Type *Ty, TTI::OperandValueKind Opd1Info=TTI::OK_AnyValue, TTI::OperandValueKind Opd2Info=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)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
int getMemoryOpCost(unsigned Opcode, Type *Src, MaybeAlign Alignment, unsigned AddressSpace, const Instruction *I=nullptr)
Analysis containing CSE Info
bool getTgtMemIntrinsic(IntrinsicInst *Inst, MemIntrinsicInfo &Info)
unsigned getMinVectorRegisterBitWidth() const
int getShuffleCost(TTI::ShuffleKind Kind, Type *Tp, int Index, Type *SubTp)
bool isFloatTy() const
Return true if this is 'float', a 32-bit IEEE fp type.
bool useReductionIntrinsic(unsigned Opcode, Type *Ty, TTI::ReductionFlags Flags) const
Value * getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst, Type *ExpectedType)
int getIntImmCost(int64_t Val)
Calculate the cost of materializing a 64-bit value.
The instances of the Type class are immutable: once they are created, they are never changed...
int getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index)
bool shouldConsiderAddressTypePromotion(const Instruction &I, bool &AllowPromotionWithoutCommonHeader)
See if I should be considered for address type promotion.
bool isHalfTy() const
Return true if this is 'half', a 16-bit IEEE fp type.
This file provides a helper that implements much of the TTI interface in terms of the target-independ...
TTI::MemCmpExpansionOptions enableMemCmpExpansion(bool OptSize, bool IsZeroCmp) const
int getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy, const Instruction *I=nullptr)
int getInterleavedMemoryOpCost(unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, unsigned Alignment, unsigned AddressSpace, bool UseMaskForCond=false, bool UseMaskForGaps=false)
bool shouldExpandReduction(const IntrinsicInst *II) const
AArch64TTIImpl(const AArch64TargetMachine *TM, const Function &F)
Intrinsic::ID getIntrinsicID() const
Return the intrinsic ID of this intrinsic.
This struct is a compact representation of a valid (power of two) or undefined (0) alignment...
int getIntImmCostInst(unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty)
bool areInlineCompatible(const Function *Caller, const Function *Callee) const
int getCostOfKeepingLiveOverCall(ArrayRef< Type *> Tys)
bool isLegalMaskedStore(Type *DataType, MaybeAlign Alignment)
unsigned getNumberOfRegisters(unsigned ClassID) const
void getUnrollingPreferences(Loop *L, ScalarEvolution &SE, TTI::UnrollingPreferences &UP)
bool isLegalMaskedLoad(Type *DataType, MaybeAlign Alignment)
Class to represent vector types.
Class for arbitrary precision integers.
amdgpu Simplify well known AMD library false FunctionCallee Callee
int getArithmeticReductionCost(unsigned Opcode, Type *Ty, bool IsPairwiseForm)
bool isLegalMaskedLoadStore(Type *DataType, MaybeAlign Alignment)
unsigned getGISelRematGlobalCost() const
This class represents an analyzed expression in the program.
Represents a single loop in the control flow graph.
LLVM Value Representation.
static const Function * getParent(const Value *V)
bool allowReassoc() const
Flag queries.
int getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src, const Instruction *I=nullptr)
bool isDoubleTy() const
Return true if this is 'double', a 64-bit IEEE fp type.
Information about a load/store intrinsic defined by the target.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
A wrapper class for inspecting calls to intrinsic functions.