[Mlir-commits] [mlir] [mlir:doc] Clarify requirements on `RewritePatterns`. (PR #218351)

Mehdi Amini llvmlistbot at llvm.org
Tue Aug 25 02:21:43 PDT 2026


Ingo =?utf-8?q?Müller?= <ingomueller at google.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/218351 at github.com>


================
@@ -186,7 +186,8 @@ root operation may be replaced (but not erased). It allows for updating an
 operation in-place, or returning a set of pre-existing values (or attributes) to
 replace the operation with. This ensures that the `fold` method is a truly
 "local" transformation, and can be invoked without the need for a pattern
-rewriter.
+rewriter. As with [rewrite patterns](PatternRewriter.md#restrictions), folding
+should ideally always preserve IR verifiability.
----------------
joker-eph wrote:

Sure, looks good.

https://github.com/llvm/llvm-project/pull/218351


More information about the Mlir-commits mailing list