Skip to content

Conversation

matthias-springer
Copy link
Member

@matthias-springer matthias-springer commented Jul 26, 2025

Operation folders can do two things:

  1. Modify IR (in-place op modification). Failing to legalize an in-place folded operation does not trigger an immediate rollback. This happens only if the driver decides to try a different lowering path, requiring it to roll back a bunch of modifications, including the application of the folder.
  2. Create new IR (constant op materialization of a folded attribute). Failing to legalize a newly created constant op triggers an immediate rollback.

In-place op modifications should be guarded by startOpModification/finalizeOpModification because they are no different from other in-place op modifications. (They just happen outside of a pattern, but that does not mean that we should not track those changes; we are tracking everything else.) This commit adds those two function calls.

This commit also moves the rewriter.replaceOp(op, replacementValues); function call before the loop nest that legalizes the newly created constant ops (and therefore replacementValues). Conceptually, the folded op must be replaced before attempting to legalize the constants because the constant ops may themselves be replaced as part of their own legalization process. The previous implementation happened to work in the current conversion driver, but is incompatible with the One-Shot Dialect Conversion driver, which expects to see the most recent IR at all time.

From an end-user perspective, this commit should be NFC. A common folder-rollback pattern that is exercised by multiple tests cases: A memref.dim is folded to arith.constant, but arith.constant is not marked as legal as per the conversion target, triggering a rollback.

Note: Folding is generally unsafe in a dialect conversion (see #92683), but that's a different issue. (In a One-Shot Dialect Conversion, it will no longer be unsafe.)

@llvmbot llvmbot added mlir:core MLIR Core Infrastructure mlir labels Jul 26, 2025
@llvmbot
Copy link
Member

llvmbot commented Jul 26, 2025

@llvm/pr-subscribers-mlir-core

@llvm/pr-subscribers-mlir

Author: Matthias Springer (matthias-springer)

Changes

Folders are almost like patterns: they can modify IR (in-place op modification) and create new IR (constant op materialization of a folded attribute). If the modified op or the newly-created op cannot be legalized, the folding must be rolled back. The previous implementation did not roll back in-place op modifications.

This issue became apparent when moving the rewriter.replaceOp(op, replacementValues); function call before the loop nest that legalizes the newly created constant ops (and therefore replacementValues). Conceptually, the folded op must be replaced before attempting to legalize the constants because the constant ops may themselves be replaced as part of the legalization process. This happened to work in the current conversion driver, but caused a failure in the One-Shot Dialect Conversion driver, which expects to see the most recent IR at all time.

Various test cases started failing after moving the replaceOp call, which pointed to the missing rollback functionality. A common folder-rollback pattern that is exercised by multiple tests cases: A memref.dim is folded to arith.constant, but arith.constant is not marked as legal as per the conversion target, triggering a rollback.


Full diff: https://github.com/llvm/llvm-project/pull/150775.diff

2 Files Affected:

  • (modified) mlir/lib/Transforms/Utils/DialectConversion.cpp (+28-10)
  • (modified) mlir/test/Transforms/test-legalize-type-conversion.mlir (+1-1)
diff --git a/mlir/lib/Transforms/Utils/DialectConversion.cpp b/mlir/lib/Transforms/Utils/DialectConversion.cpp
index df255cfcf3ec1..3ecd1fd43bf44 100644
--- a/mlir/lib/Transforms/Utils/DialectConversion.cpp
+++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp
@@ -17,6 +17,7 @@
 #include "mlir/IR/Operation.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
 #include "mlir/Rewrite/PatternApplicator.h"
+#include "llvm/ADT/ScopeExit.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/FormatVariadic.h"
@@ -2216,22 +2217,45 @@ OperationLegalizer::legalizeWithFold(Operation *op,
     rewriterImpl.logger.startLine() << "* Fold {\n";
     rewriterImpl.logger.indent();
   });
-  (void)rewriterImpl;
+
+  // Clear pattern state, so that the next pattern application starts with a
+  // clean slate. (The op/block sets are populated by listener notifications.)
+  auto cleanup = llvm::make_scope_exit([&]() {
+    rewriterImpl.patternNewOps.clear();
+    rewriterImpl.patternModifiedOps.clear();
+    rewriterImpl.patternInsertedBlocks.clear();
+  });
+
+  // Upon failure, undo all changes made by the folder.
+  RewriterState curState = rewriterImpl.getCurrentState();
+  auto undoFolding = [&]() {
+    rewriterImpl.resetState(curState, std::string(op->getName().getStringRef()) + " folder");
+    return failure();
+  };
 
   // Try to fold the operation.
   StringRef opName = op->getName().getStringRef();
   SmallVector<Value, 2> replacementValues;
   SmallVector<Operation *, 2> newOps;
   rewriter.setInsertionPoint(op);
+  rewriter.startOpModification(op);
   if (failed(rewriter.tryFold(op, replacementValues, &newOps))) {
     LLVM_DEBUG(logFailure(rewriterImpl.logger, "unable to fold"));
+    rewriter.cancelOpModification(op);
     return failure();
   }
+  rewriter.finalizeOpModification(op);
 
   // An empty list of replacement values indicates that the fold was in-place.
   // As the operation changed, a new legalization needs to be attempted.
-  if (replacementValues.empty())
-    return legalize(op, rewriter);
+  if (replacementValues.empty()) {
+    if (succeeded(legalize(op, rewriter)))
+      return success();
+    return undoFolding();
+  }
+
+  // Insert a replacement for 'op' with the folded replacement values.
+  rewriter.replaceOp(op, replacementValues);
 
   // Recursively legalize any new constant operations.
   for (Operation *newOp : newOps) {
@@ -2245,16 +2269,10 @@ OperationLegalizer::legalizeWithFold(Operation *op,
             "op '" + opName +
             "' folder rollback of IR modifications requested");
       }
-      // Legalization failed: erase all materialized constants.
-      for (Operation *op : newOps)
-        rewriter.eraseOp(op);
-      return failure();
+      return undoFolding();
     }
   }
 
-  // Insert a replacement for 'op' with the folded replacement values.
-  rewriter.replaceOp(op, replacementValues);
-
   LLVM_DEBUG(logSuccess(rewriterImpl.logger, ""));
   return success();
 }
diff --git a/mlir/test/Transforms/test-legalize-type-conversion.mlir b/mlir/test/Transforms/test-legalize-type-conversion.mlir
index db8bd0f6378d2..9bffe92b374d5 100644
--- a/mlir/test/Transforms/test-legalize-type-conversion.mlir
+++ b/mlir/test/Transforms/test-legalize-type-conversion.mlir
@@ -104,8 +104,8 @@ func.func @test_signature_conversion_no_converter() {
   "test.signature_conversion_no_converter"() ({
   // expected-error@below {{failed to legalize unresolved materialization from ('f64') to ('f32') that remained live after conversion}}
   ^bb0(%arg0: f32):
-    "test.type_consumer"(%arg0) : (f32) -> ()
     // expected-note@below{{see existing live user here}}
+    "test.type_consumer"(%arg0) : (f32) -> ()
     "test.return"(%arg0) : (f32) -> ()
   }) : () -> ()
   return

Copy link

github-actions bot commented Jul 26, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@@ -2245,16 +2269,10 @@ OperationLegalizer::legalizeWithFold(Operation *op,
"op '" + opName +
"' folder rollback of IR modifications requested");
}
// Legalization failed: erase all materialized constants.
for (Operation *op : newOps)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This is no longer necessary. resetState will erase these ops.

@matthias-springer matthias-springer force-pushed the users/matthias-springer/fix_folder_rollback branch from 1edd3fd to 45803b6 Compare July 26, 2025 16:54
@llvmbot llvmbot added the flang Flang issues not falling into any other category label Jul 26, 2025
@matthias-springer matthias-springer force-pushed the users/matthias-springer/fix_folder_rollback branch from 45803b6 to 5d65053 Compare July 26, 2025 17:01
@matthias-springer matthias-springer changed the title [mlir][Transforms] Dialect Conversion: Fix folder rollback [mlir][Transforms] Dialect Conversion: Fix folder implementation Jul 26, 2025
@matthias-springer matthias-springer force-pushed the users/matthias-springer/fix_folder_rollback branch from 5d65053 to 7aefa35 Compare July 26, 2025 17:23
@matthias-springer matthias-springer force-pushed the users/matthias-springer/fix_folder_rollback branch from 7aefa35 to 3024f0a Compare July 26, 2025 17:34
@matthias-springer matthias-springer merged commit c639475 into main Jul 27, 2025
9 checks passed
@matthias-springer matthias-springer deleted the users/matthias-springer/fix_folder_rollback branch July 27, 2025 10:01
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 27, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-bootstrap-msan running on sanitizer-buildbot9 while building mlir at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/94/builds/9240

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[190/1060] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/DarwinSDKInfoTest.cpp.o
[191/1060] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/OffloadArchTest.cpp.o
[192/1060] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/FileEntryTest.cpp.o
[193/1060] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/SanitizersTest.cpp.o
[194/1060] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/SearchPathTest.cpp.o
[195/1060] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/LineOffsetMappingTest.cpp.o
[196/1060] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/ASTUnitTest.cpp.o
[197/1060] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/ASTMatchers/ASTMatchersNodeTest.cpp.o
[198/1060] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/Syntax/TreeTest.cpp.o
[199/1060] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/NoAlterCodeGenActionTest.cpp.o
FAILED: tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/NoAlterCodeGenActionTest.cpp.o 
/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/clang++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__SHORT_FILE__=\"NoAlterCodeGenActionTest.cpp\" -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build2_msan/tools/clang/unittests -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/unittests -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build2_msan/tools/clang/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build2_msan/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/unittests/Tooling -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googletest/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/NoAlterCodeGenActionTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/NoAlterCodeGenActionTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/NoAlterCodeGenActionTest.cpp.o -c /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/unittests/Frontend/NoAlterCodeGenActionTest.cpp
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/clang++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__SHORT_FILE__=\"NoAlterCodeGenActionTest.cpp\" -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build2_msan/tools/clang/unittests -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/unittests -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build2_msan/tools/clang/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build2_msan/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/unittests/Tooling -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googletest/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17 -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/NoAlterCodeGenActionTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/NoAlterCodeGenActionTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/NoAlterCodeGenActionTest.cpp.o -c /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/unittests/Frontend/NoAlterCodeGenActionTest.cpp
1.	/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googletest/include/gtest/gtest-printers.h:992:16: current parser token '<<'
2.	/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googletest/include/gtest/gtest-printers.h:125:1: parsing namespace 'testing'
3.	/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googletest/include/gtest/gtest-printers.h:129:1: parsing namespace 'testing::internal'
4.	/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googletest/include/gtest/gtest-printers.h:983:1: parsing struct/union/class body 'testing::internal::UniversalPrinter<T &>'
5.	/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googletest/include/gtest/gtest-printers.h:989:57: parsing function body 'testing::internal::UniversalPrinter<type-parameter-0-0 &>::Print'
6.	/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googletest/include/gtest/gtest-printers.h:989:57: in compound statement ('{}')
  #0 0x0000ac80d81dcefc ___interceptor_backtrace /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/../sanitizer_common/sanitizer_common_interceptors.inc:4530:13
  #1 0x0000ac80dece6074 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:838:7
  #2 0x0000ac80dece0554 llvm::sys::RunSignalHandlers() /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Support/Signals.cpp:105:18
  #3 0x0000ac80deb6146c HandleCrash /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
  #4 0x0000ac80deb6146c CrashRecoverySignalHandler(int) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
  #5 0x0000ac80d820f190 ~ScopedThreadLocalStateBackup /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/msan.h:352:37
  #6 0x0000ac80d820f190 SignalHandler(int) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:1154:1
  #7 0x0000f00017ba68f8 (linux-vdso.so.1+0x8f8)
  #8 0x0000f00017672f7c (/lib/aarch64-linux-gnu/libc.so.6+0xa2f7c)
  #9 0x0000ac80d81b25ec MsanAllocate(__sanitizer::BufferedStackTrace*, unsigned long, unsigned long, bool) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/msan_allocator.cpp:227:9
 #10 0x0000ac80d81b2e2c SetErrnoOnNull /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/../sanitizer_common/sanitizer_allocator_checks.h:31:7
 #11 0x0000ac80d81b2e2c __msan::msan_memalign(unsigned long, unsigned long, __sanitizer::BufferedStackTrace*) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/msan_allocator.cpp:398:10
 #12 0x0000ac80d821d1b8 operator new(unsigned long, std::align_val_t, std::nothrow_t const&) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/msan_new_delete.cpp:70:3
 #13 0x0000ac80debc6228 llvm::allocate_buffer(unsigned long, unsigned long) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Support/MemAlloc.cpp:21:14
 #14 0x0000ac80d82e6b08 capacity /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/SmallVector.h:80:36
 #15 0x0000ac80d82e6b08 reserveForParamAndGetAddressImpl<llvm::SmallVectorTemplateBase<void *, true> > /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/SmallVector.h:233:9
 #16 0x0000ac80d82e6b08 reserveForParamAndGetAddress /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/SmallVector.h:538:9
 #17 0x0000ac80d82e6b08 push_back /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/SmallVector.h:563:23
 #18 0x0000ac80d82e6b08 StartNewSlab /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/Support/Allocator.h:353:11
 #19 0x0000ac80d82e6b08 llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul, 128ul>::AllocateSlow(unsigned long, unsigned long, llvm::Align) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/Support/Allocator.h:203:5
 #20 0x0000ac80e5a5f0a8 Allocate /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/Support/Allocator.h:179:12
 #21 0x0000ac80e5a5f0a8 Allocate /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/Support/Allocator.h:217:12
 #22 0x0000ac80e5a5f0a8 Allocate /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/ASTContext.h:813:22
 #23 0x0000ac80e5a5f0a8 clang::ASTContext::getSubstTemplateTypeParmType(clang::QualType, clang::Decl*, unsigned int, clang::UnsignedOrNone, bool) const /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/lib/AST/ASTContext.cpp:5643:17
 #24 0x0000ac80e543fcd0 (anonymous namespace)::TemplateInstantiator::BuildSubstTemplateTypeParmType(clang::TypeLocBuilder&, bool, bool, clang::Decl*, unsigned int, clang::UnsignedOrNone, clang::TemplateArgument, clang::SourceLocation) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp:2635:11
 #25 0x0000ac80e543f240 (anonymous namespace)::TemplateInstantiator::TransformTemplateTypeParmType(clang::TypeLocBuilder&, clang::TemplateTypeParmTypeLoc, bool) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp:2704:5
 #26 0x0000ac80e53c79e4 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&, clang::TypeLoc) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/include/clang/AST/TypeNodes.inc:80:1
 #27 0x0000ac80e53c6250 isNull /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/PointerUnion.h:142:33
Step 14 (stage3/msan check) failure: stage3/msan check (failure)
...
[190/1060] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/DarwinSDKInfoTest.cpp.o
[191/1060] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/OffloadArchTest.cpp.o
[192/1060] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/FileEntryTest.cpp.o
[193/1060] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/SanitizersTest.cpp.o
[194/1060] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/SearchPathTest.cpp.o
[195/1060] Building CXX object tools/clang/unittests/Basic/CMakeFiles/BasicTests.dir/LineOffsetMappingTest.cpp.o
[196/1060] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/ASTUnitTest.cpp.o
[197/1060] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/ASTMatchers/ASTMatchersNodeTest.cpp.o
[198/1060] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Tooling/Syntax/TreeTest.cpp.o
[199/1060] Building CXX object tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/NoAlterCodeGenActionTest.cpp.o
FAILED: tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/NoAlterCodeGenActionTest.cpp.o 
/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/clang++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__SHORT_FILE__=\"NoAlterCodeGenActionTest.cpp\" -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build2_msan/tools/clang/unittests -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/unittests -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build2_msan/tools/clang/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build2_msan/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/unittests/Tooling -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googletest/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/NoAlterCodeGenActionTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/NoAlterCodeGenActionTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/NoAlterCodeGenActionTest.cpp.o -c /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/unittests/Frontend/NoAlterCodeGenActionTest.cpp
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/bin/clang++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__SHORT_FILE__=\"NoAlterCodeGenActionTest.cpp\" -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build2_msan/tools/clang/unittests -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/unittests -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build2_msan/tools/clang/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build2_msan/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/unittests/Tooling -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googletest/include -I/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17 -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/NoAlterCodeGenActionTest.cpp.o -MF tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/NoAlterCodeGenActionTest.cpp.o.d -o tools/clang/unittests/CMakeFiles/AllClangUnitTests.dir/Frontend/NoAlterCodeGenActionTest.cpp.o -c /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/unittests/Frontend/NoAlterCodeGenActionTest.cpp
1.	/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googletest/include/gtest/gtest-printers.h:992:16: current parser token '<<'
2.	/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googletest/include/gtest/gtest-printers.h:125:1: parsing namespace 'testing'
3.	/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googletest/include/gtest/gtest-printers.h:129:1: parsing namespace 'testing::internal'
4.	/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googletest/include/gtest/gtest-printers.h:983:1: parsing struct/union/class body 'testing::internal::UniversalPrinter<T &>'
5.	/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googletest/include/gtest/gtest-printers.h:989:57: parsing function body 'testing::internal::UniversalPrinter<type-parameter-0-0 &>::Print'
6.	/home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/third-party/unittest/googletest/include/gtest/gtest-printers.h:989:57: in compound statement ('{}')
  #0 0x0000ac80d81dcefc ___interceptor_backtrace /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/../sanitizer_common/sanitizer_common_interceptors.inc:4530:13
  #1 0x0000ac80dece6074 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:838:7
  #2 0x0000ac80dece0554 llvm::sys::RunSignalHandlers() /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Support/Signals.cpp:105:18
  #3 0x0000ac80deb6146c HandleCrash /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
  #4 0x0000ac80deb6146c CrashRecoverySignalHandler(int) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
  #5 0x0000ac80d820f190 ~ScopedThreadLocalStateBackup /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/msan.h:352:37
  #6 0x0000ac80d820f190 SignalHandler(int) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:1154:1
  #7 0x0000f00017ba68f8 (linux-vdso.so.1+0x8f8)
  #8 0x0000f00017672f7c (/lib/aarch64-linux-gnu/libc.so.6+0xa2f7c)
  #9 0x0000ac80d81b25ec MsanAllocate(__sanitizer::BufferedStackTrace*, unsigned long, unsigned long, bool) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/msan_allocator.cpp:227:9
 #10 0x0000ac80d81b2e2c SetErrnoOnNull /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/../sanitizer_common/sanitizer_allocator_checks.h:31:7
 #11 0x0000ac80d81b2e2c __msan::msan_memalign(unsigned long, unsigned long, __sanitizer::BufferedStackTrace*) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/msan_allocator.cpp:398:10
 #12 0x0000ac80d821d1b8 operator new(unsigned long, std::align_val_t, std::nothrow_t const&) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/msan_new_delete.cpp:70:3
 #13 0x0000ac80debc6228 llvm::allocate_buffer(unsigned long, unsigned long) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Support/MemAlloc.cpp:21:14
 #14 0x0000ac80d82e6b08 capacity /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/SmallVector.h:80:36
 #15 0x0000ac80d82e6b08 reserveForParamAndGetAddressImpl<llvm::SmallVectorTemplateBase<void *, true> > /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/SmallVector.h:233:9
 #16 0x0000ac80d82e6b08 reserveForParamAndGetAddress /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/SmallVector.h:538:9
 #17 0x0000ac80d82e6b08 push_back /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/SmallVector.h:563:23
 #18 0x0000ac80d82e6b08 StartNewSlab /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/Support/Allocator.h:353:11
 #19 0x0000ac80d82e6b08 llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul, 128ul>::AllocateSlow(unsigned long, unsigned long, llvm::Align) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/Support/Allocator.h:203:5
 #20 0x0000ac80e5a5f0a8 Allocate /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/Support/Allocator.h:179:12
 #21 0x0000ac80e5a5f0a8 Allocate /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/Support/Allocator.h:217:12
 #22 0x0000ac80e5a5f0a8 Allocate /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/ASTContext.h:813:22
 #23 0x0000ac80e5a5f0a8 clang::ASTContext::getSubstTemplateTypeParmType(clang::QualType, clang::Decl*, unsigned int, clang::UnsignedOrNone, bool) const /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/lib/AST/ASTContext.cpp:5643:17
 #24 0x0000ac80e543fcd0 (anonymous namespace)::TemplateInstantiator::BuildSubstTemplateTypeParmType(clang::TypeLocBuilder&, bool, bool, clang::Decl*, unsigned int, clang::UnsignedOrNone, clang::TemplateArgument, clang::SourceLocation) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp:2635:11
 #25 0x0000ac80e543f240 (anonymous namespace)::TemplateInstantiator::TransformTemplateTypeParmType(clang::TypeLocBuilder&, clang::TemplateTypeParmTypeLoc, bool) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp:2704:5
 #26 0x0000ac80e53c79e4 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&, clang::TypeLoc) /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/include/clang/AST/TypeNodes.inc:80:1
 #27 0x0000ac80e53c6250 isNull /home/b/sanitizer-aarch64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/PointerUnion.h:142:33

mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Jul 28, 2025
…m#150775)

Operation folders can do two things:

1. Modify IR (in-place op modification). Failing to legalize an in-place
folded operation does not trigger an immediate rollback. This happens
only if the driver decides to try a different lowering path, requiring
it to roll back a bunch of modifications, including the application of
the folder.
2. Create new IR (constant op materialization of a folded attribute).
Failing to legalize a newly created constant op triggers an immediate
rollback.

In-place op modifications should be guarded by
`startOpModification`/`finalizeOpModification` because they are no
different from other in-place op modifications. (They just happen
outside of a pattern, but that does not mean that we should not track
those changes; we are tracking everything else.) This commit adds those
two function calls.

This commit also moves the `rewriter.replaceOp(op, replacementValues);`
function call before the loop nest that legalizes the newly created
constant ops (and therefore `replacementValues`). Conceptually, the
folded op must be replaced before attempting to legalize the constants
because the constant ops may themselves be replaced as part of their own
legalization process. The previous implementation happened to work in
the current conversion driver, but is incompatible with the One-Shot
Dialect Conversion driver, which expects to see the most recent IR at
all time.

From an end-user perspective, this commit should be NFC. A common
folder-rollback pattern that is exercised by multiple tests cases: A
`memref.dim` is folded to `arith.constant`, but `arith.constant` is not
marked as legal as per the conversion target, triggering a rollback.

Note: Folding is generally unsafe in a dialect conversion (see llvm#92683),
but that's a different issue. (In a One-Shot Dialect Conversion, it will
no longer be unsafe.)
@rupprecht
Copy link
Collaborator

We have a couple test failures that bisect to this commit (e.g. bufferize.mlir).

The issue appears to happen when cancelOpModification() calls ModifyOperationRewrite::rollback() after a failed fold: it clears out the properties. This only happens when the dialect is unregistered (note: the failing step is mlir-hlo-opt --allow-unregistered-dialect). If I register the dialect, theses tests pass again.

What's the expected behavior here? Is this an issue w/ the test, e.g. it should only use tools that have all dialects registered? Or is this a regression introduced by this commit?

@zero9178
Copy link
Member

zero9178 commented Aug 5, 2025

Could it be that the root cause will be fixed with #151847 ?

@matthias-springer
Copy link
Member Author

it clears out the properties

The fact that this happens only with unregistered operations hints at a deeper MLIR bug. This part of the dialect conversion makes no assumptions about whether an op is registered or not. Can you check if the issue is fixed with #151847, as @zero9178 suggested?

@rupprecht
Copy link
Collaborator

it clears out the properties

The fact that this happens only with unregistered operations hints at a deeper MLIR bug. This part of the dialect conversion makes no assumptions about whether an op is registered or not. Can you check if the issue is fixed with #151847, as @zero9178 suggested?

Yes, it does. Thanks @brnorris03 for the fix!

@tomnatan30
Copy link
Contributor

tomnatan30 commented Aug 8, 2025

Hey @matthias-springer!

It seems that this PR has caused an tsan failure related to Shardy verification.

The issue seems to be a race condition originating in verifyOnExit where it verifies ops in parallel: parallelForEach(op.getContext(), opsWithIsolatedRegions, [&](Operation *o){...});. The ops it runs over are all ops that are marked w/ the IsIsolatedFromAbove trait. For a given set of ops, we sometimes have the race:

Read: ManualComputationOp::verify() calls getOperation()->getParentOfType<ModuleOp>() to construct a SymbolTable.
Write: ChloLegalizeToHighLevelMhloPass attempts to legalize during dialect conversion, and one of the attempts in legalizeWithFold fails. What the PR did was change this to be more hermetic by undo-ing the side effects of the failed fold. One of the things is does is set the location.

For some context, Shardy uses symbols to define top level MeshOps, then attributes (either discardable or properties of SDY ops) reference the mesh in TensorShardingAttr. The SDY op that has IsIsolatedFromAbove trait and references the mesh symbols is ManualComputationOp. In our verifiers we need access to the ModuleOp to get a symbol table for finding the mesh symbols.

IIUC, we aren't violating the constraints of IsIsolatedFromAbove, since it only refers to values used in the regions of the op, and we simply reference symbols in attributes. However, is it not allowed to access a parent op (ModuleOp) in the verification of a nested op?

A potential solution is to mark our ops as SymbolUserOpInterface and use verifySymbolUses() instead of verify() when we need the symbol table. We're happy to make that change, but I first want to better understand the issue and whether this is the right solution. Note that we can only do this for SDY ops, not for ops we don't own that can have a TensorShardingAttr attached as a discardable attr and verified in SdyDialect::verifyOperationAttribute.

@matthias-springer
Copy link
Member Author

I am missing some context here. Is the folder-undo modifying the module? What is the race condition here? And does the verifier run during the dialect conversion? That seems a bit unusual.

However, is it not allowed to access a parent op (ModuleOp) in the verification of a nested op?

What's not allowed: Accessing the parent op (ModuleOp) in a pass that operates on a nested op (function, etc.). That can cause race conditions because the pass processes the functions in parallel. (Maybe just reading is fine, but there seems to be both read + write here.) I'm not quite sure what that means for the design of a verifier.

SymbolUserOpInterface sounds like the right approach to me. For reference, see https://reviews.llvm.org/D89512: one of the reason why this interface was added was to avoid race conditions.

@tomnatan30
Copy link
Contributor

tomnatan30 commented Aug 8, 2025

Thanks for the quick response!

The race is a read of MLIRContext *getContext() { return location->getContext(); } vs a write in void setLoc(Location loc) { location = loc; }. It could be the case, for instance, that the new location being written has a pointer to the same context. In which case there is a true race on location, but there's no observable difference.

Accessing the parent op (ModuleOp) in a pass that operates on a nested op (function, etc.)

This definitely makes sense, but we are accessing it in the verify method of an op, not in the pass directly.

And does the verifier run during the dialect conversion?

I'm not sure about this TBH, the pass is here

Using SymbolUserOpInterface does solve the problem, and might actually be more efficient. See PR: openxla/shardy#659

However, as I mentioned above, we can't do this for verification of TensorShardingAttr as a discardable attr: see SdyDialect::verifyOperationAttribute. Maybe that's fine as that is invoked differently to OpTy::verify?

@matthias-springer
Copy link
Member Author

It could be the case, for instance, that the new location being written has a pointer to the same context. In which case there is a true race on location, but there's no observable difference.

The context should always be the same. So indeed no observable difference.

However, as I mentioned above, we can't do this for verification of TensorShardingAttr as a discardable attr: see SdyDialect::verifyOperationAttribute. Maybe that's fine as that is invoked differently to OpTy::verify?

I'm not sure how verifyOperationAttribute is hooked up and still don't fully understand why there is a race in the first place. Given that switching to SymbolUserOpInterface fixes the issue for now, I'd go with that. (Whether this is worth investigating further is up to you. I don't see any immediate problem in the code.)

@tomnatan30
Copy link
Contributor

Hey Matthias,

The issue isn't fully resolved it seems. Now we see a similar issue with verifyOperationAttribute

This doesn't seem like an issue with Shardy verification, but maybe an issue with Dialect Conversion? (still related to ChloLegalizeToHighLevelMhloPass)

@matthias-springer
Copy link
Member Author

Can you post the stack traces for the READ and WRITE?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang Flang issues not falling into any other category mlir:core MLIR Core Infrastructure mlir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants