LLVM 17.0.0git
MachineValueType.h
Go to the documentation of this file.
1//===- CodeGen/MachineValueType.h - Machine-Level types ---------*- 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//
9// This file defines the set of machine-level target independent types which
10// legal values in the code generator use.
11//
12// Constants and properties are defined in ValueTypes.td.
13//
14//===----------------------------------------------------------------------===//
15
16#ifndef LLVM_CODEGEN_MACHINEVALUETYPE_H
17#define LLVM_CODEGEN_MACHINEVALUETYPE_H
18
19#include "llvm/ADT/Sequence.h"
23#include <cassert>
24#include <cstdint>
25
26namespace llvm {
27
28 class Type;
29 class raw_ostream;
30
31 /// Machine Value Type. Every type that is supported natively by some
32 /// processor targeted by LLVM occurs here. This means that any legal value
33 /// type can be represented by an MVT.
34 class MVT {
35 public:
36 enum SimpleValueType : uint8_t {
37 // Simple value types that aren't explicitly part of this enumeration
38 // are considered extended value types.
40
41#define GET_VT_ATTR(Ty, n, sz, Any, Int, FP, Vec, Sc) Ty = n,
42#define GET_VT_RANGES
43#include "llvm/CodeGen/GenVT.inc"
44#undef GET_VT_ATTR
45#undef GET_VT_RANGES
46
47 VALUETYPE_SIZE = LAST_VALUETYPE + 1,
48
49 // This is the current maximum for LAST_VALUETYPE.
50 // MVT::MAX_ALLOWED_VALUETYPE is used for asserts and to size bit vectors
51 // This value must be a multiple of 32.
53 };
54
55 static_assert(FIRST_VALUETYPE > 0);
56 static_assert(LAST_VALUETYPE < MAX_ALLOWED_VALUETYPE);
57
59
60 constexpr MVT() = default;
61 constexpr MVT(SimpleValueType SVT) : SimpleTy(SVT) {}
62
63 bool operator>(const MVT& S) const { return SimpleTy > S.SimpleTy; }
64 bool operator<(const MVT& S) const { return SimpleTy < S.SimpleTy; }
65 bool operator==(const MVT& S) const { return SimpleTy == S.SimpleTy; }
66 bool operator!=(const MVT& S) const { return SimpleTy != S.SimpleTy; }
67 bool operator>=(const MVT& S) const { return SimpleTy >= S.SimpleTy; }
68 bool operator<=(const MVT& S) const { return SimpleTy <= S.SimpleTy; }
69
70 /// Support for debugging, callable in GDB: VT.dump()
71 void dump() const;
72
73 /// Implement operator<<.
74 void print(raw_ostream &OS) const;
75
76 /// Return true if this is a valid simple valuetype.
77 bool isValid() const {
78 return (SimpleTy >= MVT::FIRST_VALUETYPE &&
79 SimpleTy <= MVT::LAST_VALUETYPE);
80 }
81
82 /// Return true if this is a FP or a vector FP type.
83 bool isFloatingPoint() const {
84 return ((SimpleTy >= MVT::FIRST_FP_VALUETYPE &&
85 SimpleTy <= MVT::LAST_FP_VALUETYPE) ||
86 (SimpleTy >= MVT::FIRST_FP_FIXEDLEN_VECTOR_VALUETYPE &&
87 SimpleTy <= MVT::LAST_FP_FIXEDLEN_VECTOR_VALUETYPE) ||
88 (SimpleTy >= MVT::FIRST_FP_SCALABLE_VECTOR_VALUETYPE &&
89 SimpleTy <= MVT::LAST_FP_SCALABLE_VECTOR_VALUETYPE));
90 }
91
92 /// Return true if this is an integer or a vector integer type.
93 bool isInteger() const {
94 return ((SimpleTy >= MVT::FIRST_INTEGER_VALUETYPE &&
95 SimpleTy <= MVT::LAST_INTEGER_VALUETYPE) ||
96 (SimpleTy >= MVT::FIRST_INTEGER_FIXEDLEN_VECTOR_VALUETYPE &&
97 SimpleTy <= MVT::LAST_INTEGER_FIXEDLEN_VECTOR_VALUETYPE) ||
98 (SimpleTy >= MVT::FIRST_INTEGER_SCALABLE_VECTOR_VALUETYPE &&
99 SimpleTy <= MVT::LAST_INTEGER_SCALABLE_VECTOR_VALUETYPE));
100 }
101
102 /// Return true if this is an integer, not including vectors.
103 bool isScalarInteger() const {
104 return (SimpleTy >= MVT::FIRST_INTEGER_VALUETYPE &&
105 SimpleTy <= MVT::LAST_INTEGER_VALUETYPE);
106 }
107
108 /// Return true if this is a vector value type.
109 bool isVector() const {
110 return (SimpleTy >= MVT::FIRST_VECTOR_VALUETYPE &&
111 SimpleTy <= MVT::LAST_VECTOR_VALUETYPE);
112 }
113
114 /// Return true if this is a vector value type where the
115 /// runtime length is machine dependent
116 bool isScalableVector() const {
117 return (SimpleTy >= MVT::FIRST_SCALABLE_VECTOR_VALUETYPE &&
118 SimpleTy <= MVT::LAST_SCALABLE_VECTOR_VALUETYPE);
119 }
120
121 /// Return true if this is a custom target type that has a scalable size.
123 return SimpleTy == MVT::aarch64svcount;
124 }
125
126 /// Return true if the type is a scalable type.
127 bool isScalableVT() const {
129 }
130
131 bool isFixedLengthVector() const {
132 return (SimpleTy >= MVT::FIRST_FIXEDLEN_VECTOR_VALUETYPE &&
133 SimpleTy <= MVT::LAST_FIXEDLEN_VECTOR_VALUETYPE);
134 }
135
136 /// Return true if this is a 16-bit vector type.
137 bool is16BitVector() const {
138 return (isFixedLengthVector() && getFixedSizeInBits() == 16);
139 }
140
141 /// Return true if this is a 32-bit vector type.
142 bool is32BitVector() const {
143 return (isFixedLengthVector() && getFixedSizeInBits() == 32);
144 }
145
146 /// Return true if this is a 64-bit vector type.
147 bool is64BitVector() const {
148 return (isFixedLengthVector() && getFixedSizeInBits() == 64);
149 }
150
151 /// Return true if this is a 128-bit vector type.
152 bool is128BitVector() const {
153 return (isFixedLengthVector() && getFixedSizeInBits() == 128);
154 }
155
156 /// Return true if this is a 256-bit vector type.
157 bool is256BitVector() const {
158 return (isFixedLengthVector() && getFixedSizeInBits() == 256);
159 }
160
161 /// Return true if this is a 512-bit vector type.
162 bool is512BitVector() const {
163 return (isFixedLengthVector() && getFixedSizeInBits() == 512);
164 }
165
166 /// Return true if this is a 1024-bit vector type.
167 bool is1024BitVector() const {
168 return (isFixedLengthVector() && getFixedSizeInBits() == 1024);
169 }
170
171 /// Return true if this is a 2048-bit vector type.
172 bool is2048BitVector() const {
173 return (isFixedLengthVector() && getFixedSizeInBits() == 2048);
174 }
175
176 /// Return true if this is an overloaded type for TableGen.
177 bool isOverloaded() const {
178 switch (SimpleTy) {
179#define GET_VT_ATTR(Ty, n, sz, Any, Int, FP, Vec, Sc) \
180 case Ty: \
181 return Any;
182#include "llvm/CodeGen/GenVT.inc"
183#undef GET_VT_ATTR
184 default:
185 return false;
186 }
187 }
188
189 /// Return a vector with the same number of elements as this vector, but
190 /// with the element type converted to an integer type with the same
191 /// bitwidth.
193 MVT EltTy = getVectorElementType();
194 MVT IntTy = MVT::getIntegerVT(EltTy.getSizeInBits());
197 "Simple vector VT not representable by simple integer vector VT!");
198 return VecTy;
199 }
200
201 /// Return a VT for a vector type whose attributes match ourselves
202 /// with the exception of the element type that is chosen by the caller.
206 "Simple vector VT not representable by simple integer vector VT!");
207 return VecTy;
208 }
209
210 /// Return the type converted to an equivalently sized integer or vector
211 /// with integer element type. Similar to changeVectorElementTypeToInteger,
212 /// but also handles scalars.
214 if (isVector())
217 }
218
219 /// Return a VT for a vector type with the same element type but
220 /// half the number of elements.
222 MVT EltVT = getVectorElementType();
223 auto EltCnt = getVectorElementCount();
224 assert(EltCnt.isKnownEven() && "Splitting vector, but not in half!");
225 return getVectorVT(EltVT, EltCnt.divideCoefficientBy(2));
226 }
227
228 // Return a VT for a vector type with the same element type but
229 // double the number of elements.
231 MVT EltVT = getVectorElementType();
232 auto EltCnt = getVectorElementCount();
233 return MVT::getVectorVT(EltVT, EltCnt * 2);
234 }
235
236 /// Returns true if the given vector is a power of 2.
237 bool isPow2VectorType() const {
238 unsigned NElts = getVectorMinNumElements();
239 return !(NElts & (NElts - 1));
240 }
241
242 /// Widens the length of the given vector MVT up to the nearest power of 2
243 /// and returns that type.
245 if (isPow2VectorType())
246 return *this;
247
249 unsigned NewMinCount = 1 << Log2_32_Ceil(NElts.getKnownMinValue());
250 NElts = ElementCount::get(NewMinCount, NElts.isScalable());
251 return MVT::getVectorVT(getVectorElementType(), NElts);
252 }
253
254 /// If this is a vector, return the element type, otherwise return this.
256 return isVector() ? getVectorElementType() : *this;
257 }
258
260 switch (SimpleTy) {
261 default:
262 llvm_unreachable("Not a vector MVT!");
263
264#define GET_VT_VECATTR(Ty, Sc, nElem, ElTy, ElSz) \
265 case Ty: \
266 return ElTy;
267#include "llvm/CodeGen/GenVT.inc"
268#undef GET_VT_VECATTR
269 }
270 }
271
272 /// Given a vector type, return the minimum number of elements it contains.
273 unsigned getVectorMinNumElements() const {
274 switch (SimpleTy) {
275 default:
276 llvm_unreachable("Not a vector MVT!");
277
278#define GET_VT_VECATTR(Ty, Sc, nElem, ElTy, ElSz) \
279 case Ty: \
280 return nElem;
281#include "llvm/CodeGen/GenVT.inc"
282#undef GET_VT_VECATTR
283 }
284 }
285
288 }
289
290 unsigned getVectorNumElements() const {
291 if (isScalableVector())
293 "Possible incorrect use of MVT::getVectorNumElements() for "
294 "scalable vector. Scalable flag may be dropped, use "
295 "MVT::getVectorElementCount() instead");
297 }
298
299 /// Returns the size of the specified MVT in bits.
300 ///
301 /// If the value type is a scalable vector type, the scalable property will
302 /// be set and the runtime size will be a positive integer multiple of the
303 /// base size.
305 switch (SimpleTy) {
306 default:
307 switch (SimpleTy) {
308 default:
309 llvm_unreachable("getSizeInBits called on extended MVT.");
310
311#define GET_VT_ATTR(Ty, N, Sz, Any, Int, FP, Vec, Sc) \
312 case Ty: \
313 return (Sc ? TypeSize::Scalable(Sz) : TypeSize::Fixed(Sz));
314#include "llvm/CodeGen/GenVT.inc"
315#undef GET_VT_ATTR
316 }
317 case Other:
318 llvm_unreachable("Value type is non-standard value, Other.");
319 case iPTR:
320 llvm_unreachable("Value type size is target-dependent. Ask TLI.");
321 case iPTRAny:
322 case iAny:
323 case fAny:
324 case vAny:
325 case Any:
326 llvm_unreachable("Value type is overloaded.");
327 case token:
328 llvm_unreachable("Token type is a sentinel that cannot be used "
329 "in codegen and has no size");
330 case Metadata:
331 llvm_unreachable("Value type is metadata.");
332 case aarch64svcount: // FIXME: Not in the td.
333 return TypeSize::Scalable(16);
334 }
335 }
336
337 /// Return the size of the specified fixed width value type in bits. The
338 /// function will assert if the type is scalable.
340 return getSizeInBits().getFixedValue();
341 }
342
345 }
346
347 /// Return the number of bytes overwritten by a store of the specified value
348 /// type.
349 ///
350 /// If the value type is a scalable vector type, the scalable property will
351 /// be set and the runtime size will be a positive integer multiple of the
352 /// base size.
354 TypeSize BaseSize = getSizeInBits();
355 return {(BaseSize.getKnownMinValue() + 7) / 8, BaseSize.isScalable()};
356 }
357
358 // Return the number of bytes overwritten by a store of this value type or
359 // this value type's element type in the case of a vector.
362 }
363
364 /// Return the number of bits overwritten by a store of the specified value
365 /// type.
366 ///
367 /// If the value type is a scalable vector type, the scalable property will
368 /// be set and the runtime size will be a positive integer multiple of the
369 /// base size.
371 return getStoreSize() * 8;
372 }
373
374 /// Returns true if the number of bits for the type is a multiple of an
375 /// 8-bit byte.
376 bool isByteSized() const { return getSizeInBits().isKnownMultipleOf(8); }
377
378 /// Return true if we know at compile time this has more bits than VT.
379 bool knownBitsGT(MVT VT) const {
381 }
382
383 /// Return true if we know at compile time this has more than or the same
384 /// bits as VT.
385 bool knownBitsGE(MVT VT) const {
387 }
388
389 /// Return true if we know at compile time this has fewer bits than VT.
390 bool knownBitsLT(MVT VT) const {
392 }
393
394 /// Return true if we know at compile time this has fewer than or the same
395 /// bits as VT.
396 bool knownBitsLE(MVT VT) const {
398 }
399
400 /// Return true if this has more bits than VT.
401 bool bitsGT(MVT VT) const {
403 "Comparison between scalable and fixed types");
404 return knownBitsGT(VT);
405 }
406
407 /// Return true if this has no less bits than VT.
408 bool bitsGE(MVT VT) const {
410 "Comparison between scalable and fixed types");
411 return knownBitsGE(VT);
412 }
413
414 /// Return true if this has less bits than VT.
415 bool bitsLT(MVT VT) const {
417 "Comparison between scalable and fixed types");
418 return knownBitsLT(VT);
419 }
420
421 /// Return true if this has no more bits than VT.
422 bool bitsLE(MVT VT) const {
424 "Comparison between scalable and fixed types");
425 return knownBitsLE(VT);
426 }
427
428 static MVT getFloatingPointVT(unsigned BitWidth) {
429#define GET_VT_ATTR(Ty, n, sz, Any, Int, FP, Vec, Sc) \
430 if (FP == 3 && sz == BitWidth) \
431 return Ty;
432#include "llvm/CodeGen/GenVT.inc"
433#undef GET_VT_ATTR
434
435 llvm_unreachable("Bad bit width!");
436 }
437
438 static MVT getIntegerVT(unsigned BitWidth) {
439#define GET_VT_ATTR(Ty, n, sz, Any, Int, FP, Vec, Sc) \
440 if (Int == 3 && sz == BitWidth) \
441 return Ty;
442#include "llvm/CodeGen/GenVT.inc"
443#undef GET_VT_ATTR
444
446 }
447
448 static MVT getVectorVT(MVT VT, unsigned NumElements) {
449#define GET_VT_VECATTR(Ty, Sc, nElem, ElTy, ElSz) \
450 if (!Sc && VT.SimpleTy == ElTy && NumElements == nElem) \
451 return Ty;
452#include "llvm/CodeGen/GenVT.inc"
453#undef GET_VT_VECATTR
454
456 }
457
458 static MVT getScalableVectorVT(MVT VT, unsigned NumElements) {
459#define GET_VT_VECATTR(Ty, Sc, nElem, ElTy, ElSz) \
460 if (Sc && VT.SimpleTy == ElTy && NumElements == nElem) \
461 return Ty;
462#include "llvm/CodeGen/GenVT.inc"
463#undef GET_VT_VECATTR
464
466 }
467
468 static MVT getVectorVT(MVT VT, unsigned NumElements, bool IsScalable) {
469 if (IsScalable)
470 return getScalableVectorVT(VT, NumElements);
471 return getVectorVT(VT, NumElements);
472 }
473
475 if (EC.isScalable())
476 return getScalableVectorVT(VT, EC.getKnownMinValue());
477 return getVectorVT(VT, EC.getKnownMinValue());
478 }
479
480 /// Return the value type corresponding to the specified type. This returns
481 /// all pointers as iPTR. If HandleUnknown is true, unknown types are
482 /// returned as Other, otherwise they are invalid.
483 static MVT getVT(Type *Ty, bool HandleUnknown = false);
484
485 public:
486 /// SimpleValueType Iteration
487 /// @{
488 static auto all_valuetypes() {
489 return enum_seq_inclusive(MVT::FIRST_VALUETYPE, MVT::LAST_VALUETYPE,
491 }
492
493 static auto integer_valuetypes() {
494 return enum_seq_inclusive(MVT::FIRST_INTEGER_VALUETYPE,
495 MVT::LAST_INTEGER_VALUETYPE,
497 }
498
499 static auto fp_valuetypes() {
500 return enum_seq_inclusive(MVT::FIRST_FP_VALUETYPE, MVT::LAST_FP_VALUETYPE,
502 }
503
504 static auto vector_valuetypes() {
505 return enum_seq_inclusive(MVT::FIRST_VECTOR_VALUETYPE,
506 MVT::LAST_VECTOR_VALUETYPE,
508 }
509
511 return enum_seq_inclusive(MVT::FIRST_FIXEDLEN_VECTOR_VALUETYPE,
512 MVT::LAST_FIXEDLEN_VECTOR_VALUETYPE,
514 }
515
517 return enum_seq_inclusive(MVT::FIRST_SCALABLE_VECTOR_VALUETYPE,
518 MVT::LAST_SCALABLE_VECTOR_VALUETYPE,
520 }
521
523 return enum_seq_inclusive(MVT::FIRST_INTEGER_FIXEDLEN_VECTOR_VALUETYPE,
524 MVT::LAST_INTEGER_FIXEDLEN_VECTOR_VALUETYPE,
526 }
527
529 return enum_seq_inclusive(MVT::FIRST_FP_FIXEDLEN_VECTOR_VALUETYPE,
530 MVT::LAST_FP_FIXEDLEN_VECTOR_VALUETYPE,
532 }
533
535 return enum_seq_inclusive(MVT::FIRST_INTEGER_SCALABLE_VECTOR_VALUETYPE,
536 MVT::LAST_INTEGER_SCALABLE_VECTOR_VALUETYPE,
538 }
539
541 return enum_seq_inclusive(MVT::FIRST_FP_SCALABLE_VECTOR_VALUETYPE,
542 MVT::LAST_FP_SCALABLE_VECTOR_VALUETYPE,
544 }
545 /// @}
546 };
547
548 inline raw_ostream &operator<<(raw_ostream &OS, const MVT &VT) {
549 VT.print(OS);
550 return OS;
551 }
552
553} // end namespace llvm
554
555#endif // LLVM_CODEGEN_MACHINEVALUETYPE_H
RelocType Type
Definition: COFFYAML.cpp:391
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
raw_pwrite_stream & OS
Provides some synthesis utilities to produce sequences of values.
Definition: Any.h:28
static constexpr ElementCount get(ScalarTy MinVal, bool Scalable)
Definition: TypeSize.h:297
Machine Value Type.
void dump() const
Support for debugging, callable in GDB: VT.dump()
Definition: ValueTypes.cpp:633
static MVT getFloatingPointVT(unsigned BitWidth)
bool isByteSized() const
Returns true if the number of bits for the type is a multiple of an 8-bit byte.
bool is128BitVector() const
Return true if this is a 128-bit vector type.
bool knownBitsGT(MVT VT) const
Return true if we know at compile time this has more bits than VT.
static auto integer_fixedlen_vector_valuetypes()
unsigned getVectorMinNumElements() const
Given a vector type, return the minimum number of elements it contains.
bool operator>(const MVT &S) const
SimpleValueType SimpleTy
bool isOverloaded() const
Return true if this is an overloaded type for TableGen.
bool isScalableTargetExtVT() const
Return true if this is a custom target type that has a scalable size.
uint64_t getScalarSizeInBits() const
MVT changeVectorElementType(MVT EltVT) const
Return a VT for a vector type whose attributes match ourselves with the exception of the element type...
bool operator<=(const MVT &S) const
@ INVALID_SIMPLE_VALUE_TYPE
constexpr MVT()=default
static MVT getVectorVT(MVT VT, ElementCount EC)
bool bitsLE(MVT VT) const
Return true if this has no more bits than VT.
unsigned getVectorNumElements() const
bool knownBitsLT(MVT VT) const
Return true if we know at compile time this has fewer bits than VT.
bool isVector() const
Return true if this is a vector value type.
bool isInteger() const
Return true if this is an integer or a vector integer type.
bool isScalableVector() const
Return true if this is a vector value type where the runtime length is machine dependent.
static MVT getScalableVectorVT(MVT VT, unsigned NumElements)
bool is16BitVector() const
Return true if this is a 16-bit vector type.
bool is32BitVector() const
Return true if this is a 32-bit vector type.
MVT changeTypeToInteger()
Return the type converted to an equivalently sized integer or vector with integer element type.
static MVT getVT(Type *Ty, bool HandleUnknown=false)
Return the value type corresponding to the specified type.
Definition: ValueTypes.cpp:573
bool isScalableVT() const
Return true if the type is a scalable type.
bool bitsLT(MVT VT) const
Return true if this has less bits than VT.
static auto all_valuetypes()
SimpleValueType Iteration.
bool operator<(const MVT &S) const
static MVT getVectorVT(MVT VT, unsigned NumElements, bool IsScalable)
bool is512BitVector() const
Return true if this is a 512-bit vector type.
bool operator==(const MVT &S) const
static auto integer_valuetypes()
bool is1024BitVector() const
Return true if this is a 1024-bit vector type.
TypeSize getSizeInBits() const
Returns the size of the specified MVT in bits.
bool isPow2VectorType() const
Returns true if the given vector is a power of 2.
uint64_t getScalarStoreSize() const
static auto scalable_vector_valuetypes()
static auto fixedlen_vector_valuetypes()
uint64_t getFixedSizeInBits() const
Return the size of the specified fixed width value type in bits.
bool bitsGT(MVT VT) const
Return true if this has more bits than VT.
bool isFixedLengthVector() const
static auto vector_valuetypes()
bool is256BitVector() const
Return true if this is a 256-bit vector type.
ElementCount getVectorElementCount() const
TypeSize getStoreSize() const
Return the number of bytes overwritten by a store of the specified value type.
bool bitsGE(MVT VT) const
Return true if this has no less bits than VT.
bool isScalarInteger() const
Return true if this is an integer, not including vectors.
TypeSize getStoreSizeInBits() const
Return the number of bits overwritten by a store of the specified value type.
static MVT getVectorVT(MVT VT, unsigned NumElements)
bool knownBitsGE(MVT VT) const
Return true if we know at compile time this has more than or the same bits as VT.
static auto fp_scalable_vector_valuetypes()
MVT getVectorElementType() const
bool isFloatingPoint() const
Return true if this is a FP or a vector FP type.
bool operator>=(const MVT &S) const
bool isValid() const
Return true if this is a valid simple valuetype.
static MVT getIntegerVT(unsigned BitWidth)
MVT getDoubleNumVectorElementsVT() const
static auto fp_valuetypes()
MVT getHalfNumVectorElementsVT() const
Return a VT for a vector type with the same element type but half the number of elements.
bool knownBitsLE(MVT VT) const
Return true if we know at compile time this has fewer than or the same bits as VT.
bool operator!=(const MVT &S) const
MVT getScalarType() const
If this is a vector, return the element type, otherwise return this.
static auto integer_scalable_vector_valuetypes()
void print(raw_ostream &OS) const
Implement operator<<.
Definition: ValueTypes.cpp:639
bool is64BitVector() const
Return true if this is a 64-bit vector type.
MVT changeVectorElementTypeToInteger() const
Return a vector with the same number of elements as this vector, but with the element type converted ...
MVT getPow2VectorType() const
Widens the length of the given vector MVT up to the nearest power of 2 and returns that type.
static auto fp_fixedlen_vector_valuetypes()
constexpr MVT(SimpleValueType SVT)
bool is2048BitVector() const
Return true if this is a 2048-bit vector type.
Root of the metadata hierarchy.
Definition: Metadata.h:61
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
constexpr bool isKnownMultipleOf(ScalarTy RHS) const
This function tells the caller whether the element count is known at compile time to be a multiple of...
Definition: TypeSize.h:175
constexpr ScalarTy getFixedValue() const
Definition: TypeSize.h:182
static constexpr bool isKnownLE(const FixedOrScalableQuantity &LHS, const FixedOrScalableQuantity &RHS)
Definition: TypeSize.h:212
static constexpr bool isKnownLT(const FixedOrScalableQuantity &LHS, const FixedOrScalableQuantity &RHS)
Definition: TypeSize.h:198
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
static constexpr bool isKnownGT(const FixedOrScalableQuantity &LHS, const FixedOrScalableQuantity &RHS)
Definition: TypeSize.h:205
static constexpr bool isKnownGE(const FixedOrScalableQuantity &LHS, const FixedOrScalableQuantity &RHS)
Definition: TypeSize.h:219
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
unsigned Log2_32_Ceil(uint32_t Value)
Return the ceil log base 2 of the specified value, 32 if the value is zero.
Definition: MathExtras.h:395
auto enum_seq_inclusive(EnumT Begin, EnumT End)
Iterate over an enum type from Begin to End inclusive.
Definition: Sequence.h:354
constexpr force_iteration_on_noniterable_enum_t force_iteration_on_noniterable_enum
Definition: Sequence.h:108
void reportInvalidSizeRequest(const char *Msg)
Reports a diagnostic message to indicate an invalid size request has been done on a scalable vector.
Definition: TypeSize.cpp:38
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
Definition: APFixedPoint.h:292
constexpr unsigned BitWidth
Definition: BitmaskEnum.h:184