mlir._mlir_libs._mlir.rewrite¶
Classes¶
Functions¶
Applys the given patterns to the given op greedily while folding results. |
Module Contents¶
- class mlir._mlir_libs._mlir.rewrite.PatternRewriter¶
- property ip: _mlir.ir.InsertionPoint¶
The current insertion point of the PatternRewriter.
- replace_op(op: mlir.ir.Operation, new_op: mlir.ir.Operation) None¶
- replace_op(op: mlir.ir.Operation, values: list[mlir.ir.Value]) None
Replace an operation with a list of values.
- erase_op(op: mlir.ir.Operation) None¶
Erase an operation.
- class mlir._mlir_libs._mlir.rewrite.RewritePatternSet(context: Context | None = None)¶
- add(root: object, fn: collections.abc.Callable, benefit: int = 1) None¶
Add a new rewrite pattern on the given root operation with the callable as the matching and rewriting function and the given benefit.
- freeze() FrozenRewritePatternSet¶
Freeze the pattern set into a frozen one.
- class mlir._mlir_libs._mlir.rewrite.PDLResultList¶
- append(value: mlir.ir.Value)¶
- append(op: mlir.ir.Operation)
- append(type: mlir.ir.Type)
- append(attr: mlir.ir.Attribute)
- class mlir._mlir_libs._mlir.rewrite.PDLModule(module: mlir.ir.Module)¶
- class mlir._mlir_libs._mlir.rewrite.PDLModule(module: mlir.ir.Module)
- freeze() FrozenRewritePatternSet¶
- register_rewrite_function(arg0: str, arg1: collections.abc.Callable, /) None¶
- register_constraint_function(arg0: str, arg1: collections.abc.Callable, /) None¶
- class mlir._mlir_libs._mlir.rewrite.FrozenRewritePatternSet¶
- property _CAPIPtr: object¶
- _CAPICreate() object¶
- mlir._mlir_libs._mlir.rewrite.apply_patterns_and_fold_greedily(module: mlir.ir.Module, set: FrozenRewritePatternSet) None¶
- mlir._mlir_libs._mlir.rewrite.apply_patterns_and_fold_greedily(module: mlir.ir.Module, set: FrozenRewritePatternSet) None
- mlir._mlir_libs._mlir.rewrite.apply_patterns_and_fold_greedily(op: mlir.ir._OperationBase, set: FrozenRewritePatternSet) None
- mlir._mlir_libs._mlir.rewrite.apply_patterns_and_fold_greedily(op: mlir.ir._OperationBase, set: FrozenRewritePatternSet) None
Applys the given patterns to the given op greedily while folding results.