[Mlir-commits] [mlir] [mlir][Transforms][NFC] Turn in-place op modification into `IRRewrite` (PR #81245)

Matthias Springer llvmlistbot at llvm.org
Tue Feb 20 23:24:29 PST 2024


================
@@ -761,7 +721,8 @@ class IRRewrite {
     MoveBlock,
     SplitBlock,
     BlockTypeConversion,
-    MoveOperation
+    MoveOperation,
+    ModifyOperation
----------------
matthias-springer wrote:

That's so that I can implement `classof` with comparisons:
```c++
  static bool classof(const IRRewrite *rewrite) {
    return rewrite->getKind() >= Kind::MoveOperation &&
           rewrite->getKind() <= Kind::ModifyOperation;
  }
```

Block rewrites must appear before operation rewrites.


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


More information about the Mlir-commits mailing list