Beaver. MLIR. Conversion. Ex
(beaver v0.4.8)
Copy Markdown
Conversion plan for lowering the ex dialect to func/arith/scf/cf.
M1 lowering for the scalar subset of the ex dialect:
ex.lit->arith.constantex.add->arith.addiex.sub->arith.subiex.mul->arith.muliex.call->func.callex.return->func.returnex.func->func.func(body region moved, argument andex.returntypes converted)
The ex term types (!ex.dyn/!ex.bound/!ex.unbound) convert to a scalar
word type (i64) until the Zig term runtime lands.
plan/1 returns a reusable Beaver.MLIR.Conversion.Plan; run it with
Beaver.MLIR.Conversion.Plan.run/2 and continue with the standard
arith-to-llvm and func-to-llvm passes.
ex.var/ex.bind must be materialized to SSA first with
Beaver.MLIR.Dialect.Ex.MaterializeBoundVariables.
Summary
Functions
Converts an ex term type to its scalar word representation.
Returns a conversion plan lowering the ex scalar subset to func/arith.
Functions
@spec convert_type(Beaver.MLIR.Type.t()) :: Beaver.MLIR.Type.t()
Converts an ex term type to its scalar word representation.
@spec plan(keyword()) :: Beaver.MLIR.Conversion.Plan.t()
Returns a conversion plan lowering the ex scalar subset to func/arith.