LLVM: lib/SandboxIR/Type.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
11
13
15 return Ctx.getType(LLVMTy->getScalarType());
16}
17
20}
23}
26}
29}
32}
35}
38}
39
40#ifndef NDEBUG
43 dumpOS(dbgs());
44 dbgs() << "\n";
45}
46#endif
47
49 return cast(
51}
52
54 return cast(ElementType->getContext().getType(
56}
57
59 bool IsPacked) {
61 LLVMElements.reserve(Elements.size());
62 for (Type *Elm : Elements)
63 LLVMElements.push_back(Elm->LLVMTy);
64 return cast(
66}
67
69 return cast(ElementType->getContext().getType(
71}
72
75}
79}
81 return cast(
83 castllvm::VectorType(VTy->LLVMTy))));
84}
86 return cast(
88 castllvm::VectorType(VTy->LLVMTy))));
89}
91 int NumSubdivs) {
92 return cast(
94 castllvm::VectorType(VTy->LLVMTy), NumSubdivs)));
95}
97 return cast(
99 castllvm::VectorType(VTy->LLVMTy))));
100}
102 return cast(
104 castllvm::VectorType(VTy->LLVMTy))));
105}
108}
109
111 return cast(ElementType->getContext().getType(
113}
114
116 unsigned NumElts) {
117 return cast(ElementType->getContext().getType(
119}
120
122 return cast(
124}
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
static ArrayType * get(Type *ElementType, uint64_t NumElements)
This static method is the primary way to construct an ArrayType.
Class to represent fixed width SIMD vectors.
static FixedVectorType * get(Type *ElementType, unsigned NumElts)
Class to represent integer types.
static IntegerType * get(LLVMContext &C, unsigned NumBits)
This static method is the primary way of constructing an IntegerType.
static 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.
static ScalableVectorType * get(Type *ElementType, unsigned MinNumElts)
void reserve(size_type N)
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
static StructType * get(LLVMContext &Context, ArrayRef< Type * > Elements, bool isPacked=false)
This static method is the primary way to create a literal StructType.
The instances of the Type class are immutable: once they are created, they are never changed.
static Type * getDoubleTy(LLVMContext &C)
static IntegerType * getInt1Ty(LLVMContext &C)
static IntegerType * getInt16Ty(LLVMContext &C)
static IntegerType * getInt8Ty(LLVMContext &C)
static IntegerType * getInt32Ty(LLVMContext &C)
static IntegerType * getInt64Ty(LLVMContext &C)
static Type * getFloatTy(LLVMContext &C)
Type * getScalarType() const
If this is a vector type, return the element type, otherwise return 'this'.
static VectorType * getHalfElementsVectorType(VectorType *VTy)
This static method returns a VectorType with half as many elements as the input type and the same ele...
static VectorType * getExtendedElementVectorType(VectorType *VTy)
This static method is like getInteger except that the element types are twice as wide as the elements...
static VectorType * getSubdividedVectorType(VectorType *VTy, int NumSubdivs)
static VectorType * getInteger(VectorType *VTy)
This static method gets a VectorType with the same number of elements as the input type,...
static VectorType * get(Type *ElementType, ElementCount EC)
This static method is the primary way to construct an VectorType.
static VectorType * getTruncatedElementVectorType(VectorType *VTy)
static bool isValidElementType(Type *ElemTy)
Return true if the specified type is valid as a element type.
static VectorType * getDoubleElementsVectorType(VectorType *VTy)
This static method returns a VectorType with twice as many elements as the input type and the same el...
Type * getElementType() const
This class implements an extremely fast bulk output stream that can only output to a stream.
Type * getType(llvm::Type *LLVMTy)
Just like llvm::Type these are immutable, unique, never get freed and can only be created via static ...
void dumpOS(raw_ostream &OS)
Context & getContext() const
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.