Skip to content

'abi' Dialect

A vast ABI dialect. Dialect provides operations to describe how arguments and return values are transformed to better model target abi.

Operations

abi.call (::vast::abi::CallOp)

ABI call operation

Syntax:

operation ::= `abi.call` $callee `(` $args `)` attr-dict `:` functional-type( $args, $results )

ABI call operation Interfaces: CallOpInterface

Attributes:

AttributeMLIR TypeDescription
callee::mlir::FlatSymbolRefAttrflat symbol reference attribute

Operands:

Operand Description
args variadic of any type

Results:

Result Description
results variadic of any type

abi.call_args (::vast::abi::CallArgsOp)

Not implement yet.

Syntax:

operation ::= `abi.call_args` $body attr-dict `:` type($results)

WIP

Results:

Result Description
results variadic of any type

abi.call_exec (::vast::abi::CallExecutionOp)

WIP

Syntax:

operation ::= `abi.call_exec` $callee `(` $args `)` $body attr-dict `:` functional-type($args, $result)

WIP Interfaces: CallOpInterface

Attributes:

AttributeMLIR TypeDescription
callee::mlir::SymbolRefAttrsymbol reference attribute

Operands:

Operand Description
args variadic of any type

Results:

Result Description
result any type

abi.call_rets (::vast::abi::CallRetsOp)

Not implement yet.

Syntax:

operation ::= `abi.call_rets` $body attr-dict `:` type($results)

WIP

Results:

Result Description
results variadic of any type

abi.direct (::vast::abi::DirectOp)

Pass value directly - usually means by register

Syntax:

operation ::= `abi.direct` $value attr-dict `:` type($value) `->` type($result)

Pass value directly - usually means by register.

Operands:

Operand Description
value variadic of any type

Results:

Result Description
result variadic of any type

abi.epilogue (::vast::abi::EpilogueOp)

WIP

Syntax:

operation ::= `abi.epilogue` $body attr-dict `:` type($results)

WIP

Results:

Result Description
results variadic of any type

abi.func (::vast::abi::FuncOp)

Function with transformed type.

Syntax:

operation ::= `abi.func` $sym_name custom< FunctionSignatureAndBody >($function_type, attr-dict, $body)

Inspired by cir::FuncOp and mlir::func::FuncOp:

Operations within the function cannot implicitly capture values defined outside of the function, i.e. Functions are IsolatedFromAbove. All external references must use function arguments or attributes that establish a symbolic connection (e.g. symbols referenced by name via a string attribute like SymbolRefAttr). An external function declaration (used when referring to a function declared in some other module) has no body.

The function linkage information is specified by linkage, as defined by GlobalLinkageKind attribute.

Traits: AutomaticAllocationScope, IsolatedFromAbove, NoTerminator, ShadowingSymbolTable

Interfaces: CallableOpInterface, Core_FuncSymbol, Core_FunctionOpInterface, Core_SymbolTableOpInterface, Core_Symbol

Attributes:

AttributeMLIR TypeDescription
sym_name::mlir::StringAttrstring attribute
function_type::mlir::TypeAttrtype attribute of function type
linkage::vast::core::GlobalLinkageKindAttrglobal linkage kind
sym_visibility::mlir::StringAttrstring attribute
arg_attrs::mlir::ArrayAttrArray of dictionary attributes
res_attrs::mlir::ArrayAttrArray of dictionary attributes

abi.indirect (::vast::abi::IndirectOp)

Value is passed indirectly via memory

Syntax:

operation ::= `abi.indirect` $value attr-dict `:` type($value) `->` type($result)

Value is passed indirectly via memory

Operands:

Operand Description
value any type

Results:

Result Description
result any type

abi.prologue (::vast::abi::PrologueOp)

WIP

Syntax:

operation ::= `abi.prologue` $body attr-dict `:` type($results)

WIP

Results:

Result Description
results variadic of any type

abi.ret_direct (::vast::abi::RetDirectOp)

Value is returned directly.

Syntax:

operation ::= `abi.ret_direct` $value attr-dict `:` type($value) `->` type($result)

Value is returned directly.

Operands:

Operand Description
value any type

Results:

Result Description
result variadic of any type

abi.yield (::vast::abi::YieldOp)

WIP

Syntax:

operation ::= `abi.yield` $values attr-dict `:` type($values) `->` type($result)

WIP Traits: Terminator

Operands:

Operand Description
values variadic of any type

Results:

Result Description
result variadic of any type