[Mlir-commits] [mlir] [mlir] Add fast walk-based pattern rewrite driver (PR #113825)
Jakub Kuderski
llvmlistbot at llvm.org
Sun Oct 27 17:44:40 PDT 2024
================
@@ -320,15 +320,33 @@ conversion target, via a set of pattern-based operation rewriting patterns. This
framework also provides support for type conversions. More information on this
driver can be found [here](DialectConversion.md).
+### Walk Pattern Rewrite Driver
+
+This is a fast and simple driver that walks the given op and applies patterns
+that locally have the most benefit. The benefit of a pattern is decided solely
+by the benefit specified on the pattern, and the relative order of the pattern
+within the pattern list (when two patterns have the same local benefit).
+
+This driver does not (re)visit modified or newly replaced ops, and does not
+allow for progressive rewrites of the same op. Op erasure is only supported for
----------------
kuhar wrote:
The basic requirement for any erasure is that it shouldn't invalidate the next pointer saved by `make_early_inc_range`. Making the verification a bit stricter for ops seemed reasonable to me, but I'm not quite sure how this should translate to blocks. Do you have any suggestions?
https://github.com/llvm/llvm-project/pull/113825
More information about the Mlir-commits
mailing list