Batata.Lift (batata v0.1.0)

Copy Markdown View Source

Lifts a Batata.Frontend module snapshot into ex dialect IR.

The scalar slice supports integer literals, +/-/*, = bindings, local calls, and functions with integer parameters. Bindings lower directly to SSA: ex.var/ex.bind are term-universe bookkeeping and stay out of the typed scalar slice (they are erased by Beaver.MLIR.Dialect.Ex.MaterializeBoundVariables on the term path). Anything outside the slice raises Batata.Lift.Error explicitly instead of being silently dropped.

Summary

Functions

Builds a builtin.module of ex.func operations for the snapshot.

Functions

module_to_ir(mod, opts)

Builds a builtin.module of ex.func operations for the snapshot.

Returns a Beaver.Deferred; materialize it with Beaver.Deferred.create/2 against the MLIR context.