Beaver.DSL.Op.Prototype behaviour (beaver v0.2.10)
Beaver.DSL.Prototype is a struct holding an Op's operands, results, attributes before creating it. It is similar to Beaver.DSL.SSA but there are applicable in different scenarios. Beaver.DSL.Prototype should be used where it is desired to get the created MLIR Op rather than the MLIR values of its results. Unlike SSA, operands/attributes/results in Prototype don't necessary contain real MLIR values/attributes of a operation. They could be other types for different abstraction or representation. For instance, when Prototype is used to compiling Elixir patterns to PDL, these fields contains MLIR values of PDL handles.
Link to this section Summary
Functions
Dispatch the op name and map to the callback cb
if this is a module implement the behavior this module define.
check if this module exist and compliant to Op.Prototype
Link to this section Types
@type t() :: any()
Link to this section Callbacks
op_name()
@callback op_name() :: String.t()
Link to this section Functions
dispatch(module, fields, cb)
Dispatch the op name and map to the callback cb
if this is a module implement the behavior this module define.
dispatch(module, fields, extra_arg, cb)
is_compliant(module)
check if this module exist and compliant to Op.Prototype