| Issue |
108159
|
| Summary |
[mlir][openmp] -convert-openmp-to-llvm crashes
|
| Labels |
|
| Assignees |
|
| Reporter |
axeabc
|
git version: 761bf333e378b52614c
system: `Ubuntu 18.04.6 LTS`
reproduce with: `mlir-opt -convert-openmp-to-llvm a.mlir`
a.mlir:
```
func.func @omp_target_update_data_depend(%a: memref<?xf32>) {
%0 = omp.map.info var_ptr(%a: memref<?xf32>, tensor<?xf32>) map_clauses(to) capture(ByRef) -> memref<?xf32>
omp.target_update map_entries(%0: memref<?xf32>) {
omp.terminator
}
return
}
```
stack trace:
```
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt -convert-openmp-to-llvm a.mlir
#0 0x0000562eb81ab128 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x10d7128)
#1 0x0000562eb81a8c3e llvm::sys::RunSignalHandlers() (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x10d4c3e)
#2 0x0000562eb81ababd SignalHandler(int) Signals.cpp:0:0
#3 0x00007f98e9647420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#4 0x0000562ebb45fcd3 mlir::Type::getContext() const (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x438bcd3)
#5 0x0000562ebb387f28 mlir::TypeAttr::get(mlir::Type) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x42b3f28)
#6 0x0000562ebab99432 (anonymous namespace)::MapInfoOpConversion::matchAndRewrite(mlir::omp::MapInfoOp, mlir::omp::MapInfoOpAdaptor, mlir::ConversionPatternRewriter&) const OpenMPToLLVM.cpp:0:0
#7 0x0000562ebab99122 mlir::ConvertOpToLLVMPattern<mlir::omp::MapInfoOp>::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::Value>, mlir::ConversionPatternRewriter&) const (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x3ac5122)
#8 0x0000562ebb2fbb11 mlir::ConversionPattern::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x4227b11)
#9 0x0000562ebdc86c91 void llvm::function_ref<void ()>::callback_fn<mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>)::$_0>(long) PatternApplicator.cpp:0:0
#10 0x0000562ebdc8394b mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x6baf94b)
#11 0x0000562ebb2fcb53 (anonymous namespace)::OperationLegalizer::legalize(mlir::Operation*, mlir::ConversionPatternRewriter&) DialectConversion.cpp:0:0
#12 0x0000562ebb2fbbb7 mlir::OperationConverter::convert(mlir::ConversionPatternRewriter&, mlir::Operation*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x4227bb7)
#13 0x0000562ebb2fcd7f mlir::OperationConverter::convertOperations(llvm::ArrayRef<mlir::Operation*>) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x4228d7f)
#14 0x0000562ebb30496b mlir::applyPartialConversion(mlir::Operation*, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x423096b)
#15 0x0000562ebab97395 (anonymous namespace)::ConvertOpenMPToLLVMPass::runOnOperation() OpenMPToLLVM.cpp:0:0
#16 0x0000562ebb29d2d6 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x41c92d6)
#17 0x0000562ebb29dc40 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x41c9c40)
#18 0x0000562ebb2a0282 mlir::PassManager::run(mlir::Operation*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x41cc282)
#19 0x0000562ebb298ab1 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#20 0x0000562ebb29870b llvm::LogicalResult llvm::function_ref<llvm::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&)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#21 0x0000562ebb3453a5 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x42713a5)
#22 0x0000562ebb293b35 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x41bfb35)
#23 0x0000562ebb293ddf mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x41bfddf)
#24 0x0000562ebb29410e mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x41c010e)
#25 0x0000562eb818bd67 main (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x10b7d67)
#26 0x00007f98e8c65083 __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:342:3
#27 0x0000562eb818b8ee _start (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x10b78ee)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs