LLVM: include/llvm/IR/DerivedTypes.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17#ifndef LLVM_IR_DERIVEDTYPES_H
18#define LLVM_IR_DERIVEDTYPES_H
19
27#include
28#include
29
30namespace llvm {
31
35template class Expected;
37
38
39
40
41
44
45protected:
49
50public:
51
52 enum {
53 MIN_INT_BITS = 1,
54 MAX_INT_BITS = (1<<23)
55
56
57
58
59 };
60
61
62
63
64
65
67
68
72
73
75
76
77
81
82
83
87
88
89
90
92
93
97};
98
102
103
104
105class FunctionType : public Type {
107
108public:
110 FunctionType &operator=(const FunctionType &) = delete;
111
112
115
116
118
119
121
122
124
127
129
135
136
141
142
143
145
146
150};
151static_assert(alignof(FunctionType) >= alignof(Type *),
152 "Alignment sufficient for objects appended to FunctionType");
153
157
161
165
166
167
168
169
171public:
172
173
174 template <typename T, typename U = decltype(&T::getFunctionType)>
177
179 : FnTy(FnTy), Callee(Callee) {
180 assert((FnTy == nullptr) == (Callee == nullptr));
181 }
182
184
186
188
190
191 explicit operator bool() { return Callee; }
192
193private:
195 Value *Callee = nullptr;
196};
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218class StructType : public Type {
220
221 enum {
222
223 SCDB_HasBody = 1,
224 SCDB_Packed = 2,
225 SCDB_IsLiteral = 4,
226 SCDB_IsSized = 8,
227 SCDB_ContainsScalableVector = 16,
228 SCDB_NotContainsScalableVector = 32,
229 SCDB_ContainsNonGlobalTargetExtType = 64,
230 SCDB_NotContainsNonGlobalTargetExtType = 128,
231 SCDB_ContainsNonLocalTargetExtType = 64,
232 SCDB_NotContainsNonLocalTargetExtType = 128,
233 };
234
235
236
237
238
239 void *SymbolTableEntry = nullptr;
240
241public:
243 StructType &operator=(const StructType &) = delete;
244
245
248
257 template <class... Tys>
258 static std::enable_if_t<are_base_of<Type, Tys...>::value, StructType *>
260 assert(elt1 && "Cannot create a struct type with no elements with this");
262 }
263
264
267
268
270
271
272
273
274 template <class... Tys>
277 assert(elt1 && "Cannot create a struct type with no elements with this");
280 }
281
282
283
285
287
288
289
291
292
293
295
296
298
299
302
303
304
308
309
310
314
315
316
317
318
319
320
322
323
324
326
327
328 bool hasName() const { return SymbolTableEntry != nullptr; }
329
330
331
332
334
335
336
338
339
340
342
343
344
347
348
349
351
352
354
355
357
363
364
366
367
373
378
379
383};
384
388
392
396
397
398class ArrayType : public Type {
399
400 Type *ContainedType;
401
403
405
406public:
408 ArrayType &operator=(const ArrayType &) = delete;
409
412
413
415
416
418
419
423};
424
428
429
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445 Type *ContainedType;
446
447protected:
448
449
450
451
452
453
454
456
458
459public:
462
464
465
467
469 bool Scalable) {
472 }
473
477
478
479
480
482 unsigned EltBits =
484 assert(EltBits && "Element size must be of a non-zero size");
487 }
488
489
490
496
497
498
499
506 break;
509 break;
510 default:
511 llvm_unreachable("Cannot create narrower fp vector element type");
512 }
513 } else {
514 unsigned EltBits =
516 assert((EltBits & 1) == 0 &&
517 "Cannot truncate vector element with odd bit-width");
519 }
521 }
522
523
524
525
527 for (int i = 0; i < NumSubdivs; ++i) {
530 }
531 return VTy;
532 }
533
534
535
538 assert(EltCnt.isKnownEven() &&
539 "Cannot halve vector with odd number of elements.");
541 EltCnt.divideCoefficientBy(2));
542 }
543
545 unsigned Denominator) {
547 assert(EltCnt.isKnownMultipleOf(Denominator) &&
548 "Cannot take one-nth of a vector");
550 EltCnt.divideCoefficientBy(Denominator));
551 }
552
553
554
557 assert((EltCnt.getKnownMinValue() * 2ull) <= UINT_MAX &&
558 "Too many elements in vector");
560 }
561
562
563
564
567 return SizeTy;
568
571 return nullptr;
572
577 }
578
579
581
582
583
585
586
591};
592
593
595protected:
598
599public:
601
605
609
613
618
620 int NumSubdivs) {
623 }
624
628
632
636
638};
639
640
642protected:
645
646public:
648 unsigned MinNumElts);
649
654
658
664
670
672 int NumSubdivs) {
675 }
676
681
687
688
689
691
695};
696
700
701
702class PointerType : public Type {
703 explicit PointerType(LLVMContext &C, unsigned AddrSpace);
704
705public:
707 PointerType &operator=(const PointerType &) = delete;
708
709
710
711 [[deprecated("PointerType::get with pointee type is pending removal. Use "
712 "Context overload.")]]
714
715
717
718
719
720 [[deprecated("PointerType::getUnqual with pointee type is pending removal. "
721 "Use Context overload.")]]
723 assert(ElementType && "Can't get a pointer to type!");
725 "Invalid type for pointer element!");
727 }
728
729
730
734
735
737
738
740
741
743
744
748};
749
753 "Original type expected to be a vector of integers or a scalar integer.");
758}
759
765
769 "Original type expected to be a vector of integers or a scalar integer.");
771}
772
776
777
778
779
780
781
782
783class TargetExtType : public Type {
786
787
789 unsigned *IntParams;
790
791public:
793 TargetExtType &operator=(const TargetExtType &) = delete;
794
795
796
800
801
802
803
804 LLVM_ABI static Expected<TargetExtType *>
806 ArrayRef Ints = {});
807
808
809
810
811 LLVM_ABI static Expected<TargetExtType *> checkParams(TargetExtType *TTy);
812
813
814
815
817
818
819
823
829
832
833
834
838
841
843
845
847
848
850
852
853
855 };
856
857
859
860
861
862
863
865
866
868};
869
873
874}
875
876#endif
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
Class for arbitrary precision integers.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
static LLVM_ABI ArrayType * get(Type *ElementType, uint64_t NumElements)
This static method is the primary way to construct an ArrayType.
uint64_t getNumElements() const
Definition DerivedTypes.h:410
static LLVM_ABI bool isValidElementType(Type *ElemTy)
Return true if the specified type is valid as a element type.
ArrayType & operator=(const ArrayType &)=delete
ArrayType(const ArrayType &)=delete
static bool classof(const Type *T)
Methods for support type inquiry through isa, cast, and dyn_cast.
Definition DerivedTypes.h:420
Type * getElementType() const
Definition DerivedTypes.h:411
static constexpr ElementCount get(ScalarTy MinVal, bool Scalable)
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
Class to represent fixed width SIMD vectors.
Definition DerivedTypes.h:594
unsigned getNumElements() const
Definition DerivedTypes.h:637
static FixedVectorType * getDoubleElementsVectorType(FixedVectorType *VTy)
Definition DerivedTypes.h:629
static FixedVectorType * getInteger(FixedVectorType *VTy)
Definition DerivedTypes.h:606
static FixedVectorType * getSubdividedVectorType(FixedVectorType *VTy, int NumSubdivs)
Definition DerivedTypes.h:619
static FixedVectorType * getExtendedElementVectorType(FixedVectorType *VTy)
Definition DerivedTypes.h:610
FixedVectorType(Type *ElTy, unsigned NumElts)
Definition DerivedTypes.h:596
static FixedVectorType * get(Type *ElementType, const FixedVectorType *FVTy)
Definition DerivedTypes.h:602
static FixedVectorType * getTruncatedElementVectorType(FixedVectorType *VTy)
Definition DerivedTypes.h:614
static bool classof(const Type *T)
Definition DerivedTypes.h:633
static LLVM_ABI FixedVectorType * get(Type *ElementType, unsigned NumElts)
static FixedVectorType * getHalfElementsVectorType(FixedVectorType *VTy)
Definition DerivedTypes.h:625
FunctionCallee(T *Fn)
Definition DerivedTypes.h:175
FunctionCallee(std::nullptr_t)
Definition DerivedTypes.h:183
FunctionType * getFunctionType()
Definition DerivedTypes.h:187
Value * getCallee()
Definition DerivedTypes.h:189
FunctionCallee(FunctionType *FnTy, Value *Callee)
Definition DerivedTypes.h:178
Class to represent function types.
Definition DerivedTypes.h:105
param_iterator param_begin() const
Definition DerivedTypes.h:130
static LLVM_ABI bool isValidArgumentType(Type *ArgTy)
Return true if the specified type is valid as an argument type.
unsigned getNumParams() const
Return the number of fixed parameters this function type requires.
Definition DerivedTypes.h:144
Type::subtype_iterator param_iterator
Definition DerivedTypes.h:128
Type * getParamType(unsigned i) const
Parameter type accessors.
Definition DerivedTypes.h:137
static LLVM_ABI bool isValidReturnType(Type *RetTy)
Return true if the specified type is valid as a return type.
FunctionType(const FunctionType &)=delete
ArrayRef< Type * > params() const
Definition DerivedTypes.h:132
FunctionType & operator=(const FunctionType &)=delete
bool isVarArg() const
Definition DerivedTypes.h:125
static bool classof(const Type *T)
Methods for support type inquiry through isa, cast, and dyn_cast.
Definition DerivedTypes.h:147
Type * getReturnType() const
Definition DerivedTypes.h:126
static LLVM_ABI FunctionType * get(Type *Result, ArrayRef< Type * > Params, bool isVarArg)
This static method is the primary way of constructing a FunctionType.
param_iterator param_end() const
Definition DerivedTypes.h:131
Class to represent integer types.
Definition DerivedTypes.h:42
static LLVM_ABI IntegerType * get(LLVMContext &C, unsigned NumBits)
This static method is the primary way of constructing an IntegerType.
uint64_t getSignBit() const
Return a uint64_t with just the most significant bit set (the sign bit, if the value is treated as a ...
Definition DerivedTypes.h:84
LLVM_ABI APInt getMask() const
For example, this is 0xFF for an 8 bit integer, 0xFFFF for i16, etc.
IntegerType * getExtendedType() const
Returns type twice as wide the input type.
Definition DerivedTypes.h:69
@ MIN_INT_BITS
Minimum number of bits that can be specified.
Definition DerivedTypes.h:53
@ MAX_INT_BITS
Maximum number of bits that can be specified.
Definition DerivedTypes.h:54
unsigned getBitWidth() const
Get the number of bits in this IntegerType.
Definition DerivedTypes.h:74
uint64_t getBitMask() const
Return a bitmask with ones set for all of the bits that can be set by an unsigned version of this typ...
Definition DerivedTypes.h:78
friend class LLVMContextImpl
Definition DerivedTypes.h:43
static bool classof(const Type *T)
Methods for support type inquiry through isa, cast, and dyn_cast.
Definition DerivedTypes.h:94
IntegerType(LLVMContext &C, unsigned NumBits)
Definition DerivedTypes.h:46
This is an important class for using LLVM in a threaded context.
static LLVM_ABI bool isLoadableOrStorableType(Type *ElemTy)
Return true if we can load or store from a pointer to this type.
PointerType(const PointerType &)=delete
static PointerType * getUnqual(LLVMContext &C)
This constructs an opaque pointer to an object in the default address space (address space zero).
Definition DerivedTypes.h:731
static bool classof(const Type *T)
Implement support type inquiry through isa, cast, and dyn_cast.
Definition DerivedTypes.h:745
static LLVM_ABI bool isValidElementType(Type *ElemTy)
Return true if the specified type is valid as a element type.
PointerType & operator=(const PointerType &)=delete
static PointerType * getUnqual(Type *ElementType)
This constructs a pointer to an object of the specified type in the default address space (address sp...
Definition DerivedTypes.h:722
unsigned getAddressSpace() const
Return the address space of the Pointer type.
Definition DerivedTypes.h:742
static LLVM_ABI PointerType * get(Type *ElementType, unsigned AddressSpace)
This constructs a pointer to an object of the specified type in a numbered address space.
Class to represent scalable SIMD vectors.
Definition DerivedTypes.h:641
static ScalableVectorType * get(Type *ElementType, const ScalableVectorType *SVTy)
Definition DerivedTypes.h:650
static ScalableVectorType * getInteger(ScalableVectorType *VTy)
Definition DerivedTypes.h:655
static LLVM_ABI ScalableVectorType * get(Type *ElementType, unsigned MinNumElts)
static bool classof(const Type *T)
Definition DerivedTypes.h:692
static ScalableVectorType * getExtendedElementVectorType(ScalableVectorType *VTy)
Definition DerivedTypes.h:660
static ScalableVectorType * getHalfElementsVectorType(ScalableVectorType *VTy)
Definition DerivedTypes.h:678
static ScalableVectorType * getSubdividedVectorType(ScalableVectorType *VTy, int NumSubdivs)
Definition DerivedTypes.h:671
static ScalableVectorType * getDoubleElementsVectorType(ScalableVectorType *VTy)
Definition DerivedTypes.h:683
unsigned getMinNumElements() const
Get the minimum number of elements in this vector.
Definition DerivedTypes.h:690
ScalableVectorType(Type *ElTy, unsigned MinNumElts)
Definition DerivedTypes.h:643
static ScalableVectorType * getTruncatedElementVectorType(ScalableVectorType *VTy)
Definition DerivedTypes.h:666
A templated base class for SmallPtrSet which provides the typesafe interface that is common across al...
StringRef - Represent a constant reference to a string, i.e.
Class to represent struct types.
Definition DerivedTypes.h:218
static bool classof(const Type *T)
Methods for support type inquiry through isa, cast, and dyn_cast.
Definition DerivedTypes.h:380
static std::enable_if_t< are_base_of< Type, Tys... >::value, StructType * > create(StringRef Name, Type *elt1, Tys *... elts)
Definition DerivedTypes.h:259
LLVM_ABI bool indexValid(const Value *V) const
static LLVM_ABI StructType * get(LLVMContext &Context, ArrayRef< Type * > Elements, bool isPacked=false)
This static method is the primary way to create a literal StructType.
element_iterator element_end() const
Definition DerivedTypes.h:359
StructType(const StructType &)=delete
ArrayRef< Type * > elements() const
Definition DerivedTypes.h:360
LLVM_ABI void setBody(ArrayRef< Type * > Elements, bool isPacked=false)
Specify a body for an opaque identified type, which must not make the type recursive.
LLVM_ABI bool containsHomogeneousScalableVectorTypes() const
Returns true if this struct contains homogeneous scalable vector types.
LLVM_ABI Error checkBody(ArrayRef< Type * > Elements)
Return an error if the body for an opaque identified type would make it recursive.
LLVM_ABI bool containsHomogeneousTypes() const
Return true if this struct is non-empty and all element types are the same.
element_iterator element_begin() const
Definition DerivedTypes.h:358
static LLVM_ABI StructType * getTypeByName(LLVMContext &C, StringRef Name)
Return the type with the specified name, or null if there is none by that name.
static LLVM_ABI StructType * create(LLVMContext &Context, StringRef Name)
This creates an identified struct.
bool isPacked() const
Definition DerivedTypes.h:286
static LLVM_ABI bool isValidElementType(Type *ElemTy)
Return true if the specified type is valid as a element type.
unsigned getNumElements() const
Random access to the elements.
Definition DerivedTypes.h:368
LLVM_ABI bool isSized(SmallPtrSetImpl< Type * > *Visited=nullptr) const
isSized - Return true if this is a sized type.
Type * getTypeAtIndex(unsigned N) const
Definition DerivedTypes.h:375
StructType & operator=(const StructType &)=delete
LLVM_ABI void setName(StringRef Name)
Change the name of this type to the specified name, or to a name with a suffix if there is a collisio...
LLVM_ABI bool isLayoutIdentical(StructType *Other) const
Return true if this is layout identical to the specified struct.
LLVM_ABI bool isScalableTy() const
LLVM_ABI Error setBodyOrError(ArrayRef< Type * > Elements, bool isPacked=false)
Specify a body for an opaque identified type or return an error if it would make the type recursive.
LLVM_ABI Type * getTypeAtIndex(const Value *V) const
Given an index value into the type, return the type of the element.
bool hasName() const
Return true if this is a named struct that has a non-empty name.
Definition DerivedTypes.h:328
bool isLiteral() const
Return true if this type is uniqued by structural equivalence, false if it is a struct definition.
Definition DerivedTypes.h:290
bool indexValid(unsigned Idx) const
Definition DerivedTypes.h:377
LLVM_ABI bool containsNonLocalTargetExtType() const
LLVM_ABI bool containsNonGlobalTargetExtType() const
bool isOpaque() const
Return true if this is a type with an identity that has no body specified yet.
Definition DerivedTypes.h:294
Type * getElementType(unsigned N) const
Definition DerivedTypes.h:369
Type::subtype_iterator element_iterator
Definition DerivedTypes.h:356
static std::enable_if_t< are_base_of< Type, Tys... >::value, StructType * > get(Type *elt1, Tys *... elts)
This static method is a convenience method for creating structure types by specifying the elements as...
Definition DerivedTypes.h:276
LLVM_ABI StringRef getName() const
Return the name for this struct type if it has an identity.
ArrayRef< Type * > type_params() const
Return the type parameters for this particular target extension type.
Definition DerivedTypes.h:820
unsigned getNumIntParameters() const
Definition DerivedTypes.h:840
type_param_iterator type_param_end() const
Definition DerivedTypes.h:826
Type::subtype_iterator type_param_iterator
Definition DerivedTypes.h:824
static LLVM_ABI TargetExtType * get(LLVMContext &Context, StringRef Name, ArrayRef< Type * > Types={}, ArrayRef< unsigned > Ints={})
Return a target extension type having the specified name and optional type and integer parameters.
Type * getTypeParameter(unsigned i) const
Definition DerivedTypes.h:830
unsigned getNumTypeParameters() const
Definition DerivedTypes.h:831
ArrayRef< unsigned > int_params() const
Return the integer parameters for this particular target extension type.
Definition DerivedTypes.h:835
type_param_iterator type_param_begin() const
Definition DerivedTypes.h:825
static LLVM_ABI Expected< TargetExtType * > checkParams(TargetExtType *TTy)
Check that a newly created target extension type has the expected number of type parameters and integ...
unsigned getIntParameter(unsigned i) const
Definition DerivedTypes.h:839
TargetExtType(const TargetExtType &)=delete
LLVM_ABI bool hasProperty(Property Prop) const
Returns true if the target extension type contains the given property.
TargetExtType & operator=(const TargetExtType &)=delete
Property
Definition DerivedTypes.h:842
@ IsTokenLike
In particular, it cannot be used in select and phi instructions.
Definition DerivedTypes.h:854
@ HasZeroInit
zeroinitializer is valid for this target extension type.
Definition DerivedTypes.h:844
@ CanBeVectorElement
This type may be used as an element in a vector.
Definition DerivedTypes.h:851
@ CanBeGlobal
This type may be used as the value type of a global variable.
Definition DerivedTypes.h:846
@ CanBeLocal
This type may be allocated on the stack, either as the allocated type of an alloca instruction or as ...
Definition DerivedTypes.h:849
StringRef getName() const
Return the name for this target extension type.
Definition DerivedTypes.h:816
static LLVM_ABI Expected< TargetExtType * > getOrError(LLVMContext &Context, StringRef Name, ArrayRef< Type * > Types={}, ArrayRef< unsigned > Ints={})
Return a target extension type having the specified name and optional type and integer parameters,...
LLVM_ABI Type * getLayoutType() const
Returns an underlying layout type for the target extension type.
static bool classof(const Type *T)
Methods for support type inquiry through isa, cast, and dyn_cast.
Definition DerivedTypes.h:867
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM_ABI unsigned getIntegerBitWidth() const
Definition DerivedTypes.h:99
LLVM_ABI Type * getStructElementType(unsigned N) const
Definition DerivedTypes.h:393
LLVM_ABI bool containsNonGlobalTargetExtType(SmallPtrSetImpl< const Type * > &Visited) const
Return true if this type is or contains a target extension type that disallows being used as a global...
LLVM_ABI bool containsNonLocalTargetExtType(SmallPtrSetImpl< const Type * > &Visited) const
Return true if this type is or contains a target extension type that disallows being used as a local.
LLVM_ABI bool isScalableTy(SmallPtrSetImpl< const Type * > &Visited) const
Return true if this is a type whose size is a known multiple of vscale.
bool isIntOrIntVectorTy() const
Return true if this is an integer type or a vector of integer types.
LLVM_ABI StringRef getStructName() const
Definition DerivedTypes.h:385
Type *const * subtype_iterator
LLVM_ABI unsigned getStructNumElements() const
Definition DerivedTypes.h:389
LLVM_ABI unsigned getPointerAddressSpace() const
Get the address space of this pointer or pointer vector type.
Definition DerivedTypes.h:773
LLVM_ABI uint64_t getArrayNumElements() const
Definition DerivedTypes.h:425
TypeID
Definitions of all of the base types for the Type system.
@ TargetExtTyID
Target extension type.
@ ScalableVectorTyID
Scalable SIMD vector type.
@ FloatTyID
32-bit floating point type
@ IntegerTyID
Arbitrary bit width integers.
@ FixedVectorTyID
Fixed width SIMD vector type.
@ DoubleTyID
64-bit floating point type
unsigned getNumContainedTypes() const
Return the number of types in the derived type.
unsigned NumContainedTys
Keeps track of how many Type*'s there are in the ContainedTys list.
LLVM_ABI StringRef getTargetExtName() const
Definition DerivedTypes.h:870
Type * getScalarType() const
If this is a vector type, return the element type, otherwise return 'this'.
Type(LLVMContext &C, TypeID tid)
LLVM_ABI TypeSize getPrimitiveSizeInBits() const LLVM_READONLY
Return the basic size of this type if it is a primitive type.
LLVM_ABI Type * getWithNewBitWidth(unsigned NewBitWidth) const
Given an integer or vector type, change the lane bitwidth to NewBitwidth, whilst keeping the old numb...
Definition DerivedTypes.h:766
LLVM_ABI Type * getWithNewType(Type *EltTy) const
Given vector type, change the element type, whilst keeping the old number of elements.
Definition DerivedTypes.h:760
LLVMContext & getContext() const
Return the LLVMContext in which this type was uniqued.
Type *const * ContainedTys
A pointer to the array of Types contained by this Type.
unsigned getSubclassData() const
LLVM_ABI bool isFunctionVarArg() const
Definition DerivedTypes.h:154
LLVM_ABI unsigned getScalarSizeInBits() const LLVM_READONLY
If this is a vector type, return the getPrimitiveSizeInBits value for the element type.
void setSubclassData(unsigned val)
bool isFloatingPointTy() const
Return true if this is one of the floating-point types.
LLVM_ABI Type * getExtendedType() const
Given scalar/vector integer type, returns a type with elements twice as wide as in the original type.
Definition DerivedTypes.h:750
TypeID getTypeID() const
Return the type id for the type.
LLVM_ABI Type * getFunctionParamType(unsigned i) const
Definition DerivedTypes.h:158
static LLVM_ABI IntegerType * getIntNTy(LLVMContext &C, unsigned N)
Type * getContainedType(unsigned i) const
This method is used to implement the type iterator (defined at the end of the file).
static LLVM_ABI Type * getFloatTy(LLVMContext &C)
static LLVM_ABI Type * getHalfTy(LLVMContext &C)
LLVM_ABI unsigned getFunctionNumParams() const
Definition DerivedTypes.h:162
LLVM Value Representation.
Base class of all SIMD vector types.
Definition DerivedTypes.h:430
static VectorType * getHalfElementsVectorType(VectorType *VTy)
This static method returns a VectorType with half as many elements as the input type and the same ele...
Definition DerivedTypes.h:536
LLVM_ABI VectorType(Type *ElType, unsigned EQ, Type::TypeID TID)
static VectorType * getExtendedElementVectorType(VectorType *VTy)
This static method is like getInteger except that the element types are twice as wide as the elements...
Definition DerivedTypes.h:491
static bool classof(const Type *T)
Methods for support type inquiry through isa, cast, and dyn_cast.
Definition DerivedTypes.h:587
static VectorType * getOneNthElementsVectorType(VectorType *VTy, unsigned Denominator)
Definition DerivedTypes.h:544
ElementCount getElementCount() const
Return an ElementCount instance to represent the (possibly scalable) number of elements in the vector...
Definition DerivedTypes.h:697
static VectorType * getSubdividedVectorType(VectorType *VTy, int NumSubdivs)
Definition DerivedTypes.h:526
static VectorType * getInteger(VectorType *VTy)
This static method gets a VectorType with the same number of elements as the input type,...
Definition DerivedTypes.h:481
const unsigned ElementQuantity
The element quantity of this vector.
Definition DerivedTypes.h:455
static VectorType * get(Type *ElementType, const VectorType *Other)
Definition DerivedTypes.h:474
static VectorType * getTruncatedElementVectorType(VectorType *VTy)
Definition DerivedTypes.h:500
VectorType & operator=(const VectorType &)=delete
static LLVM_ABI VectorType * get(Type *ElementType, ElementCount EC)
This static method is the primary way to construct an VectorType.
static VectorType * getDoubleElementsVectorType(VectorType *VTy)
This static method returns a VectorType with twice as many elements as the input type and the same el...
Definition DerivedTypes.h:555
static VectorType * getWithSizeAndScalar(VectorType *SizeTy, Type *EltTy)
This static method attempts to construct a VectorType with the same size-in-bits as SizeTy but with a...
Definition DerivedTypes.h:565
static LLVM_ABI bool isValidElementType(Type *ElemTy)
Return true if the specified type is valid as a element type.
static VectorType * get(Type *ElementType, unsigned NumElements, bool Scalable)
Definition DerivedTypes.h:468
VectorType(const VectorType &)=delete
Type * getElementType() const
Definition DerivedTypes.h:463
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...
constexpr ScalarTy getFixedValue() const
constexpr LeafTy multiplyCoefficientBy(ScalarTy RHS) const
constexpr LeafTy divideCoefficientBy(ScalarTy RHS) const
We do not provide the '/' operator here because division for polynomial types does not work in the sa...
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) dyn_cast(const From &Val)
dyn_cast - Return the argument parameter cast to the specified type.
bool isa(const From &Val)
isa - Return true if the parameter to the template is an instance of one of the template type argu...
ArrayRef(const T &OneElt) -> ArrayRef< T >
decltype(auto) cast(const From &Val)
cast - Return the argument parameter cast to the specified type.
std::conjunction< std::is_base_of< T, Ts >... > are_base_of
traits class for checking whether type T is a base class for all the given types in the variadic list...