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

Matthias Springer llvmlistbot at llvm.org
Wed Feb 28 01:05:59 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)
----------------
matthias-springer wrote:

`Operation::walk` also enumerates the op itself as far as I know.


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


More information about the Mlir-commits mailing list