[Mlir-commits] [mlir] [mlir][Transforms] Dialect conversion: Assert when accessing erased ops (PR #83132)

Mehdi Amini llvmlistbot at llvm.org
Tue Feb 27 14:59:58 PST 2024


================
@@ -1912,8 +1921,13 @@ OperationLegalizer::legalize(Operation *op,
 
     // If this operation is recursively legal, mark its children as ignored so
     // that we don't consider them for legalization.
-    if (legalityInfo->isRecursivelyLegal)
-      rewriter.getImpl().markNestedOpsIgnored(op);
+    if (legalityInfo->isRecursivelyLegal) {
+      op->walk([&](Operation *nested) {
+        if (op != nested)
----------------
joker-eph wrote:

op is not visited by the walk, this test seems not necessary to me?

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


More information about the Mlir-commits mailing list