Class to represent integer types.
Synopsis
Declared in <llvm/IR/DerivedTypes.h>
class IntegerType
: public Type
Description
Note that this class is also used to represent the built‐in integer types: Int1Ty, Int8Ty, Int16Ty, Int32Ty and Int64Ty.
Base Classes
Name |
Description |
The root of the LLVM type system hierarchy. |
Type Aliases
Name |
Description |
Iterator over this type's contained (subtype) types. |
|
Reverse iterator over contained (subtype) types. |
Enums
Name |
Description |
This enum is just used to hold constants we need for IntegerType. |
|
Identifiers for all base types in the LLVM type system. |
Member Functions
Name |
Description |
Return true if this type could be converted with a lossless BitCast to Ty. |
|
Return true if this type is or contains a target extension type that disallows being used as a global. |
|
Return true if this type is or contains a target extension type that disallows being used as a local. |
|
Dump this type to stderr for debugging. |
|
Return the element type of this array type. |
|
Return the number of elements in this array type. |
|
Return a bitmask with ones set for all of the bits that can be set by an unsigned version of this type. This is 0xFF for i8, 0xFFFF for i16, etc. |
|
Get the number of bits in this IntegerType. |
|
Return the bit width of this byte type (or of its scalar element). |
|
Return the type contained at index |
|
Return the LLVMContext in which this type was uniqued. |
|
Returns type twice as wide the input type. |
|
Return the width of the mantissa of this floating‐point type. |
|
Return the floating‐point semantics for this floating‐point type. |
|
Return the number of fixed parameters of this function type. |
|
Return the type of formal parameter |
|
Return the bit width of this integer type. |
|
For example, this is 0xFF for an 8 bit integer, 0xFFFF for i16, etc. |
|
Return the number of types in the derived type. |
|
Get the address space of this pointer or pointer vector type. |
|
Return the basic size of this type if it is a primitive type. |
|
If this is a vector type, return the getPrimitiveSizeInBits value for the element type. Otherwise return the getPrimitiveSizeInBits value for this type. |
|
If this is a vector type, return the element type, otherwise return 'this'. |
|
Return a uint64_t with just the most significant bit set (the sign bit, if the value is treated as a signed number). |
|
Return the type of element |
|
Return the name of this identified struct type. |
|
Return the number of elements in this struct type. |
|
Return the name of this target extension type. |
|
Returns type half as wide the input type. |
|
Return the type id for the type. This will return one of the TypeID enum elements defined above. |
|
Given an integer or vector type, change the lane bitwidth to NewBitwidth, whilst keeping the old number of lanes. |
|
Given vector type, change the element type, whilst keeping the old number of elements. For non‐vectors simply returns |
|
Return true if this is a 16‐bit float type. |
|
Return true if the type is an aggregate type. |
|
True if this is an instance of ArrayType. |
|
Return true if this is 'bfloat', a 16‐bit bfloat type. |
|
|
|
|
|
Return true if this is 'double', a 64‐bit IEEE fp type. |
|
Return true if this type is empty, that is, it has no elements or all of its elements are empty. |
|
Return true if this is 'fp128'. |
|
Return true if this is a FP type or a vector of FP. |
|
Return true if the type is "first class", meaning it is a valid type for a Value. |
|
Return true if this is 'float', a 32‐bit IEEE fp type. |
|
Return true if this is one of the floating‐point types. |
|
True if this is an instance of FunctionType. |
|
Return true if this function type is variadic. |
|
Return true if this is 'half', a 16‐bit IEEE fp type. |
|
Return true if this is a well‐behaved IEEE‐like type, which has a IEEE compatible layout, and does not have non‐IEEE values, such as x86_fp80's unnormal values. |
|
|
|
Return true if this is an integer type or a pointer type. |
|
|
|
Return true if this is 'label'. |
|
Return true if this is 'metadata'. |
|
Return true if this is a multi‐unit floating‐point type. |
|
Return true if this is powerpc long double. |
|
True if this is an instance of PointerType. |
|
Return true if this is a pointer type or a vector of pointer types. |
|
True if this is an instance of TargetExtType of RISC‐V vector tuple. |
|
Return true if this is a target extension type with a scalable layout. |
|
|
|
Return true if the type is a valid type for a register in codegen. This includes all first‐class types except struct and array types. |
|
Return true if it makes sense to take the size of this type. |
|
True if this is an instance of StructType. |
|
Return true if this is a target extension type. |
|
Returns true if this is 'token' or a token‐like target type.s |
|
Return true if this is 'token'. |
|
True if this is an instance of VectorType. |
|
Return true if this is 'void'. |
|
Return true if this is X86 AMX. |
|
Return true if this is x86 long double. |
|
Print the current type. |
|
Iterator to the first contained (subtype) type. |
|
Iterator past the last contained (subtype) type. |
|
Reverse iterator to the last contained (subtype) type. |
|
Reverse iterator past the first contained (subtype) type. |
|
Return an array view of this type's contained subtypes. |
Static Member Functions
Name |
Description |
Methods for support type inquiry through isa, cast, and dyn_cast. |
|
Get or create an IntegerType instance. |
|
Return the bfloat (16‐bit) floating‐point type. |
|
Return the 128‐bit byte type. |
|
Return the 16‐bit byte type for the given context. |
|
Return the 1‐bit byte type. |
|
Return the 32‐bit byte type for the given context. |
|
Return the 64‐bit byte type. |
|
Return the 8‐bit byte type. |
|
Returns a byte (vector of byte) type with the same size of an integer of the given integer (vector of integer) type. |
|
Return a byte type with bit width |
|
Return the IEEE double‐precision (64‐bit) floating‐point type. |
|
Return the 128‐bit IEEE floating‐point type (fp128). |
|
Return the IEEE single‐precision (32‐bit) floating‐point type. |
|
Return the floating‐point type matching semantics |
|
Return the IEEE half‐precision (16‐bit) floating‐point type. |
|
Return the 128‐bit integer type. |
|
Return the 16‐bit integer type. |
|
Return the 1‐bit integer type. |
|
Return the 32‐bit integer type. |
|
Return the 64‐bit integer type. |
|
Return the 8‐bit integer type. |
|
Returns an integer (vector of integer) type with the same size of a byte of the given byte (vector of byte) type. |
|
Return an integer type with bit width |
|
Return the label type. |
|
Return the metadata type used for metadata operands in the IR. |
|
Return the PowerPC double‐double (ppc_fp128) floating‐point type. |
|
Return a type based on an identifier. |
|
Return the LLVM scalar type corresponding to a C++ scalar type |
|
Return the token type. |
|
Return the void type. |
|
Return the WebAssembly externref target‐extension type. |
|
Return the WebAssembly funcref target‐extension type. |
|
Return the X86 AMX type for the given context. |
|
Return the x86 80‐bit extended‐precision floating‐point type. |
Protected Member Functions
Name |
Description |
|
Construct an integer type with bit width |
Return the subclass‐specific data packed into this type. |
|
Store subclass‐specific data into this type's SubclassData field. |
Protected Data Members
Name |
Description |
Pointer to the array of Types contained by this Type. |
|
Keeps track of how many Type*'s there are in the ContainedTys list. |
Friends
Name |
Description |
Private implementation details of |
Non-Member Functions
Name |
Description |
Compute the linearized index of a member in a nested aggregate. |
|
Compute the linearized index of a member in a nested aggregate/struct/array. |
|
Attempt to constant fold a getelementptr instruction with the specified operands. |
|
Returns true if |
|
Return |
|
Return a begin iterator over GEP indices from type |
|
Return an end iterator for GEP indices from operands |
|
Returns the types contained in |
|
Construct a low‐level type based on an LLVM type. |
|
Returns the distance between compatible pointers |
|
Returns the number of vector elements for a vectorized type. |
|
Returns true if |
|
Given operands for a GetElementPtrInst, fold the result or return null. |
|
Convert a vectorized type to its scalarized (non‐vector) form. |
|
Convert a scalar type to a vector type. |
|
Convert a scalar type to a fixed‐length vector type. |
|
Convert a scalar or struct type to its vectorized form. |
|
C API conversion helpers for |
|
Wrap an array of |
|
Returns true if this is a type legal for the 'nofpclass' attribute. This follows the same type rules as FPMathOperator. |
|
Return the mask of attributes incompatible with type |
|
Match a value of a specific type, capturing it if we match. |
|
Match any value of a specific type. |
|
Match a const value of a specific type, capturing it if we match. |
|
Match a value of a specific type. |
|
This function determines whether a value for the pointer LoadPtr can be extracted from the load at DepLI. |
|
This function determines whether a value for the pointer LoadPtr can be extracted from the memory intrinsic at DepMI. |
|
This function determines whether a value for the pointer LoadPtr can be extracted from the store at DepSI. |
|
Populate a small list of potentially interesting constants of a given type. |
|
Return a small list of potentially interesting constants of a given type. |
|
Converts a scalar or vector LLVM type to its DXIL element type. |
Created with MrDocs