‘native’ Dialect¶
Facts the native code generator carries between its passes
native names the facts that native lowering, scheduling and the driver
exchange through the IR: compilation options on the module, partition
inventories for separate object emission, coroutine frame layouts and
their replay certificates, and per-operation lowering certificates. It
has no operations; its attributes annotate operations of other dialects
and are consumed before LLVM translation.
Attributes¶
DesignPartitionsAttr¶
The semantic partition manifest of one erased design
Syntax:
#native.design_partitions<
::mlir::StringAttr, # design
::mlir::ArrayAttr # partitions
>
Parameters:¶
Parameter |
C++ type |
Description |
|---|---|---|
design |
|
|
partitions |
|
ElementDefaultAttr¶
The default value of one container element type
Syntax:
#native.element_default<
uint64_t, # typeId
::mlir::DenseI8ArrayAttr # image
>
Element type typeId defaults to image rather than to the type default
of IEEE 1800-2023 Table 6-7, as an unpacked struct with member
initializers does (7.2.2). image is the element’s value plane followed,
for a four-state element, by its unknown plane, in the runtime’s
default_image layout.
Parameters:¶
Parameter |
C++ type |
Description |
|---|---|---|
typeId |
|
|
image |
|
FrameAttr¶
Layout of the coroutine frame a ramp function allocates
Syntax:
#native.frame<
uint64_t, # size
uint64_t, # alignment
uint64_t, # checksum
::mlir::DenseI32ArrayAttr, # continuations
::mlir::ArrayAttr # fields
>
Parameters:¶
Parameter |
C++ type |
Description |
|---|---|---|
size |
|
|
alignment |
|
|
checksum |
|
|
continuations |
|
|
fields |
|
FrameCheckpointAttr¶
Module inventory of functions whose frames may be replayed
Syntax:
#native.frame_checkpoint<
::mlir::Attribute, # layout
::mlir::ArrayAttr # functions
>
Parameters:¶
Parameter |
C++ type |
Description |
|---|---|---|
layout |
|
|
functions |
|
FrameFieldAttr¶
One field of a coroutine frame descriptor
Syntax:
#native.frame_field<
uint32_t, # kind
uint32_t, # flags
uint64_t, # offset
uint64_t, # size
uint32_t, # alignment
uint32_t # reserved
>
Parameters:¶
Parameter |
C++ type |
Description |
|---|---|---|
kind |
|
|
flags |
|
|
offset |
|
|
size |
|
|
alignment |
|
|
reserved |
|
FrameInputsAttr¶
Canonical inputs a replayed frame analysis must reproduce
Syntax:
#native.frame_inputs<
::mlir::FunctionType, # signature
::mlir::DenseI64ArrayAttr, # identity
::mlir::DenseI64ArrayAttr, # abi
::mlir::ArrayAttr, # continuations
::mlir::ArrayAttr # captures
>
Frame replay recomputes these from the function and rejects any change.
identity is the code unit, entry kind and home region; abi is the
frame size, alignment, checksum and bytecode read-only bit; captures
are the function argument attributes, when present.
Parameters:¶
Parameter |
C++ type |
Description |
|---|---|---|
signature |
|
|
identity |
|
|
abi |
|
|
continuations |
|
|
captures |
|
FrameSiteAttr¶
A suspension site of a replayed frame
Syntax:
#native.frame_site<
::mlir::DenseI64ArrayAttr, # identity
::mlir::ArrayAttr # types
>
identity is the continuation ID, the continuation block index, and the
wait offset and size; types are the continuation argument types.
Parameters:¶
Parameter |
C++ type |
Description |
|---|---|---|
identity |
|
|
types |
|
PartitionAttr¶
One native partition: its symbols and cross-partition edges
Syntax:
#native.partition<
::mlir::StringAttr, # id
::mlir::ArrayAttr, # owners
::mlir::ArrayAttr, # members
::mlir::ArrayAttr, # imports
::mlir::ArrayAttr, # exports
::mlir::ArrayAttr # dependencies
>
members are the symbols the partition defines; imports and exports
are the symbols it references in, and provides to, other partitions;
dependencies are the IDs of the partitions it imports from. Semantic
manifests also name the code units that owners the partition.
Parameters:¶
Parameter |
C++ type |
Description |
|---|---|---|
id |
|
|
owners |
|
|
members |
|
|
imports |
|
|
exports |
|
|
dependencies |
|