LLVM 17.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"
22#include "llvm/ADT/ArrayRef.h"
25#include "llvm/IR/Function.h"
26#include "llvm/IR/Intrinsics.h"
27#include <cstdint>
28#include <optional>
29
30namespace llvm {
31
32class APInt;
33class Instruction;
34class IntrinsicInst;
35class Loop;
36class SCEV;
37class ScalarEvolution;
38class Type;
39class Value;
40class VectorType;
41
42class AArch64TTIImpl : public BasicTTIImplBase<AArch64TTIImpl> {
45
46 friend BaseT;
47
48 const AArch64Subtarget *ST;
49 const AArch64TargetLowering *TLI;
50
51 const AArch64Subtarget *getST() const { return ST; }
52 const AArch64TargetLowering *getTLI() const { return TLI; }
53
54 enum MemIntrinsicType {
55 VECTOR_LDST_TWO_ELEMENTS,
56 VECTOR_LDST_THREE_ELEMENTS,
57 VECTOR_LDST_FOUR_ELEMENTS
58 };
59
60 bool isWideningInstruction(Type *DstTy, unsigned Opcode,
61 ArrayRef<Type *> SrcTys,
63
64 // A helper function called by 'getVectorInstrCost'.
65 //
66 // 'Val' and 'Index' are forwarded from 'getVectorInstrCost'; 'HasRealUse'
67 // indicates whether the vector instruction is available in the input IR or
68 // just imaginary in vectorizer passes.
69 InstructionCost getVectorInstrCostHelper(const Instruction *I, Type *Val,
70 unsigned Index, bool HasRealUse);
71
72public:
74 : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)),
75 TLI(ST->getTargetLowering()) {}
76
77 bool areInlineCompatible(const Function *Caller,
78 const Function *Callee) const;
79
80 /// \name Scalar TTI Implementations
81 /// @{
82
84 InstructionCost getIntImmCost(int64_t Val);
87 InstructionCost getIntImmCostInst(unsigned Opcode, unsigned Idx,
88 const APInt &Imm, Type *Ty,
90 Instruction *Inst = nullptr);
92 const APInt &Imm, Type *Ty,
95
96 /// @}
97
98 /// \name Vector TTI Implementations
99 /// @{
100
102
103 unsigned getNumberOfRegisters(unsigned ClassID) const {
104 bool Vector = (ClassID == 1);
105 if (Vector) {
106 if (ST->hasNEON())
107 return 32;
108 return 0;
109 }
110 return 31;
111 }
112
115
116 std::optional<Instruction *> instCombineIntrinsic(InstCombiner &IC,
117 IntrinsicInst &II) const;
118
119 std::optional<Value *> simplifyDemandedVectorEltsIntrinsic(
120 InstCombiner &IC, IntrinsicInst &II, APInt DemandedElts, APInt &UndefElts,
121 APInt &UndefElts2, APInt &UndefElts3,
122 std::function<void(Instruction *, unsigned, APInt, APInt &)>
123 SimplifyAndSetOp) const;
124
126
128 return ST->getMinVectorRegisterBitWidth();
129 }
130
131 std::optional<unsigned> getVScaleForTuning() const {
132 return ST->getVScaleForTuning();
133 }
134
135 bool isVScaleKnownToBeAPowerOfTwo() const { return true; }
136
138
139 /// Try to return an estimate cost factor that can be used as a multiplier
140 /// when scalarizing an operation for a vector with ElementCount \p VF.
141 /// For scalable vectors this currently takes the most pessimistic view based
142 /// upon the maximum possible value for vscale.
143 unsigned getMaxNumElements(ElementCount VF) const {
144 if (!VF.isScalable())
145 return VF.getFixedValue();
146
147 return VF.getKnownMinValue() * ST->getVScaleForTuning();
148 }
149
151
152 bool prefersVectorizedAddressing() const;
153
154 InstructionCost getMaskedMemoryOpCost(unsigned Opcode, Type *Src,
155 Align Alignment, unsigned AddressSpace,
157
158 InstructionCost getGatherScatterOpCost(unsigned Opcode, Type *DataTy,
159 const Value *Ptr, bool VariableMask,
160 Align Alignment,
162 const Instruction *I = nullptr);
163
164 InstructionCost getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src,
167 const Instruction *I = nullptr);
168
169 InstructionCost getExtractWithExtendCost(unsigned Opcode, Type *Dst,
170 VectorType *VecTy, unsigned Index);
171
173 const Instruction *I = nullptr);
174
175 InstructionCost getVectorInstrCost(unsigned Opcode, Type *Val,
177 unsigned Index, Value *Op0, Value *Op1);
180 unsigned Index);
181
183 bool IsUnsigned, FastMathFlags FMF,
185
187 VectorType *ValTy,
189
191
193 unsigned Opcode, Type *Ty, TTI::TargetCostKind CostKind,
195 TTI::OperandValueInfo Op2Info = {TTI::OK_AnyValue, TTI::OP_None},
196 ArrayRef<const Value *> Args = ArrayRef<const Value *>(),
197 const Instruction *CxtI = nullptr);
198
199 InstructionCost getAddressComputationCost(Type *Ty, ScalarEvolution *SE,
200 const SCEV *Ptr);
201
202 InstructionCost getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy,
203 CmpInst::Predicate VecPred,
205 const Instruction *I = nullptr);
206
207 TTI::MemCmpExpansionOptions enableMemCmpExpansion(bool OptSize,
208 bool IsZeroCmp) const;
209 bool useNeonVector(const Type *Ty) const;
210
211 InstructionCost
212 getMemoryOpCost(unsigned Opcode, Type *Src, MaybeAlign Alignment,
214 TTI::OperandValueInfo OpInfo = {TTI::OK_AnyValue, TTI::OP_None},
215 const Instruction *I = nullptr);
216
217 InstructionCost getCostOfKeepingLiveOverCall(ArrayRef<Type *> Tys);
218
219 void getUnrollingPreferences(Loop *L, ScalarEvolution &SE,
220 TTI::UnrollingPreferences &UP,
221 OptimizationRemarkEmitter *ORE);
222
223 void getPeelingPreferences(Loop *L, ScalarEvolution &SE,
224 TTI::PeelingPreferences &PP);
225
226 Value *getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst,
227 Type *ExpectedType);
228
229 bool getTgtMemIntrinsic(IntrinsicInst *Inst, MemIntrinsicInfo &Info);
230
232 if (Ty->isPointerTy())
233 return true;
234
235 if (Ty->isBFloatTy() && ST->hasBF16())
236 return true;
237
238 if (Ty->isHalfTy() || Ty->isFloatTy() || Ty->isDoubleTy())
239 return true;
240
241 if (Ty->isIntegerTy(8) || Ty->isIntegerTy(16) ||
242 Ty->isIntegerTy(32) || Ty->isIntegerTy(64))
243 return true;
244
245 return false;
246 }
247
248 bool isLegalMaskedLoadStore(Type *DataType, Align Alignment) {
249 if (!ST->hasSVE())
250 return false;
251
252 // For fixed vectors, avoid scalarization if using SVE for them.
253 if (isa<FixedVectorType>(DataType) && !ST->useSVEForFixedLengthVectors())
254 return false; // Fall back to scalarization of masked operations.
255
257 }
258
259 bool isLegalMaskedLoad(Type *DataType, Align Alignment) {
260 return isLegalMaskedLoadStore(DataType, Alignment);
261 }
262
263 bool isLegalMaskedStore(Type *DataType, Align Alignment) {
264 return isLegalMaskedLoadStore(DataType, Alignment);
265 }
266
267 bool isLegalMaskedGatherScatter(Type *DataType) const {
268 if (!ST->hasSVE() || ST->forceStreamingCompatibleSVE())
269 return false;
270
271 // For fixed vectors, scalarize if not using SVE for them.
272 auto *DataTypeFVTy = dyn_cast<FixedVectorType>(DataType);
273 if (DataTypeFVTy && (!ST->useSVEForFixedLengthVectors() ||
274 DataTypeFVTy->getNumElements() < 2))
275 return false;
276
278 }
279
280 bool isLegalMaskedGather(Type *DataType, Align Alignment) const {
281 return isLegalMaskedGatherScatter(DataType);
282 }
283 bool isLegalMaskedScatter(Type *DataType, Align Alignment) const {
284 return isLegalMaskedGatherScatter(DataType);
285 }
286
287 bool isLegalBroadcastLoad(Type *ElementTy, ElementCount NumElements) const {
288 // Return true if we can generate a `ld1r` splat load instruction.
289 if (!ST->hasNEON() || NumElements.isScalable())
290 return false;
291 switch (unsigned ElementBits = ElementTy->getScalarSizeInBits()) {
292 case 8:
293 case 16:
294 case 32:
295 case 64: {
296 // We accept bit-widths >= 64bits and elements {8,16,32,64} bits.
297 unsigned VectorBits = NumElements.getFixedValue() * ElementBits;
298 return VectorBits >= 64;
299 }
300 }
301 return false;
302 }
303
304 bool isLegalNTStoreLoad(Type *DataType, Align Alignment) {
305 // NOTE: The logic below is mostly geared towards LV, which calls it with
306 // vectors with 2 elements. We might want to improve that, if other
307 // users show up.
308 // Nontemporal vector loads/stores can be directly lowered to LDNP/STNP, if
309 // the vector can be halved so that each half fits into a register. That's
310 // the case if the element type fits into a register and the number of
311 // elements is a power of 2 > 1.
312 if (auto *DataTypeTy = dyn_cast<FixedVectorType>(DataType)) {
313 unsigned NumElements = DataTypeTy->getNumElements();
314 unsigned EltSize = DataTypeTy->getElementType()->getScalarSizeInBits();
315 return NumElements > 1 && isPowerOf2_64(NumElements) && EltSize >= 8 &&
316 EltSize <= 128 && isPowerOf2_64(EltSize);
317 }
318 return BaseT::isLegalNTStore(DataType, Alignment);
319 }
320
321 bool isLegalNTStore(Type *DataType, Align Alignment) {
322 return isLegalNTStoreLoad(DataType, Alignment);
323 }
324
325 bool isLegalNTLoad(Type *DataType, Align Alignment) {
326 // Only supports little-endian targets.
327 if (ST->isLittleEndian())
328 return isLegalNTStoreLoad(DataType, Alignment);
329 return BaseT::isLegalNTLoad(DataType, Alignment);
330 }
331
332 bool enableOrderedReductions() const { return true; }
333
335 unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef<unsigned> Indices,
336 Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind,
337 bool UseMaskForCond = false, bool UseMaskForGaps = false);
338
339 bool
341 bool &AllowPromotionWithoutCommonHeader);
342
343 bool shouldExpandReduction(const IntrinsicInst *II) const { return false; }
344
345 unsigned getGISelRematGlobalCost() const {
346 return 2;
347 }
348
350 return ST->hasSVE() ? 5 : 0;
351 }
352
353 TailFoldingStyle getPreferredTailFoldingStyle(bool IVUpdateMayOverflow) const {
354 if (ST->hasSVE())
355 return IVUpdateMayOverflow
358
360 }
361
363
364 bool supportsScalableVectors() const { return ST->hasSVE(); }
365
366 bool enableScalableVectorization() const { return ST->hasSVE(); }
367
369 ElementCount VF) const;
370
371 bool preferPredicatedReductionSelect(unsigned Opcode, Type *Ty,
373 return ST->hasSVE();
374 }
375
377 std::optional<FastMathFlags> FMF,
379
381 ArrayRef<int> Mask,
383 VectorType *SubTp,
384 ArrayRef<const Value *> Args = std::nullopt);
385
386 /// Return the cost of the scaling factor used in the addressing
387 /// mode represented by AM for this target, for a load/store
388 /// of the specified type.
389 /// If the AM is supported, the return value must be >= 0.
390 /// If the AM is not supported, it returns a negative value.
392 int64_t BaseOffset, bool HasBaseReg,
393 int64_t Scale, unsigned AddrSpace) const;
394 /// @}
395
396 bool enableSelectOptimize() { return ST->enableSelectOptimize(); }
397
398 unsigned getStoreMinimumVF(unsigned VF, Type *ScalarMemTy,
399 Type *ScalarValTy) const {
400 // We can vectorize store v4i8.
401 if (ScalarMemTy->isIntegerTy(8) && isPowerOf2_32(VF) && VF >= 4)
402 return 4;
403
404 return BaseT::getStoreMinimumVF(VF, ScalarMemTy, ScalarValTy);
405 }
406};
407
408} // end namespace llvm
409
410#endif // LLVM_LIB_TARGET_AARCH64_AARCH64TARGETTRANSFORMINFO_H
amdgpu Simplify well known AMD library false FunctionCallee Callee
static const Function * getParent(const Value *V)
This file provides a helper that implements much of the TTI interface in terms of the target-independ...
RelocType Type
Definition: COFFYAML.cpp:391
Analysis containing CSE Info
Definition: CSEInfo.cpp:27
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")))
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
#define F(x, y, z)
Definition: MD5.cpp:55
#define I(x, y, z)
Definition: MD5.cpp:58
const char LLVMTargetMachineRef TM
This pass exposes codegen information to IR-level passes.
@ Flags
Definition: TextStubV5.cpp:93
InstructionCost getSpliceCost(VectorType *Tp, int Index)
InstructionCost getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src, TTI::CastContextHint CCH, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
InstructionCost getIntImmCostInst(unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind, Instruction *Inst=nullptr)
InstructionCost getMaskedMemoryOpCost(unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind)
InstructionCost getMinMaxReductionCost(VectorType *Ty, VectorType *CondTy, bool IsUnsigned, FastMathFlags FMF, TTI::TargetCostKind CostKind)
unsigned getMinTripCountTailFoldingThreshold() const
bool isLegalNTStoreLoad(Type *DataType, Align Alignment)
unsigned getGISelRematGlobalCost() const
bool preferPredicatedReductionSelect(unsigned Opcode, Type *Ty, TTI::ReductionFlags Flags) const
std::optional< unsigned > getVScaleForTuning() const
InstructionCost getAddressComputationCost(Type *Ty, ScalarEvolution *SE, const SCEV *Ptr)
InstructionCost getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA, TTI::TargetCostKind CostKind)
InstructionCost getArithmeticReductionCost(unsigned Opcode, VectorType *Ty, std::optional< FastMathFlags > FMF, TTI::TargetCostKind CostKind)
InstructionCost getExtractWithExtendCost(unsigned Opcode, Type *Dst, VectorType *VecTy, unsigned Index)
bool isLegalMaskedStore(Type *DataType, Align Alignment)
bool isLegalToVectorizeReduction(const RecurrenceDescriptor &RdxDesc, ElementCount VF) const
Value * getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst, Type *ExpectedType)
bool isLegalBroadcastLoad(Type *ElementTy, ElementCount NumElements) const
bool shouldConsiderAddressTypePromotion(const Instruction &I, bool &AllowPromotionWithoutCommonHeader)
See if I should be considered for address type promotion.
InstructionCost getArithmeticReductionCostSVE(unsigned Opcode, VectorType *ValTy, TTI::TargetCostKind CostKind)
InstructionCost getInterleavedMemoryOpCost(unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, bool UseMaskForCond=false, bool UseMaskForGaps=false)
bool shouldExpandReduction(const IntrinsicInst *II) const
unsigned getStoreMinimumVF(unsigned VF, Type *ScalarMemTy, Type *ScalarValTy) const
unsigned getMinVectorRegisterBitWidth() const
std::optional< Instruction * > instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const
bool shouldMaximizeVectorBandwidth(TargetTransformInfo::RegisterKind K) const
InstructionCost getMemoryOpCost(unsigned Opcode, Type *Src, MaybeAlign Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, TTI::OperandValueInfo OpInfo={TTI::OK_AnyValue, TTI::OP_None}, const Instruction *I=nullptr)
bool isElementTypeLegalForScalableVector(Type *Ty) const
InstructionCost getCostOfKeepingLiveOverCall(ArrayRef< Type * > Tys)
bool isLegalMaskedLoadStore(Type *DataType, Align Alignment)
bool areInlineCompatible(const Function *Caller, const Function *Callee) const
InstructionCost getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy, CmpInst::Predicate VecPred, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
bool useNeonVector(const Type *Ty) const
InstructionCost getVectorInstrCost(unsigned Opcode, Type *Val, TTI::TargetCostKind CostKind, unsigned Index, Value *Op0, Value *Op1)
TTI::PopcntSupportKind getPopcntSupport(unsigned TyWidth)
TypeSize getRegisterBitWidth(TargetTransformInfo::RegisterKind K) const
InstructionCost getGatherScatterOpCost(unsigned Opcode, Type *DataTy, const Value *Ptr, bool VariableMask, Align Alignment, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
bool isLegalMaskedLoad(Type *DataType, Align Alignment)
AArch64TTIImpl(const AArch64TargetMachine *TM, const Function &F)
unsigned getMaxNumElements(ElementCount VF) const
Try to return an estimate cost factor that can be used as a multiplier when scalarizing an operation ...
bool isLegalNTLoad(Type *DataType, Align Alignment)
bool preferPredicateOverEpilogue(TailFoldingInfo *TFI)
TailFoldingStyle getPreferredTailFoldingStyle(bool IVUpdateMayOverflow) const
bool isLegalMaskedGatherScatter(Type *DataType) const
unsigned getMaxInterleaveFactor(ElementCount VF)
bool isLegalMaskedScatter(Type *DataType, Align Alignment) const
void getPeelingPreferences(Loop *L, ScalarEvolution &SE, TTI::PeelingPreferences &PP)
InstructionCost getCFInstrCost(unsigned Opcode, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
InstructionCost getIntImmCost(int64_t Val)
Calculate the cost of materializing a 64-bit value.
unsigned getNumberOfRegisters(unsigned ClassID) const
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
void getUnrollingPreferences(Loop *L, ScalarEvolution &SE, TTI::UnrollingPreferences &UP, OptimizationRemarkEmitter *ORE)
bool isLegalMaskedGather(Type *DataType, Align Alignment) const
bool getTgtMemIntrinsic(IntrinsicInst *Inst, MemIntrinsicInfo &Info)
TTI::MemCmpExpansionOptions enableMemCmpExpansion(bool OptSize, bool IsZeroCmp) const
bool isLegalNTStore(Type *DataType, Align Alignment)
InstructionCost getIntImmCostIntrin(Intrinsic::ID IID, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind)
InstructionCost getScalingFactorCost(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace) const
Return the cost of the scaling factor used in the addressing mode represented by AM for this target,...
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=ArrayRef< const Value * >(), const Instruction *CxtI=nullptr)
InstructionCost getShuffleCost(TTI::ShuffleKind Kind, VectorType *Tp, ArrayRef< int > Mask, TTI::TargetCostKind CostKind, int Index, VectorType *SubTp, ArrayRef< const Value * > Args=std::nullopt)
Class for arbitrary precision integers.
Definition: APInt.h:75
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
Base class which can be used to help build a TTI implementation.
Definition: BasicTTIImpl.h:79
unsigned getStoreMinimumVF(unsigned VF, Type *ScalarMemTy, Type *ScalarValTy) const
Definition: BasicTTIImpl.h:341
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
Definition: InstrTypes.h:711
Convenience struct for specifying and reasoning about fast-math flags.
Definition: FMF.h:20
The core instruction combiner logic.
Definition: InstCombiner.h:46
A wrapper class for inspecting calls to intrinsic functions.
Definition: IntrinsicInst.h:47
The RecurrenceDescriptor is used to identify recurrences variables in a loop.
Definition: IVDescriptors.h:69
const DataLayout & getDataLayout() const
bool isLegalNTStore(Type *DataType, Align Alignment) const
InstructionCost getIntImmCost(const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind) const
bool isLegalNTLoad(Type *DataType, Align Alignment) const
This pass provides access to the codegen interfaces that are needed for IR-level transformations.
TargetCostKind
The kind of cost model.
PopcntSupportKind
Flags indicating the kind of support for population count.
ShuffleKind
The various kinds of shuffle patterns for vector queries.
CastContextHint
Represents a hint about the context in which a cast is used.
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
bool isPointerTy() const
True if this is an instance of PointerType.
Definition: Type.h:256
bool isFloatTy() const
Return true if this is 'float', a 32-bit IEEE fp type.
Definition: Type.h:154
bool isBFloatTy() const
Return true if this is 'bfloat', a 16-bit bfloat type.
Definition: Type.h:146
unsigned getScalarSizeInBits() const LLVM_READONLY
If this is a vector type, return the getPrimitiveSizeInBits value for the element type.
bool isHalfTy() const
Return true if this is 'half', a 16-bit IEEE fp type.
Definition: Type.h:143
bool isDoubleTy() const
Return true if this is 'double', a 64-bit IEEE fp type.
Definition: Type.h:157
bool isIntegerTy() const
True if this is an instance of IntegerType.
Definition: Type.h:229
Type * getScalarType() const
If this is a vector type, return the element type, otherwise return 'this'.
Definition: Type.h:348
LLVM Value Representation.
Definition: Value.h:74
Base class of all SIMD vector types.
Definition: DerivedTypes.h:400
constexpr ScalarTy getFixedValue() const
Definition: TypeSize.h:182
constexpr bool isScalable() const
Returns whether the quantity is scaled by a runtime quantity (vscale).
Definition: TypeSize.h:166
constexpr ScalarTy getKnownMinValue() const
Returns the minimum value this quantity can represent.
Definition: TypeSize.h:163
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
AddressSpace
Definition: NVPTXBaseInfo.h:21
constexpr bool isPowerOf2_64(uint64_t Value)
Return true if the argument is a power of two > 0 (64 bit edition.)
Definition: MathExtras.h:297
constexpr bool isPowerOf2_32(uint32_t Value)
Return true if the argument is a power of two > 0.
Definition: MathExtras.h:292
@ DataAndControlFlowWithoutRuntimeCheck
Use predicate to control both data and control flow, but modify the trip count so that a runtime over...
@ DataAndControlFlow
Use predicate to control both data and control flow.
@ DataWithoutLaneMask
Same as Data, but avoids using the get.active.lane.mask intrinsic to calculate the mask and instead i...
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39
Flags describing the kind of vector reduction.