Attributes
ByteArrayInitializerAttr
Byte array initializer
Syntax:
#gccjit.byte_array<
DenseI8ArrayAttr # initializer
>
Represents the byte array initializer.
Parameters:
| Parameter | C++ type | Description |
|---|---|---|
| initializer | DenseI8ArrayAttr |
FieldAttr
A field within a struct or a union
Syntax:
#gccjit.field<
mlir::StringAttr, # name
mlir::Type, # type
std::optional<unsigned>, # bitWidth
std::optional<mlir::gccjit::SourceLocAttr> # loc
>
The #gccjit.field attribute represents a field within a record (i.e. a
record or a union).
When the bitWidth parameter is present, the attribute represents a
bitfield. The bitWidth parameter gives the width of the bitfield.
Parameters:
| Parameter | C++ type | Description |
|---|---|---|
| name | mlir::StringAttr |
|
| type | mlir::Type |
|
| bitWidth | std::optional<unsigned> |
|
| loc | std::optional<mlir::gccjit::SourceLocAttr> |
FloatAttr
An attribute containing a constant floating-point value
A #gccjit.float attribute represents a constant floating-point value of
some libgccjit floating-point type.
Example:
#gccjit.float<42.0>
Parameters:
| Parameter | C++ type | Description |
|---|---|---|
| type | mlir::gccjit::FloatType |
|
| value | ::mlir::APFloat |
FunctionAttr
Function Attribute
A #gccjit.fn_attr attribute represents a function attribute.
There three types of function attributes:
- unit attributes: those without a value.
- string attributes: those with a string value.
- integer array attributes: those with an array of integers.
Parameters:
| Parameter | C++ type | Description |
|---|---|---|
| attr | FnAttrEnumAttr |
|
| strValue | std::optional<mlir::StringAttr> |
|
| intArrayValue | std::optional<mlir::DenseI32ArrayAttr> |
IntAttr
An attribute containing a integer value
An #gccjit.int attribute represents a constant integer value of some
libgccjit integer type.
Example:
#gccjit.int<42>
Parameters:
| Parameter | C++ type | Description |
|---|---|---|
| type | mlir::gccjit::IntType |
|
| value | ::mlir::APInt |
NullAttr
An attribute containing a null pointer constant
Syntax:
#gccjit.null<
mlir::gccjit::PointerType # type
>
A #gccjit.null attribute represents a constant null pointer value of some
libgccjit pointer type.
Parameters:
| Parameter | C++ type | Description |
|---|---|---|
| type | mlir::gccjit::PointerType |
OneAttr
An attribute containing a constant one
Syntax:
#gccjit.one<
::mlir::Type # type
>
A #gccjit.one attribute represents a constant one value of some
libgccjit integer or floating-point type.
Parameters:
| Parameter | C++ type | Description |
|---|---|---|
| type | ::mlir::Type |
OptLevelAttr
Optimization level
Represents the optimization level.
Parameters:
| Parameter | C++ type | Description |
|---|---|---|
| level | OptLevelEnumAttr |
SourceLocAttr
Source location
Syntax:
#gccjit.loc<
mlir::StringAttr, # filename
int, # line
int # column
>
Represent a source location in GCCJIT.
Parameters:
| Parameter | C++ type | Description |
|---|---|---|
| filename | mlir::StringAttr |
|
| line | int |
|
| column | int |
TLSModelAttr
Thread Local Storage model
Represents the Thread Local Storage model for the lvalue.
Parameters:
| Parameter | C++ type | Description |
|---|---|---|
| model | TLSModelEnumAttr |
ZeroAttr
An attribute containing a constant zero
Syntax:
#gccjit.zero<
::mlir::Type # type
>
A #gccjit.zero attribute represents a constant zero value of some
libgccjit integer or floating-point type.
Parameters:
| Parameter | C++ type | Description |
|---|---|---|
| type | ::mlir::Type |