LLVM  13.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 
129  if (ST->hasSVE())
131  return BaseT::getMaxVScale();
132  }
133 
134  unsigned getMaxInterleaveFactor(unsigned VF);
135 
136  InstructionCost getMaskedMemoryOpCost(unsigned Opcode, Type *Src,
137  Align Alignment, unsigned AddressSpace,
139 
140  InstructionCost getGatherScatterOpCost(unsigned Opcode, Type *DataTy,
141  const Value *Ptr, bool VariableMask,
142  Align Alignment,
144  const Instruction *I = nullptr);
145 
146  InstructionCost getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src,
149  const Instruction *I = nullptr);
150 
151  InstructionCost getExtractWithExtendCost(unsigned Opcode, Type *Dst,
152  VectorType *VecTy, unsigned Index);
153 
155  const Instruction *I = nullptr);
156 
157  InstructionCost getVectorInstrCost(unsigned Opcode, Type *Val,
158  unsigned Index);
159 
161  bool IsUnsigned,
163 
165  VectorType *ValTy,
167 
169 
171  unsigned Opcode, Type *Ty,
178  const Instruction *CxtI = nullptr);
179 
181  const SCEV *Ptr);
182 
183  InstructionCost getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy,
184  CmpInst::Predicate VecPred,
186  const Instruction *I = nullptr);
187 
189  bool IsZeroCmp) const;
190  bool useNeonVector(const Type *Ty) const;
191 
192  InstructionCost getMemoryOpCost(unsigned Opcode, Type *Src,
193  MaybeAlign Alignment, unsigned AddressSpace,
195  const Instruction *I = nullptr);
196 
198 
201 
204 
206  Type *ExpectedType);
207 
209 
211  if (Ty->isPointerTy())
212  return true;
213 
214  if (Ty->isBFloatTy() && ST->hasBF16())
215  return true;
216 
217  if (Ty->isHalfTy() || Ty->isFloatTy() || Ty->isDoubleTy())
218  return true;
219 
220  if (Ty->isIntegerTy(1) || Ty->isIntegerTy(8) || Ty->isIntegerTy(16) ||
221  Ty->isIntegerTy(32) || Ty->isIntegerTy(64))
222  return true;
223 
224  return false;
225  }
226 
227  bool isLegalMaskedLoadStore(Type *DataType, Align Alignment) {
228  if (!ST->hasSVE())
229  return false;
230 
231  // For fixed vectors, avoid scalarization if using SVE for them.
232  if (isa<FixedVectorType>(DataType) && !ST->useSVEForFixedLengthVectors())
233  return false; // Fall back to scalarization of masked operations.
234 
235  return !DataType->getScalarType()->isIntegerTy(1) &&
237  }
238 
239  bool isLegalMaskedLoad(Type *DataType, Align Alignment) {
240  return isLegalMaskedLoadStore(DataType, Alignment);
241  }
242 
243  bool isLegalMaskedStore(Type *DataType, Align Alignment) {
244  return isLegalMaskedLoadStore(DataType, Alignment);
245  }
246 
247  bool isLegalMaskedGatherScatter(Type *DataType) const {
248  if (!ST->hasSVE())
249  return false;
250 
251  // For fixed vectors, scalarize if not using SVE for them.
252  auto *DataTypeFVTy = dyn_cast<FixedVectorType>(DataType);
253  if (DataTypeFVTy && (!ST->useSVEForFixedLengthVectors() ||
254  DataTypeFVTy->getNumElements() < 2))
255  return false;
256 
257  return !DataType->getScalarType()->isIntegerTy(1) &&
259  }
260 
261  bool isLegalMaskedGather(Type *DataType, Align Alignment) const {
262  return isLegalMaskedGatherScatter(DataType);
263  }
264  bool isLegalMaskedScatter(Type *DataType, Align Alignment) const {
265  return isLegalMaskedGatherScatter(DataType);
266  }
267 
268  bool isLegalNTStore(Type *DataType, Align Alignment) {
269  // NOTE: The logic below is mostly geared towards LV, which calls it with
270  // vectors with 2 elements. We might want to improve that, if other
271  // users show up.
272  // Nontemporal vector stores can be directly lowered to STNP, if the vector
273  // can be halved so that each half fits into a register. That's the case if
274  // the element type fits into a register and the number of elements is a
275  // power of 2 > 1.
276  if (auto *DataTypeVTy = dyn_cast<VectorType>(DataType)) {
277  unsigned NumElements =
278  cast<FixedVectorType>(DataTypeVTy)->getNumElements();
279  unsigned EltSize = DataTypeVTy->getElementType()->getScalarSizeInBits();
280  return NumElements > 1 && isPowerOf2_64(NumElements) && EltSize >= 8 &&
281  EltSize <= 128 && isPowerOf2_64(EltSize);
282  }
283  return BaseT::isLegalNTStore(DataType, Alignment);
284  }
285 
287  unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef<unsigned> Indices,
288  Align Alignment, unsigned AddressSpace,
290  bool UseMaskForCond = false, bool UseMaskForGaps = false);
291 
292  bool
294  bool &AllowPromotionWithoutCommonHeader);
295 
296  bool shouldExpandReduction(const IntrinsicInst *II) const { return false; }
297 
298  unsigned getGISelRematGlobalCost() const {
299  return 2;
300  }
301 
302  bool supportsScalableVectors() const { return ST->hasSVE(); }
303 
305  ElementCount VF) const;
306 
308  unsigned Opcode, VectorType *Ty,
310 
312  ArrayRef<int> Mask, int Index,
313  VectorType *SubTp);
314  /// @}
315 };
316 
317 } // end namespace llvm
318 
319 #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:157
llvm::InstructionCost
Definition: InstructionCost.h:29
llvm::TargetTransformInfo::TargetCostKind
TargetCostKind
The kind of cost model.
Definition: TargetTransformInfo.h:210
llvm::AArch64TTIImpl::isLegalMaskedGatherScatter
bool isLegalMaskedGatherScatter(Type *DataType) const
Definition: AArch64TargetTransformInfo.h:247
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
AArch64.h
llvm::AArch64TTIImpl::getVectorInstrCost
InstructionCost getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index)
Definition: AArch64TargetTransformInfo.cpp:1253
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:48
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:1560
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:586
llvm::Type::getScalarType
Type * getScalarType() const
If this is a vector type, return the element type, otherwise return 'this'.
Definition: Type.h:319
llvm::AArch64TTIImpl::getUnrollingPreferences
void getUnrollingPreferences(Loop *L, ScalarEvolution &SE, TTI::UnrollingPreferences &UP)
Definition: AArch64TargetTransformInfo.cpp:1712
llvm::TargetTransformInfo
This pass provides access to the codegen interfaces that are needed for IR-level transformations.
Definition: TargetTransformInfo.h:167
llvm::ScalarEvolution
The main scalar evolution driver.
Definition: ScalarEvolution.h:443
llvm::TargetTransformInfo::RGK_Scalar
@ RGK_Scalar
Definition: TargetTransformInfo.h:898
llvm::AArch64TTIImpl::supportsScalableVectors
bool supportsScalableVectors() const
Definition: AArch64TargetTransformInfo.h:302
llvm::AArch64TTIImpl::getGISelRematGlobalCost
unsigned getGISelRematGlobalCost() const
Definition: AArch64TargetTransformInfo.h:298
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:296
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:529
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:355
VectorType
Definition: ItaniumDemangle.h:901
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
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:31
llvm::AArch64TTIImpl::getExtractWithExtendCost
InstructionCost getExtractWithExtendCost(unsigned Opcode, Type *Dst, VectorType *VecTy, unsigned Index)
Definition: AArch64TargetTransformInfo.cpp:1182
llvm::TargetTransformInfoImplBase::getDataLayout
const DataLayout & getDataLayout() const
Definition: TargetTransformInfoImpl.h:48
AArch64TargetMachine.h
llvm::TargetTransformInfo::OP_None
@ OP_None
Definition: TargetTransformInfo.h:877
llvm::TargetTransformInfo::ShuffleKind
ShuffleKind
The various kinds of shuffle patterns for vector queries.
Definition: TargetTransformInfo.h:850
llvm::TargetTransformInfo::CastContextHint
CastContextHint
Represents a hint about the context in which a cast is used.
Definition: TargetTransformInfo.h:1053
Intrinsics.h
llvm::AArch64TTIImpl::getCostOfKeepingLiveOverCall
InstructionCost getCostOfKeepingLiveOverCall(ArrayRef< Type * > Tys)
Definition: AArch64TargetTransformInfo.cpp:1642
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:88
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:905
llvm::AArch64TTIImpl::getMinMaxReductionCost
InstructionCost getMinMaxReductionCost(VectorType *Ty, VectorType *CondTy, bool IsUnsigned, TTI::TargetCostKind CostKind)
Definition: AArch64TargetTransformInfo.cpp:1907
llvm::AArch64TTIImpl::getMaxVScale
Optional< unsigned > getMaxVScale() const
Definition: AArch64TargetTransformInfo.h:128
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:898
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:2086
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:227
llvm::IntrinsicCostAttributes
Definition: TargetTransformInfo.h:117
llvm::AArch64TTIImpl::getIntrinsicInstrCost
InstructionCost getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA, TTI::TargetCostKind CostKind)
Definition: AArch64TargetTransformInfo.cpp:218
llvm::Type::isIntegerTy
bool isIntegerTy() const
True if this is an instance of IntegerType.
Definition: Type.h:201
llvm::VectorType
Base class of all SIMD vector types.
Definition: DerivedTypes.h:391
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:1505
llvm::TargetTransformInfoImplBase::isLegalNTStore
bool isLegalNTStore(Type *DataType, Align Alignment) const
Definition: TargetTransformInfoImpl.h:239
llvm::AArch64TTIImpl::instCombineIntrinsic
Optional< Instruction * > instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const
Definition: AArch64TargetTransformInfo.cpp:799
llvm::AArch64TTIImpl
Definition: AArch64TargetTransformInfo.h:41
Index
uint32_t Index
Definition: ELFObjHandler.cpp:84
llvm::AArch64::SVEBitsPerBlock
static constexpr unsigned SVEBitsPerBlock
Definition: AArch64BaseInfo.h:684
llvm::AArch64TTIImpl::getArithmeticReductionCostSVE
InstructionCost getArithmeticReductionCostSVE(unsigned Opcode, VectorType *ValTy, TTI::TargetCostKind CostKind)
Definition: AArch64TargetTransformInfo.cpp:1932
llvm::TargetTransformInfo::UnrollingPreferences
Parameters that control the generic loop unrolling transformation.
Definition: TargetTransformInfo.h:423
I
#define I(x, y, z)
Definition: MD5.cpp:59
llvm::TargetTransformInfo::OperandValueProperties
OperandValueProperties
Additional properties of an operand's values.
Definition: TargetTransformInfo.h:877
llvm::BasicTTIImplBase
Base class which can be used to help build a TTI implementation.
Definition: BasicTTIImpl.h:76
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:1879
llvm::AArch64TTIImpl::isLegalMaskedGather
bool isLegalMaskedGather(Type *DataType, Align Alignment) const
Definition: AArch64TargetTransformInfo.h:261
llvm::BasicTTIImplBase< AArch64TTIImpl >::getMaxVScale
Optional< unsigned > getMaxVScale() const
Definition: BasicTTIImpl.h:655
llvm::AArch64TTIImpl::getMaxInterleaveFactor
unsigned getMaxInterleaveFactor(unsigned VF)
Definition: AArch64TargetTransformInfo.cpp:1656
llvm::TargetTransformInfo::OperandValueKind
OperandValueKind
Additional information about an operand's possible values.
Definition: TargetTransformInfo.h:869
llvm::AArch64TTIImpl::getSpliceCost
InstructionCost getSpliceCost(VectorType *Tp, int Index)
Definition: AArch64TargetTransformInfo.cpp:2037
llvm::APInt
Class for arbitrary precision integers.
Definition: APInt.h:70
llvm::TargetTransformInfo::MemCmpExpansionOptions
Returns options for expansion of memcmp. IsZeroCmp is.
Definition: TargetTransformInfo.h:752
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::TargetTransformInfo::TCK_SizeAndLatency
@ TCK_SizeAndLatency
The weighted sum of size and latency.
Definition: TargetTransformInfo.h:214
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::TargetTransformInfo::OK_AnyValue
@ OK_AnyValue
Definition: TargetTransformInfo.h:870
llvm::AArch64TTIImpl::getPopcntSupport
TTI::PopcntSupportKind getPopcntSupport(unsigned TyWidth)
Definition: AArch64TargetTransformInfo.cpp:209
llvm::AArch64TTIImpl::isLegalNTStore
bool isLegalNTStore(Type *DataType, Align Alignment)
Definition: AArch64TargetTransformInfo.h:268
llvm::AArch64TTIImpl::getCmpSelInstrCost
InstructionCost getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy, CmpInst::Predicate VecPred, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
Definition: AArch64TargetTransformInfo.cpp:1426
llvm::Type::isFloatTy
bool isFloatTy() const
Return true if this is 'float', a 32-bit IEEE fp type.
Definition: Type.h:147
llvm::AArch64TTIImpl::getArithmeticInstrCost
InstructionCost getArithmeticInstrCost(unsigned Opcode, Type *Ty, TTI::TargetCostKind CostKind=TTI::TCK_RecipThroughput, 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:1278
llvm::TypeSize
Definition: TypeSize.h:417
llvm::AArch64TTIImpl::getTgtMemIntrinsic
bool getTgtMemIntrinsic(IntrinsicInst *Inst, MemIntrinsicInfo &Info)
Definition: AArch64TargetTransformInfo.cpp:1807
llvm::AArch64TTIImpl::getArithmeticReductionCost
InstructionCost getArithmeticReductionCost(unsigned Opcode, VectorType *Ty, TTI::TargetCostKind CostKind=TTI::TCK_RecipThroughput)
Definition: AArch64TargetTransformInfo.cpp:1958
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:1243
llvm::InstCombiner
The core instruction combiner logic.
Definition: InstCombiner.h:45
llvm::TargetTransformInfo::RGK_ScalableVector
@ RGK_ScalableVector
Definition: TargetTransformInfo.h:898
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:264
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:898
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::getInterleavedMemoryOpCost
InstructionCost getInterleavedMemoryOpCost(unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind=TTI::TCK_SizeAndLatency, bool UseMaskForCond=false, bool UseMaskForGaps=false)
Definition: AArch64TargetTransformInfo.cpp:1615
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:1525
llvm::MemIntrinsicInfo
Information about a load/store intrinsic defined by the target.
Definition: TargetTransformInfo.h:69
llvm::AArch64TTIImpl::getPeelingPreferences
void getPeelingPreferences(Loop *L, ScalarEvolution &SE, TTI::PeelingPreferences &PP)
Definition: AArch64TargetTransformInfo.cpp:1766
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:1852
llvm::AArch64::SVEMaxBitsPerVector
static constexpr unsigned SVEMaxBitsPerVector
Definition: AArch64BaseInfo.h:685
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:480
llvm::AArch64TTIImpl::isElementTypeLegalForScalableVector
bool isElementTypeLegalForScalableVector(Type *Ty) const
Definition: AArch64TargetTransformInfo.h:210
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:239
llvm::Value
LLVM Value Representation.
Definition: Value.h:75
llvm::TargetTransformInfo::TCK_RecipThroughput
@ TCK_RecipThroughput
Reciprocal throughput.
Definition: TargetTransformInfo.h:211
llvm::AArch64TTIImpl::useNeonVector
bool useNeonVector(const Type *Ty) const
Definition: AArch64TargetTransformInfo.cpp:1556
llvm::AArch64TTIImpl::getOrCreateResultFromMemIntrinsic
Value * getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst, Type *ExpectedType)
Definition: AArch64TargetTransformInfo.cpp:1771
llvm::AArch64TTIImpl::enableMemCmpExpansion
TTI::MemCmpExpansionOptions enableMemCmpExpansion(bool OptSize, bool IsZeroCmp) const
Definition: AArch64TargetTransformInfo.cpp:1487
llvm::Intrinsic::ID
unsigned ID
Definition: TargetTransformInfo.h:38
llvm::AArch64TTIImpl::getAddressComputationCost
InstructionCost getAddressComputationCost(Type *Ty, ScalarEvolution *SE, const SCEV *Ptr)
Definition: AArch64TargetTransformInfo.cpp:1407
llvm::AArch64TTIImpl::isLegalMaskedStore
bool isLegalMaskedStore(Type *DataType, Align Alignment)
Definition: AArch64TargetTransformInfo.h:243