Lowers ex dialect IR to func/arith/scf/cf and then to LLVM.
The conversion patterns live in Beaver
(Beaver.MLIR.Conversion.Ex); this module wires them together with the
standard arith-to-llvm and func-to-llvm passes for the lowering phase.
Summary
Functions
Converts an ex dialect module to func/arith/scf/cf.
Lowers an ex dialect module to LLVM dialect IR.
Functions
@spec to_func(Beaver.MLIR.Module.t()) :: Beaver.MLIR.Module.t()
Converts an ex dialect module to func/arith/scf/cf.
The module is converted in place and returned.
@spec to_llvm(Beaver.MLIR.Module.t(), Beaver.MLIR.Context.t(), keyword()) :: Beaver.MLIR.Module.t()
Lowers an ex dialect module to LLVM dialect IR.
Runs the ex conversion plan followed by the standard arith-to-llvm and
func-to-llvm passes. With c_interface: true, requests C wrappers on the
functions (llvm-request-c-wrappers) between the passes so they can be
invoked through the MLIR JIT (Beaver.MLIR.ExecutionEngine). The module is
converted in place and returned.