Beaver. MLIR. RewritePatternSet
(beaver v0.4.8)
Copy Markdown
This module defines functions working with MLIR RewritePatternSet.
Summary
Functions
Add a rewrite pattern into a MLIR.RewritePatternSet.
Creates a dialect conversion pattern and transfers it into this set.
Freeze the given MLIR.RewritePatternSet to a MLIR.FrozenRewritePatternSet.
Note that the ownership of the input set is transferred into the frozen set after this call.
Destroy the given MLIR.RewritePatternSet or MLIR.FrozenRewritePatternSet
outside a BEAM scheduler thread.
Create a MLIR.RewritePatternSet from the given PDL patterns.
The patterns is a list of functions that accept two arguments: ctx and block,
and create PDL patterns in the given block under the given ctx.
The opts may contain
Types
@type t() :: %Beaver.MLIR.RewritePatternSet{ref: term()}
Functions
@spec add(t(), Beaver.MLIR.RewritePattern.t()) :: t()
Add a rewrite pattern into a MLIR.RewritePatternSet.
The set takes ownership of a raw MLIR.RewritePattern. Native descriptors
are materialized through the existing callback-backed rewrite bridge before
ownership is transferred.
@spec add(t(), Beaver.Pattern.Native.Descriptor.t(), keyword()) :: t()
@spec add(t(), term(), module() | function() | Beaver.Pattern.Native.Descriptor.t()) :: t()
Creates a dialect conversion pattern and transfers it into this set.
Freeze the given MLIR.RewritePatternSet to a MLIR.FrozenRewritePatternSet.
Note that the ownership of the input set is transferred into the frozen set after this call.
Destroy the given MLIR.RewritePatternSet or MLIR.FrozenRewritePatternSet
outside a BEAM scheduler thread.
Create a MLIR.RewritePatternSet from the given PDL patterns.
The patterns is a list of functions that accept two arguments: ctx and block,
and create PDL patterns in the given block under the given ctx.
The opts may contain:
:ctx- (required) theMLIR.Contextto create the patterns in.:debug- (optional) if set totrue, dump each created pattern for debugging.