[Mlir-commits] [mlir] [mlir][core] in -mlir-print-ir-*, dump the pass options as well (PR #195198)

Mehdi Amini llvmlistbot at llvm.org
Tue May 5 01:39:43 PDT 2026


================
@@ -315,8 +317,19 @@ struct FileTreeIRPrinterConfig : public PassManager::IRPrinterConfig {
                             PrintCallbackFn printCallback) final {
     if (!shouldPrintBeforePass || !shouldPrintBeforePass(pass, operation))
       return;
-    std::unique_ptr<llvm::ToolOutputFile> file = createTreePrinterOutputPath(
-        operation, pass->getArgument(), treeDir, counters);
+
+    SmallVector<std::pair<std::string, std::string>> opAndSymbolNames;
+    std::string fileName;
+    {
+      std::lock_guard<std::mutex> lock(mutex);
----------------
joker-eph wrote:

Seems like an existing bug? Let's pull this in its own PR please. 

I'm also concerned that the mutex is actually technically fixing a race while keeping the behavior not deterministic. Do you have the backtrace of the race condition failure? Or which test was failing? I can try to run TSAN locally.

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


More information about the Mlir-commits mailing list