Types
ArrayType
GCCJIT array type
Syntax:
!gccjit.array<
mlir::Type, # elementType
unsigned # size
>
The !gccjit.array
type represents an array type. It consists of a single
element type and a constant length.
Parameters:
Parameter | C++ type | Description |
---|---|---|
elementType | mlir::Type |
|
size | unsigned |
ComplexType
Complex type
GCCJIT type that represents complex types
Parameters:
Parameter | C++ type | Description |
---|---|---|
kind | ::gcc_jit_types |
FloatType
Floating point type
GCCJIT type that represents floating point types
Parameters:
Parameter | C++ type | Description |
---|---|---|
kind | ::gcc_jit_types |
FuncType
GCCJIT function type
Syntax:
!gccjit.func<
::llvm::ArrayRef<Type>, # inputs
Type, # returnType
bool # varArg
>
The !gccjit.func
is a function type. It consists of a single return type,
a list of parameter types and can optionally be variadic.
Parameters:
Parameter | C++ type | Description |
---|---|---|
inputs | ::llvm::ArrayRef<Type> |
|
returnType | Type |
|
varArg | bool |
IntType
Integer type
GCCJIT type that represents integer types with arbitrary precision:
- GCCJIT type can be either explicitly sized or not.
- GCCJIT type can be either signed or unsigned.
Parameters:
Parameter | C++ type | Description |
---|---|---|
kind | ::gcc_jit_types |
LValueType
LValue type
Syntax:
!gccjit.lvalue<
mlir::Type # innerType
>
gccjit.lvalue
represents a lvalue in the meaning of C. It behaves
like a reference to a mutable memory location. Lvalues are addressable,
so one can get a pointer from them. Lvalue’s subfield can be projected as
a new lvalue, while rvalue’s subfield can be projected as a new rvalue.
There are generally three ways to obtain an lvalue:
- create a local lvalue with respect to current function
- create a global lvalue with respect to current module
- function parameters in gimple are also lvalues
See also gccjit::lvalue
.
Parameters:
Parameter | C++ type | Description |
---|---|---|
innerType | mlir::Type |
PointerType
GCCJIT pointer type
Syntax:
!gccjit.ptr<
mlir::Type # elementType
>
The !gccjit.ptr
type represents a pointer type. It consists of a single
element type.
Parameters:
Parameter | C++ type | Description |
---|---|---|
elementType | mlir::Type |
QualifiedType
GCCJIT qualified type
GCCJIT type can be qualified with const
, restrict
, volatile
.
Parameters:
Parameter | C++ type | Description |
---|---|---|
elementType | mlir::Type |
|
isConst | bool |
|
isRestrict | bool |
|
isVolatile | bool |
StructType
GCCJIT struct type
Syntax:
!gccjit.struct<
mlir::StringAttr, # name
mlir::ArrayAttr, # fields
std::optional<mlir::gccjit::SourceLocAttr> # loc
>
The !gccjit.struct
type represents a GCCJIT struct type.
Parameters:
Parameter | C++ type | Description |
---|---|---|
name | mlir::StringAttr |
|
fields | mlir::ArrayAttr |
|
loc | std::optional<mlir::gccjit::SourceLocAttr> |
UnionType
GCCJIT union type
Syntax:
!gccjit.union<
mlir::StringAttr, # name
mlir::ArrayAttr, # fields
std::optional<mlir::gccjit::SourceLocAttr> # loc
>
The !gccjit.union
type represents a GCCJIT union type.
Parameters:
Parameter | C++ type | Description |
---|---|---|
name | mlir::StringAttr |
|
fields | mlir::ArrayAttr |
|
loc | std::optional<mlir::gccjit::SourceLocAttr> |
VectorType
GCCJIT vector type
Syntax:
!gccjit.vector<
mlir::Type, # elementType
unsigned # numUnits
>
The !gccjit.vector
type represents a vector type. It consists of a single
element type and a constant length.
Parameters:
Parameter | C++ type | Description |
---|---|---|
elementType | mlir::Type |
|
numUnits | unsigned |
VoidType
GCCJIT void type
Syntax: !gccjit.void
The !gccjit.void
type represents the C/C++ void
type.