CIR array type
Syntax:
!cir.array<
mlir::Type, # eltType
uint64_t # size
>
CIR.array
represents C/C++ constant arrays.
Parameter | C++ type | Description |
---|---|---|
eltType | mlir::Type | |
size | uint64_t |
CIR type that represents
Syntax: !cir.bf16
Floating-point type that represents the bfloat16 format.
CIR bool type
cir.bool
represent's C++ bool type.
CIR complex type
Syntax:
!cir.complex<
mlir::Type # elementTy
>
CIR type that represents a C complex number. cir.complex
models the C type T _Complex
.
The parameter elementTy
gives the type of the real and imaginary part of the complex number. elementTy
must be either a CIR integer type or a CIR floating-point type.
Parameter | C++ type | Description |
---|---|---|
elementTy | mlir::Type |
CIR type that represents pointer-to-data-member type in C++
Syntax:
!cir.data_member<
mlir::Type, # memberTy
cir::StructType # clsTy
>
cir.member_ptr
models the pointer-to-data-member type in C++. Values of this type are essentially offsets of the pointed-to member within one of its containing struct.
Parameter | C++ type | Description |
---|---|---|
memberTy | mlir::Type | |
clsTy | cir::StructType |
CIR double-precision float type
Syntax: !cir.double
Floating-point type that represents the double
type in C/C++. Its underlying floating-point format is the IEEE-754 binar64 format.
CIR exception info
Syntax: !cir.exception
In presence of an inflight exception, this type holds all specific information for an exception: the associated type id, and the exception object pointer. These are materialzed from this type through other specific operations.
CIR type that represents IEEE-754 binary16 format
Syntax: !cir.f16
Floating-point type that represents the IEEE-754 binary16 format.
CIR type that represents x87 80-bit floating-point format
Syntax: !cir.f80
Floating-point type that represents the x87 80-bit floating-point format.
CIR type that represents IEEEquad 128-bit floating-point format
Syntax: !cir.f128
Floating-point type that represents the IEEEquad 128-bit floating-point format.
CIR function type
Syntax:
!cir.func<
::llvm::ArrayRef<mlir::Type>, # inputs
mlir::Type, # returnType
bool # varArg
>
The !cir.func
is a function type. It consists of a single return type, a list of parameter types and can optionally be variadic.
Example:
!cir.func<!bool ()>
!cir.func<!s32i (!s8i, !s8i)>
!cir.func<!s32i (!s32i, ...)>
Parameter | C++ type | Description |
---|---|---|
inputs | ::llvm::ArrayRef<mlir::Type> | |
returnType | mlir::Type | |
varArg | bool |
Integer type with arbitrary precision up to a fixed limit
CIR type that represents integer types with arbitrary precision.
Those integer types that are directly available in C/C++ standard are called primitive integer types. Said types are: signed char
, short
, int
, long
, long long
, and their unsigned variations.
Parameter | C++ type | Description |
---|---|---|
width | unsigned | |
isSigned | bool |
CIR extended-precision float type
Syntax:
!cir.long_double<
mlir::Type # underlying
>
Floating-point type that represents the long double
type in C/C++.
The underlying floating-point format of a long double value depends on the implementation. The underlying
parameter specifies the CIR floating-point type that corresponds to this format. For now, it can only be either !cir.double
or !cir.fp80
.
Parameter | C++ type | Description |
---|---|---|
underlying | mlir::Type |
CIR type that represents C++ pointer-to-member-function type
Syntax:
!cir.method<
cir::FuncType, # memberFuncTy
cir::StructType # clsTy
>
cir.method
models the pointer-to-member-function type in C++. The layout of this type is ABI-dependent.
Parameter | C++ type | Description |
---|---|---|
memberFuncTy | cir::FuncType | |
clsTy | cir::StructType |
CIR pointer type
Syntax:
!cir.ptr<
mlir::Type, # pointee
mlir::Attribute # addrSpace
>
CIR.ptr
is a type returned by any op generating a pointer in C++.
Parameter | C++ type | Description |
---|---|---|
pointee | mlir::Type | |
addrSpace | mlir::Attribute |
CIR single-precision float type
Syntax: !cir.float
Floating-point type that represents the float
type in C/C++. Its underlying floating-point format is the IEEE-754 binary32 format.
CIR vector type
Syntax:
!cir.vector<
mlir::Type, # eltType
uint64_t # size
>
`cir.vector' represents fixed-size vector types. The parameters are the element type and the number of elements.
Parameter | C++ type | Description |
---|---|---|
eltType | mlir::Type | |
size | uint64_t |
CIR void type
Syntax: !cir.void
The !cir.void
type represents the C/C++ void
type.