LLVM  14.0.0git
AArch64TargetTransformInfo.h
Go to the documentation of this file.
1 //===- AArch64TargetTransformInfo.h - AArch64 specific TTI ------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 /// \file
9 /// This file a TargetTransformInfo::Concept conforming object specific to the
10 /// AArch64 target machine. It uses the target's detailed information to
11 /// provide more precise answers to certain TTI queries, while letting the
12 /// target independent and default TTI implementations handle the rest.
13 ///
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_LIB_TARGET_AARCH64_AARCH64TARGETTRANSFORMINFO_H
17 #define LLVM_LIB_TARGET_AARCH64_AARCH64TARGETTRANSFORMINFO_H
18 
19 #include "AArch64.h"
20 #include "AArch64Subtarget.h"
21 #include "AArch64TargetMachine.h"
22 #include "llvm/ADT/ArrayRef.h"
25 #include "llvm/IR/Function.h"
26 #include "llvm/IR/Intrinsics.h"
27 #include <cstdint>
28 
29 namespace llvm {
30 
31 class APInt;
32 class Instruction;
33 class IntrinsicInst;
34 class Loop;
35 class SCEV;
36 class ScalarEvolution;
37 class Type;
38 class Value;
39 class VectorType;
40 
41 class AArch64TTIImpl : public BasicTTIImplBase<AArch64TTIImpl> {
43  using TTI = TargetTransformInfo;
44 
45  friend BaseT;
46 
47  const AArch64Subtarget *ST;
48  const AArch64TargetLowering *TLI;
49 
50  const AArch64Subtarget *getST() const { return ST; }
51  const AArch64TargetLowering *getTLI() const { return TLI; }
52 
53  enum MemIntrinsicType {
54  VECTOR_LDST_TWO_ELEMENTS,
55  VECTOR_LDST_THREE_ELEMENTS,
56  VECTOR_LDST_FOUR_ELEMENTS
57  };
58 
59  bool isWideningInstruction(Type *Ty, unsigned Opcode,
61 
62 public:
63  explicit AArch64TTIImpl(const AArch64TargetMachine *TM, const Function &F)
64  : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)),
65  TLI(ST->getTargetLowering()) {}
66 
67  bool areInlineCompatible(const Function *Caller,
68  const Function *Callee) const;
69 
70  /// \name Scalar TTI Implementations
71  /// @{
72 
74  InstructionCost getIntImmCost(int64_t Val);
75  InstructionCost getIntImmCost(const APInt &Imm, Type *Ty,
77  InstructionCost getIntImmCostInst(unsigned Opcode, unsigned Idx,
78  const APInt &Imm, Type *Ty,
80  Instruction *Inst = nullptr);
82  const APInt &Imm, Type *Ty,
84  TTI::PopcntSupportKind getPopcntSupport(unsigned TyWidth);
85 
86  /// @}
87 
88  /// \name Vector TTI Implementations
89  /// @{
90 
91  bool enableInterleavedAccessVectorization() { return true; }
92 
93  unsigned getNumberOfRegisters(unsigned ClassID) const {
94  bool Vector = (ClassID == 1);
95  if (Vector) {
96  if (ST->hasNEON())
97  return 32;
98  return 0;
99  }
100  return 31;
101  }
102 
105 
107  IntrinsicInst &II) const;
108 
110  switch (K) {
112  return TypeSize::getFixed(64);
114  if (ST->hasSVE())
115  return TypeSize::getFixed(
116  std::max(ST->getMinSVEVectorSizeInBits(), 128u));
117  return TypeSize::getFixed(ST->hasNEON() ? 128 : 0);
119  return TypeSize::getScalable(ST->hasSVE() ? 128 : 0);
120  }
121  llvm_unreachable("Unsupported register kind");
122  }
123 
124  unsigned getMinVectorRegisterBitWidth() const {
125  return ST->getMinVectorRegisterBitWidth();
126  }
127 
128 
129  /// Try to return an estimate cost factor that can be used as a multiplier
130  /// when scalarizing an operation for a vector with ElementCount \p VF.
131  /// For scalable vectors this currently takes the most pessimistic view based
132  /// upon the maximum possible value for vscale.
134  const Function *F = nullptr) const {
135  if (!VF.isScalable())
136  return VF.getFixedValue();
137 
138  unsigned MaxNumVScale = 16;
139  if (F && F->hasFnAttribute(Attribute::VScaleRange)) {
140  unsigned VScaleMax =
141  F->getFnAttribute(Attribute::VScaleRange).getVScaleRangeArgs().second;
142  if (VScaleMax > 0)
143  MaxNumVScale = VScaleMax;
144  }
145 
146  return MaxNumVScale * VF.getKnownMinValue();
147  }
148 
149  unsigned getMaxInterleaveFactor(unsigned VF);
150 
151  InstructionCost getMaskedMemoryOpCost(unsigned Opcode, Type *Src,
152  Align Alignment, unsigned AddressSpace,
154 
155  InstructionCost getGatherScatterOpCost(unsigned Opcode, Type *DataTy,
156  const Value *Ptr, bool VariableMask,
157  Align Alignment,
159  const Instruction *I = nullptr);
160 
161  InstructionCost getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src,
164  const Instruction *I = nullptr);
165 
166  InstructionCost getExtractWithExtendCost(unsigned Opcode, Type *Dst,
167  VectorType *VecTy, unsigned Index);
168 
170  const Instruction *I = nullptr);
171 
172  InstructionCost getVectorInstrCost(unsigned Opcode, Type *Val,
173  unsigned Index);
174 
176  bool IsUnsigned,
178 
180  VectorType *ValTy,
182 
184 
186  unsigned Opcode, Type *Ty, TTI::TargetCostKind CostKind,
192  const Instruction *CxtI = nullptr);
193 
195  const SCEV *Ptr);
196 
197  InstructionCost getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy,
198  CmpInst::Predicate VecPred,
200  const Instruction *I = nullptr);
201 
203  bool IsZeroCmp) const;
204  bool useNeonVector(const Type *Ty) const;
205 
206  InstructionCost getMemoryOpCost(unsigned Opcode, Type *Src,
207  MaybeAlign Alignment, unsigned AddressSpace,
209  const Instruction *I = nullptr);
210 
212 
216 
219 
221  Type *ExpectedType);
222 
224 
226  if (Ty->isPointerTy())
227  return true;
228 
229  if (Ty->isBFloatTy() && ST->hasBF16())
230  return true;
231 
232  if (Ty->isHalfTy() || Ty->isFloatTy() || Ty->isDoubleTy())
233  return true;
234 
235  if (Ty->isIntegerTy(1) || Ty->isIntegerTy(8) || Ty->isIntegerTy(16) ||
236  Ty->isIntegerTy(32) || Ty->isIntegerTy(64))
237  return true;
238 
239  return false;
240  }
241 
242  bool isLegalMaskedLoadStore(Type *DataType, Align Alignment) {
243  if (!ST->hasSVE())
244  return false;
245 
246  // For fixed vectors, avoid scalarization if using SVE for them.
247  if (isa<FixedVectorType>(DataType) && !ST->useSVEForFixedLengthVectors())
248  return false; // Fall back to scalarization of masked operations.
249 
250  return !DataType->getScalarType()->isIntegerTy(1) &&
252  }
253 
254  bool isLegalMaskedLoad(Type *DataType, Align Alignment) {
255  return isLegalMaskedLoadStore(DataType, Alignment);
256  }
257 
258  bool isLegalMaskedStore(Type *DataType, Align Alignment) {
259  return isLegalMaskedLoadStore(DataType, Alignment);
260  }
261 
262  bool isLegalMaskedGatherScatter(Type *DataType) const {
263  if (!ST->hasSVE())
264  return false;
265 
266  // For fixed vectors, scalarize if not using SVE for them.
267  auto *DataTypeFVTy = dyn_cast<FixedVectorType>(DataType);
268  if (DataTypeFVTy && (!ST->useSVEForFixedLengthVectors() ||
269  DataTypeFVTy->getNumElements() < 2))
270  return false;
271 
272  return !DataType->getScalarType()->isIntegerTy(1) &&
274  }
275 
276  bool isLegalMaskedGather(Type *DataType, Align Alignment) const {
277  return isLegalMaskedGatherScatter(DataType);
278  }
279  bool isLegalMaskedScatter(Type *DataType, Align Alignment) const {
280  return isLegalMaskedGatherScatter(DataType);
281  }
282 
283  bool isLegalNTStore(Type *DataType, Align Alignment) {
284  // NOTE: The logic below is mostly geared towards LV, which calls it with
285  // vectors with 2 elements. We might want to improve that, if other
286  // users show up.
287  // Nontemporal vector stores can be directly lowered to STNP, if the vector
288  // can be halved so that each half fits into a register. That's the case if
289  // the element type fits into a register and the number of elements is a
290  // power of 2 > 1.
291  if (auto *DataTypeVTy = dyn_cast<VectorType>(DataType)) {
292  unsigned NumElements =
293  cast<FixedVectorType>(DataTypeVTy)->getNumElements();
294  unsigned EltSize = DataTypeVTy->getElementType()->getScalarSizeInBits();
295  return NumElements > 1 && isPowerOf2_64(NumElements) && EltSize >= 8 &&
296  EltSize <= 128 && isPowerOf2_64(EltSize);
297  }
298  return BaseT::isLegalNTStore(DataType, Alignment);
299  }
300 
301  bool enableOrderedReductions() const { return true; }
302 
304  unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef<unsigned> Indices,
305  Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind,
306  bool UseMaskForCond = false, bool UseMaskForGaps = false);
307 
308  bool
310  bool &AllowPromotionWithoutCommonHeader);
311 
312  bool shouldExpandReduction(const IntrinsicInst *II) const { return false; }
313 
314  unsigned getGISelRematGlobalCost() const {
315  return 2;
316  }
317 
318  bool supportsScalableVectors() const { return ST->hasSVE(); }
319 
321  ElementCount VF) const;
322 
326 
328  ArrayRef<int> Mask, int Index,
329  VectorType *SubTp);
330  /// @}
331 };
332 
333 } // end namespace llvm
334 
335 #endif // LLVM_LIB_TARGET_AARCH64_AARCH64TARGETTRANSFORMINFO_H
llvm::AArch64TTIImpl::getIntImmCostIntrin
InstructionCost getIntImmCostIntrin(Intrinsic::ID IID, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind)
Definition: AArch64TargetTransformInfo.cpp:159
llvm::InstructionCost
Definition: InstructionCost.h:29
llvm::AArch64TTIImpl::getUnrollingPreferences
void getUnrollingPreferences(Loop *L, ScalarEvolution &SE, TTI::UnrollingPreferences &UP, OptimizationRemarkEmitter *ORE)
Definition: AArch64TargetTransformInfo.cpp:1732
llvm::TargetTransformInfo::TargetCostKind
TargetCostKind
The kind of cost model.
Definition: TargetTransformInfo.h:211
llvm::AArch64TTIImpl::isLegalMaskedGatherScatter
bool isLegalMaskedGatherScatter(Type *DataType) const
Definition: AArch64TargetTransformInfo.h:262
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
AArch64.h
llvm::AArch64TTIImpl::getVectorInstrCost
InstructionCost getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index)
Definition: AArch64TargetTransformInfo.cpp:1275
llvm::CmpInst::Predicate
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
Definition: InstrTypes.h:720
llvm::AArch64TTIImpl::getIntImmCost
InstructionCost getIntImmCost(int64_t Val)
Calculate the cost of materializing a 64-bit value.
Definition: AArch64TargetTransformInfo.cpp:50
llvm::Type::isPointerTy
bool isPointerTy() const
True if this is an instance of PointerType.
Definition: Type.h:228
llvm::ElementCount
Definition: TypeSize.h:386
llvm::AArch64TTIImpl::getRegisterBitWidth
TypeSize getRegisterBitWidth(TargetTransformInfo::RegisterKind K) const
Definition: AArch64TargetTransformInfo.h:109
llvm::AArch64TTIImpl::getMemoryOpCost
InstructionCost getMemoryOpCost(unsigned Opcode, Type *Src, MaybeAlign Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
Definition: AArch64TargetTransformInfo.cpp:1580
llvm::Function
Definition: Function.h:61
llvm::Loop
Represents a single loop in the control flow graph.
Definition: LoopInfo.h:530
llvm::TargetTransformInfo::PopcntSupportKind
PopcntSupportKind
Flags indicating the kind of support for population count.
Definition: TargetTransformInfo.h:592
llvm::Type::getScalarType
Type * getScalarType() const
If this is a vector type, return the element type, otherwise return 'this'.
Definition: Type.h:319
llvm::TargetTransformInfo
This pass provides access to the codegen interfaces that are needed for IR-level transformations.
Definition: TargetTransformInfo.h:168
llvm::ScalarEvolution
The main scalar evolution driver.
Definition: ScalarEvolution.h:461
llvm::TargetTransformInfo::RGK_Scalar
@ RGK_Scalar
Definition: TargetTransformInfo.h:907
llvm::AArch64TTIImpl::supportsScalableVectors
bool supportsScalableVectors() const
Definition: AArch64TargetTransformInfo.h:318
llvm::AArch64TTIImpl::getGISelRematGlobalCost
unsigned getGISelRematGlobalCost() const
Definition: AArch64TargetTransformInfo.h:314
llvm::AArch64TTIImpl::AArch64TTIImpl
AArch64TTIImpl(const AArch64TargetMachine *TM, const Function &F)
Definition: AArch64TargetTransformInfo.h:63
llvm::AArch64TTIImpl::shouldExpandReduction
bool shouldExpandReduction(const IntrinsicInst *II) const
Definition: AArch64TargetTransformInfo.h:312
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::TargetTransformInfo::PeelingPreferences
Definition: TargetTransformInfo.h:535
llvm::Optional
Definition: APInt.h:33
llvm::AArch64TTIImpl::getNumberOfRegisters
unsigned getNumberOfRegisters(unsigned ClassID) const
Definition: AArch64TargetTransformInfo.h:93
llvm::TargetTransformInfoImplBase::getIntImmCost
InstructionCost getIntImmCost(const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind) const
Definition: TargetTransformInfoImpl.h:360
VectorType
Definition: ItaniumDemangle.h:1040
llvm::BitmaskEnumDetail::Mask
std::underlying_type_t< E > Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
Definition: BitmaskEnum.h:80
llvm::LinearPolySize::isScalable
bool isScalable() const
Returns whether the size is scaled by a runtime quantity (vscale).
Definition: TypeSize.h:299
F
#define F(x, y, z)
Definition: MD5.cpp:56
llvm::AArch64TTIImpl::areInlineCompatible
bool areInlineCompatible(const Function *Caller, const Function *Callee) const
Definition: AArch64TargetTransformInfo.cpp:33
llvm::AArch64TTIImpl::getExtractWithExtendCost
InstructionCost getExtractWithExtendCost(unsigned Opcode, Type *Dst, VectorType *VecTy, unsigned Index)
Definition: AArch64TargetTransformInfo.cpp:1204
llvm::TargetTransformInfoImplBase::getDataLayout
const DataLayout & getDataLayout() const
Definition: TargetTransformInfoImpl.h:48
AArch64TargetMachine.h
llvm::TargetTransformInfo::OP_None
@ OP_None
Definition: TargetTransformInfo.h:886
llvm::TargetTransformInfo::ShuffleKind
ShuffleKind
The various kinds of shuffle patterns for vector queries.
Definition: TargetTransformInfo.h:859
llvm::TargetTransformInfo::CastContextHint
CastContextHint
Represents a hint about the context in which a cast is used.
Definition: TargetTransformInfo.h:1062
Intrinsics.h
llvm::AArch64TTIImpl::getCostOfKeepingLiveOverCall
InstructionCost getCostOfKeepingLiveOverCall(ArrayRef< Type * > Tys)
Definition: AArch64TargetTransformInfo.cpp:1662
llvm::MaybeAlign
This struct is a compact representation of a valid (power of two) or undefined (0) alignment.
Definition: Alignment.h:109
llvm::AArch64TTIImpl::getIntImmCostInst
InstructionCost getIntImmCostInst(unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind, Instruction *Inst=nullptr)
Definition: AArch64TargetTransformInfo.cpp:90
llvm::Instruction
Definition: Instruction.h:45
llvm::AArch64TargetMachine
Definition: AArch64TargetMachine.h:25
llvm::AArch64TTIImpl::getCastInstrCost
InstructionCost getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src, TTI::CastContextHint CCH, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
Definition: AArch64TargetTransformInfo.cpp:927
llvm::AArch64TTIImpl::getMinMaxReductionCost
InstructionCost getMinMaxReductionCost(VectorType *Ty, VectorType *CondTy, bool IsUnsigned, TTI::TargetCostKind CostKind)
Definition: AArch64TargetTransformInfo.cpp:1929
llvm::AArch64TTIImpl::getMinVectorRegisterBitWidth
unsigned getMinVectorRegisterBitWidth() const
Definition: AArch64TargetTransformInfo.h:124
Info
Analysis containing CSE Info
Definition: CSEInfo.cpp:27
llvm::TargetTransformInfo::RGK_FixedWidthVector
@ RGK_FixedWidthVector
Definition: TargetTransformInfo.h:907
llvm::Align
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39
llvm::AddressSpace
AddressSpace
Definition: NVPTXBaseInfo.h:21
llvm::AArch64TTIImpl::getShuffleCost
InstructionCost getShuffleCost(TTI::ShuffleKind Kind, VectorType *Tp, ArrayRef< int > Mask, int Index, VectorType *SubTp)
Definition: AArch64TargetTransformInfo.cpp:2128
llvm::LinearPolySize< TypeSize >::getFixed
static TypeSize getFixed(ScalarTy MinVal)
Definition: TypeSize.h:284
llvm::lltok::Kind
Kind
Definition: LLToken.h:18
llvm::AArch64TTIImpl::isLegalMaskedLoadStore
bool isLegalMaskedLoadStore(Type *DataType, Align Alignment)
Definition: AArch64TargetTransformInfo.h:242
llvm::IntrinsicCostAttributes
Definition: TargetTransformInfo.h:118
llvm::AArch64TTIImpl::getIntrinsicInstrCost
InstructionCost getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA, TTI::TargetCostKind CostKind)
Definition: AArch64TargetTransformInfo.cpp:220
llvm::AArch64TTIImpl::getArithmeticReductionCost
InstructionCost getArithmeticReductionCost(unsigned Opcode, VectorType *Ty, Optional< FastMathFlags > FMF, TTI::TargetCostKind CostKind)
Definition: AArch64TargetTransformInfo.cpp:1980
llvm::Type::isIntegerTy
bool isIntegerTy() const
True if this is an instance of IntegerType.
Definition: Type.h:201
llvm::AArch64TTIImpl::getInterleavedMemoryOpCost
InstructionCost getInterleavedMemoryOpCost(unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, bool UseMaskForCond=false, bool UseMaskForGaps=false)
Definition: AArch64TargetTransformInfo.cpp:1635
llvm::VectorType
Base class of all SIMD vector types.
Definition: DerivedTypes.h:389
llvm::SCEV
This class represents an analyzed expression in the program.
Definition: ScalarEvolution.h:78
llvm::AArch64TTIImpl::getMaskedMemoryOpCost
InstructionCost getMaskedMemoryOpCost(unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind)
Definition: AArch64TargetTransformInfo.cpp:1531
llvm::TargetTransformInfoImplBase::isLegalNTStore
bool isLegalNTStore(Type *DataType, Align Alignment) const
Definition: TargetTransformInfoImpl.h:242
llvm::AArch64TTIImpl::instCombineIntrinsic
Optional< Instruction * > instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const
Definition: AArch64TargetTransformInfo.cpp:811
llvm::AArch64TTIImpl
Definition: AArch64TargetTransformInfo.h:41
Index
uint32_t Index
Definition: ELFObjHandler.cpp:84
llvm::AArch64TTIImpl::getArithmeticReductionCostSVE
InstructionCost getArithmeticReductionCostSVE(unsigned Opcode, VectorType *ValTy, TTI::TargetCostKind CostKind)
Definition: AArch64TargetTransformInfo.cpp:1954
llvm::TargetTransformInfo::UnrollingPreferences
Parameters that control the generic loop unrolling transformation.
Definition: TargetTransformInfo.h:428
I
#define I(x, y, z)
Definition: MD5.cpp:59
llvm::TargetTransformInfo::OperandValueProperties
OperandValueProperties
Additional properties of an operand's values.
Definition: TargetTransformInfo.h:886
llvm::AArch64TTIImpl::getArithmeticInstrCost
InstructionCost getArithmeticInstrCost(unsigned Opcode, Type *Ty, TTI::TargetCostKind CostKind, 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)
Definition: AArch64TargetTransformInfo.cpp:1300
llvm::BasicTTIImplBase
Base class which can be used to help build a TTI implementation.
Definition: BasicTTIImpl.h:77
ArrayRef.h
TemplateParamKind::Type
@ Type
llvm::Type::isHalfTy
bool isHalfTy() const
Return true if this is 'half', a 16-bit IEEE fp type.
Definition: Type.h:141
llvm::AArch64TTIImpl::isLegalToVectorizeReduction
bool isLegalToVectorizeReduction(const RecurrenceDescriptor &RdxDesc, ElementCount VF) const
Definition: AArch64TargetTransformInfo.cpp:1901
llvm::AArch64TTIImpl::isLegalMaskedGather
bool isLegalMaskedGather(Type *DataType, Align Alignment) const
Definition: AArch64TargetTransformInfo.h:276
llvm::LinearPolySize::getKnownMinValue
ScalarTy getKnownMinValue() const
Returns the minimum value this size can represent.
Definition: TypeSize.h:297
llvm::AArch64TTIImpl::getMaxInterleaveFactor
unsigned getMaxInterleaveFactor(unsigned VF)
Definition: AArch64TargetTransformInfo.cpp:1676
llvm::TargetTransformInfo::OperandValueKind
OperandValueKind
Additional information about an operand's possible values.
Definition: TargetTransformInfo.h:878
llvm::AArch64TTIImpl::getSpliceCost
InstructionCost getSpliceCost(VectorType *Tp, int Index)
Definition: AArch64TargetTransformInfo.cpp:2079
llvm::APInt
Class for arbitrary precision integers.
Definition: APInt.h:75
llvm::TargetTransformInfo::MemCmpExpansionOptions
Returns options for expansion of memcmp. IsZeroCmp is.
Definition: TargetTransformInfo.h:761
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::AArch64TTIImpl::enableInterleavedAccessVectorization
bool enableInterleavedAccessVectorization()
Definition: AArch64TargetTransformInfo.h:91
llvm::OptimizationRemarkEmitter
The optimization diagnostic interface.
Definition: OptimizationRemarkEmitter.h:33
llvm::LinearPolySize::getFixedValue
ScalarTy getFixedValue() const
Definition: TypeSize.h:313
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition: ErrorHandling.h:136
CostKind
static cl::opt< TargetTransformInfo::TargetCostKind > CostKind("cost-kind", cl::desc("Target cost kind"), cl::init(TargetTransformInfo::TCK_RecipThroughput), cl::values(clEnumValN(TargetTransformInfo::TCK_RecipThroughput, "throughput", "Reciprocal throughput"), clEnumValN(TargetTransformInfo::TCK_Latency, "latency", "Instruction latency"), clEnumValN(TargetTransformInfo::TCK_CodeSize, "code-size", "Code size"), clEnumValN(TargetTransformInfo::TCK_SizeAndLatency, "size-latency", "Code size and latency")))
getParent
static const Function * getParent(const Value *V)
Definition: BasicAliasAnalysis.cpp:776
llvm::AArch64TTIImpl::enableOrderedReductions
bool enableOrderedReductions() const
Definition: AArch64TargetTransformInfo.h:301
llvm::TargetTransformInfo::OK_AnyValue
@ OK_AnyValue
Definition: TargetTransformInfo.h:879
llvm::AArch64TTIImpl::getPopcntSupport
TTI::PopcntSupportKind getPopcntSupport(unsigned TyWidth)
Definition: AArch64TargetTransformInfo.cpp:211
llvm::AArch64TTIImpl::isLegalNTStore
bool isLegalNTStore(Type *DataType, Align Alignment)
Definition: AArch64TargetTransformInfo.h:283
llvm::AArch64TTIImpl::getCmpSelInstrCost
InstructionCost getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy, CmpInst::Predicate VecPred, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
Definition: AArch64TargetTransformInfo.cpp:1452
llvm::Type::isFloatTy
bool isFloatTy() const
Return true if this is 'float', a 32-bit IEEE fp type.
Definition: Type.h:147
llvm::AArch64TTIImpl::getMaxNumElements
unsigned getMaxNumElements(ElementCount VF, const Function *F=nullptr) const
Try to return an estimate cost factor that can be used as a multiplier when scalarizing an operation ...
Definition: AArch64TargetTransformInfo.h:133
llvm::TypeSize
Definition: TypeSize.h:417
llvm::AArch64TTIImpl::getTgtMemIntrinsic
bool getTgtMemIntrinsic(IntrinsicInst *Inst, MemIntrinsicInfo &Info)
Definition: AArch64TargetTransformInfo.cpp:1829
Function.h
llvm::LinearPolySize< TypeSize >::getScalable
static TypeSize getScalable(ScalarTy MinVal)
Definition: TypeSize.h:287
llvm::TargetStackID::Value
Value
Definition: TargetFrameLowering.h:27
llvm::Type::isDoubleTy
bool isDoubleTy() const
Return true if this is 'double', a 64-bit IEEE fp type.
Definition: Type.h:150
llvm::AArch64TTIImpl::getCFInstrCost
InstructionCost getCFInstrCost(unsigned Opcode, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
Definition: AArch64TargetTransformInfo.cpp:1265
llvm::InstCombiner
The core instruction combiner logic.
Definition: InstCombiner.h:45
llvm::TargetTransformInfo::RGK_ScalableVector
@ RGK_ScalableVector
Definition: TargetTransformInfo.h:907
llvm::IntrinsicInst
A wrapper class for inspecting calls to intrinsic functions.
Definition: IntrinsicInst.h:45
Vector
So we should use XX3Form_Rcr to implement instrinsic Convert DP outs ins xscvdpsp No builtin are required Round &Convert QP DP(dword[1] is set to zero) No builtin are required Round to Quad Precision because you need to assign rounding mode in instruction Provide builtin(set f128:$vT,(int_ppc_vsx_xsrqpi f128:$vB))(set f128 yields< n x< ty > >< result > yields< ty >< result > No builtin are required Load Store Vector
Definition: README_P9.txt:497
llvm::AArch64TTIImpl::isLegalMaskedScatter
bool isLegalMaskedScatter(Type *DataType, Align Alignment) const
Definition: AArch64TargetTransformInfo.h:279
llvm::RecurrenceDescriptor
The RecurrenceDescriptor is used to identify recurrences variables in a loop.
Definition: IVDescriptors.h:67
AArch64Subtarget.h
llvm::TargetTransformInfo::RegisterKind
RegisterKind
Definition: TargetTransformInfo.h:907
llvm::Type::isBFloatTy
bool isBFloatTy() const
Return true if this is 'bfloat', a 16-bit bfloat type.
Definition: Type.h:144
llvm::max
Align max(MaybeAlign Lhs, Align Rhs)
Definition: Alignment.h:340
TargetTransformInfo.h
llvm::AArch64TTIImpl::getGatherScatterOpCost
InstructionCost getGatherScatterOpCost(unsigned Opcode, Type *DataTy, const Value *Ptr, bool VariableMask, Align Alignment, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
Definition: AArch64TargetTransformInfo.cpp:1551
llvm::MemIntrinsicInfo
Information about a load/store intrinsic defined by the target.
Definition: TargetTransformInfo.h:70
llvm::AArch64TTIImpl::getPeelingPreferences
void getPeelingPreferences(Loop *L, ScalarEvolution &SE, TTI::PeelingPreferences &PP)
Definition: AArch64TargetTransformInfo.cpp:1788
TM
const char LLVMTargetMachineRef TM
Definition: PassBuilderBindings.cpp:47
llvm::AArch64TTIImpl::shouldConsiderAddressTypePromotion
bool shouldConsiderAddressTypePromotion(const Instruction &I, bool &AllowPromotionWithoutCommonHeader)
See if I should be considered for address type promotion.
Definition: AArch64TargetTransformInfo.cpp:1874
llvm::AMDGPU::HSAMD::Kernel::Key::Args
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
Definition: AMDGPUMetadata.h:389
BasicTTIImpl.h
llvm::AArch64Subtarget
Definition: AArch64Subtarget.h:38
llvm::AArch64TargetLowering
Definition: AArch64ISelLowering.h:484
llvm::AArch64TTIImpl::isElementTypeLegalForScalableVector
bool isElementTypeLegalForScalableVector(Type *Ty) const
Definition: AArch64TargetTransformInfo.h:225
llvm::isPowerOf2_64
constexpr bool isPowerOf2_64(uint64_t Value)
Return true if the argument is a power of two > 0 (64 bit edition.)
Definition: MathExtras.h:496
llvm::AArch64TTIImpl::isLegalMaskedLoad
bool isLegalMaskedLoad(Type *DataType, Align Alignment)
Definition: AArch64TargetTransformInfo.h:254
llvm::Value
LLVM Value Representation.
Definition: Value.h:75
llvm::AArch64TTIImpl::useNeonVector
bool useNeonVector(const Type *Ty) const
Definition: AArch64TargetTransformInfo.cpp:1576
llvm::AArch64TTIImpl::getOrCreateResultFromMemIntrinsic
Value * getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst, Type *ExpectedType)
Definition: AArch64TargetTransformInfo.cpp:1793
llvm::AArch64TTIImpl::enableMemCmpExpansion
TTI::MemCmpExpansionOptions enableMemCmpExpansion(bool OptSize, bool IsZeroCmp) const
Definition: AArch64TargetTransformInfo.cpp:1513
llvm::Intrinsic::ID
unsigned ID
Definition: TargetTransformInfo.h:37
llvm::AArch64TTIImpl::getAddressComputationCost
InstructionCost getAddressComputationCost(Type *Ty, ScalarEvolution *SE, const SCEV *Ptr)
Definition: AArch64TargetTransformInfo.cpp:1433
llvm::AArch64TTIImpl::isLegalMaskedStore
bool isLegalMaskedStore(Type *DataType, Align Alignment)
Definition: AArch64TargetTransformInfo.h:258