Beaver. MLIR. IRRewriter
(beaver v0.4.8)
Copy Markdown
Owns standalone MLIR IR rewriters.
Use with_rewriter/2 for imperative transformations outside a rewrite
pattern. The rewriter is always destroyed when the callback returns, raises,
throws, or exits.
Summary
Functions
Creates a standalone rewriter for a context or before an operation.
Destroys a standalone rewriter created by this module.
Runs fun with a standalone rewriter and always destroys it afterward.
Types
@type owner() :: Beaver.MLIR.Context.t() | Beaver.MLIR.Operation.t()
Functions
@spec create(owner()) :: Beaver.MLIR.RewriterBase.t()
Creates a standalone rewriter for a context or before an operation.
@spec destroy(Beaver.MLIR.RewriterBase.t()) :: :ok
Destroys a standalone rewriter created by this module.
@spec with_rewriter(owner(), (Beaver.MLIR.RewriterBase.t() -> result)) :: result when result: var
Runs fun with a standalone rewriter and always destroys it afterward.