Issue |
132856
|
Summary |
[mlir] LLVM ERROR: emitc created with unregistered dialect
|
Labels |
mlir
|
Assignees |
|
Reporter |
wwy6191
|
git version: 59fd2878fce470f02058f43d4b818ed68ce04094
system: `Ubuntu 18.04.6 LTS`
reproduce with: `mlir-opt a.mlir`
a.mlir:
```
module {
func.func @positive() -> i32 {
%0 = "emitc"() <{value = 2 : i64}> : () -> i32
return %0 : i32
}
func.func private @mlirAsm(%arg0: i32) -> i32 {
%0 = "emitc.constant"() <{value = 5 : i64}> : () -> i64
%1 = emitc.cast %arg0 : i32 to ui32
%2 = emitc.cast %0 : i64 to ui32
%3 = emitc.add %1, %2 : (ui32, ui32) -> ui32
%4 = emitc.cast %3 : ui32 to i32
return %4 : i32
}
}
```
stack trace:
```
LLVM ERROR: emitc created with unregistered dialect. If this is intended, please call allowUnregisteredDialects() on the MLIRContext, or use -allow-unregistered-dialect with the MLIR tool used.
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-project/install/bin/mlir-opt /data/szy/MLIR/seed/seed18/tmp.wjmwJaZvlp.mlir
1. MLIR Parser: custom op parser 'builtin.module'
2. MLIR Parser: custom op parser 'func.func'
#0 0x000056484d9d2db8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x11bddb8)
#1 0x000056484d9d08be llvm::sys::RunSignalHandlers() (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x11bb8be)
#2 0x000056484d9d3736 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x00007f43b4174420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#4 0x00007f43b37b100b raise /build/glibc-LcI20x/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#5 0x00007f43b3790859 abort /build/glibc-LcI20x/glibc-2.31/stdlib/abort.c:81:7
#6 0x000056484d9b9b17 llvm::report_fatal_error(llvm::Twine const&, bool) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x11a4b17)
#7 0x0000564850b7b0fd (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x43660fd)
#8 0x0000564850b7a884 mlir::Operation::create(mlir::Location, mlir::OperationName, mlir::TypeRange, mlir::ValueRange, mlir::DictionaryAttr, mlir::OpaqueProperties, mlir::BlockRange, unsigned int) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x4365884)
#9 0x0000564850b7a417 mlir::Operation::create(mlir::Location, mlir::OperationName, mlir::TypeRange, mlir::ValueRange, mlir::NamedAttrList&&, mlir::OpaqueProperties, mlir::BlockRange, mlir::RegionRange) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x4365417)
#10 0x0000564850b7a2d4 mlir::Operation::create(mlir::OperationState const&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x43652d4)
#11 0x0000564850ac0b20 mlir::OpBuilder::create(mlir::OperationState const&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x42abb20)
#12 0x0000564853b3de13 (anonymous namespace)::OperationParser::parseGenericOperation() Parser.cpp:0:0
#13 0x0000564853b3b475 (anonymous namespace)::OperationParser::parseOperation() Parser.cpp:0:0
#14 0x0000564853b469a4 (anonymous namespace)::OperationParser::parseBlock(mlir::Block*&) Parser.cpp:0:0
#15 0x0000564853b446d5 (anonymous namespace)::OperationParser::parseRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::Argument>, bool) Parser.cpp:0:0
#16 0x0000564853b42acc (anonymous namespace)::CustomOpAsmParser::parseOptionalRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::Argument>, bool) Parser.cpp:0:0
#17 0x0000564853c44e32 mlir::function_interface_impl::parseFunctionOp(mlir::OpAsmParser&, mlir::OperationState&, bool, mlir::StringAttr, llvm::function_ref<mlir::Type (mlir::Builder&, llvm::ArrayRef<mlir::Type>, llvm::ArrayRef<mlir::Type>, mlir::function_interface_impl::VariadicFlag, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)>, mlir::StringAttr, mlir::StringAttr) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x742fe32)
#18 0x000056484e0557fa mlir::func::FuncOp::parse(mlir::OpAsmParser&, mlir::OperationState&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x18407fa)
#19 0x0000564853b3b7e4 (anonymous namespace)::OperationParser::parseOperation() Parser.cpp:0:0
#20 0x0000564853b469a4 (anonymous namespace)::OperationParser::parseBlock(mlir::Block*&) Parser.cpp:0:0
#21 0x0000564853b446d5 (anonymous namespace)::OperationParser::parseRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::Argument>, bool) Parser.cpp:0:0
#22 0x0000564850af9b9e mlir::ModuleOp::parse(mlir::OpAsmParser&, mlir::OperationState&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x42e4b9e)
#23 0x0000564853b3b7e4 (anonymous namespace)::OperationParser::parseOperation() Parser.cpp:0:0
#24 0x0000564853b3a5ad mlir::parseAsmSourceFile(llvm::SourceMgr const&, mlir::Block*, mlir::ParserConfig const&, mlir::AsmParserState*, mlir::AsmParserCodeCompleteContext*) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x73255ad)
#25 0x00005648509d9f0f mlir::parseSourceFile(std::shared_ptr<llvm::SourceMgr> const&, mlir::Block*, mlir::ParserConfig const&, mlir::LocationAttr*) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x41c4f0f)
#26 0x00005648509d8e8e mlir::parseSourceFileForTool(std::shared_ptr<llvm::SourceMgr> const&, mlir::ParserConfig const&, bool) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x41c3e8e)
#27 0x00005648509d867f performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#28 0x00005648509d83ed 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
#29 0x0000564850a83275 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-project/install/bin/mlir-opt+0x426e275)
#30 0x00005648509d2405 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x41bd405)
#31 0x00005648509d26af mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x41bd6af)
#32 0x00005648509d29de mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x41bd9de)
#33 0x000056484d9b1337 main (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x119c337)
#34 0x00007f43b3792083 __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:342:3
#35 0x000056484d9b0e9e _start (/data/szy/MLIR/llvm-project/install/bin/mlir-opt+0x119be9e)
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs