| Issue |
61578
|
| Summary |
[MLIR]`-mlir-print-ir-module-scope -mlir-print-ir-before` leads to assertions "IR printing can't be setup on a pass-manager without disabling multi-threading first"
|
| Labels |
|
| Assignees |
|
| Reporter |
BealZephyr
|
Test on commit: https://github.com/llvm/llvm-project/commit/c8af0d3cea8cab9277651f8cabe54e2f1a3b167f
steps to reproduce:
```
mlir-opt -mlir-print-ir-module-scope -mlir-print-ir-before=cse test.mlir
```
test case:
```
module {
}
```
crash trace:
```
LLVM ERROR: IR printing can't be setup on a pass-manager without disabling multi-threading first.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /home/ty/llvm-project/build/bin/mlir-opt -mlir-print-ir-module-scope -mlir-print-ir-before=cse test.mlir
#0 0x0000557f9ce1b95a llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/ty/llvm-project/build/bin/mlir-opt+0x22495a)
#1 0x0000557f9ce18bec SignalHandler(int) Signals.cpp:0:0
#2 0x00007f023bfb2980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#3 0x00007f023b0aae87 raise /build/glibc-CVJwZb/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#4 0x00007f023b0ac7f1 abort /build/glibc-CVJwZb/glibc-2.27/stdlib/abort.c:81:0
#5 0x0000557f9ce3529d llvm::report_fatal_error(llvm::Twine const&, bool) (/home/ty/llvm-project/build/bin/mlir-opt+0x23e29d)
#6 0x0000557f9ce35418 (/home/ty/llvm-project/build/bin/mlir-opt+0x23e418)
#7 0x0000557f9e7121cf mlir::PassManager::enableIRPrinting(std::unique_ptr<mlir::PassManager::IRPrinterConfig, std::default_delete<mlir::PassManager::IRPrinterConfig>>) (/home/ty/llvm-project/build/bin/mlir-opt+0x1b1b1cf)
#8 0x0000557f9e71240d mlir::PassManager::enableIRPrinting(std::function<bool (mlir::Pass*, mlir::Operation*)>, std::function<bool (mlir::Pass*, mlir::Operation*)>, bool, bool, bool, llvm::raw_ostream&, mlir::OpPrintingFlags) (/home/ty/llvm-project/build/bin/mlir-opt+0x1b1b40d)
#9 0x0000557f9e6fb7ca mlir::applyPassManagerCLOptions(mlir::PassManager&) (/home/ty/llvm-project/build/bin/mlir-opt+0x1b047ca)
#10 0x0000557f9e6e5bef performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#11 0x0000557f9e6e6441 processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::MlirOptMainConfig const&, mlir::DialectRegistry&, llvm::ThreadPool*) MlirOptMain.cpp:0:0
#12 0x0000557f9e6e6631 mlir::LogicalResult llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::'lambda'(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#13 0x0000557f9e7b0550 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool) (/home/ty/llvm-project/build/bin/mlir-opt+0x1bb9550)
#14 0x0000557f9e6e1753 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/home/ty/llvm-project/build/bin/mlir-opt+0x1aea753)
#15 0x0000557f9e6e3f7e mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&, bool) (/home/ty/llvm-project/build/bin/mlir-opt+0x1aecf7e)
#16 0x0000557f9cde7ac0 main (/home/ty/llvm-project/build/bin/mlir-opt+0x1f0ac0)
#17 0x00007f023b08dc87 __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:344:0
#18 0x0000557f9cdfa91a _start (/home/ty/llvm-project/build/bin/mlir-opt+0x20391a)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs