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

Matthias Springer llvmlistbot at llvm.org
Mon Aug 24 02:15:38 PDT 2026


================
@@ -73,15 +73,23 @@ public:
 
 #### Restrictions
 
+*   Patterns must transform verifiable IR into verifiable IR, i.e., the IR must
----------------
matthias-springer wrote:

I've been advertising this as an "MLIR best practice", not a strict requirement. Technically, IR must be valid only between pass applications. There may be legitimate cases where this best practice does not apply, e.g. when converting function declarations and function calls with separate rewrite patterns.

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


More information about the Mlir-commits mailing list