-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with emitting MLIR from CIR: cir.func
gets dsolocal
attribute
#727
Comments
@ghehg looks like you missed some bits for parser support? Updated docs also seem to be lacking. Can you take a look? |
The crash dump should be irrelevant of the potential parser bug. I believe this is due to a bug in the implementation of clangir/clang/lib/CIR/Lowering/ThroughMLIR/LowerCIRToMLIR.cpp Lines 94 to 104 in 80e1a10
On line 102, the second parameter to rewriter.replaceOpWithNewOp<mlir::func::CallOp>(
op, op.getCalleeAttr(), types, adaptor.getOperands()); and then it works fine. |
This patch should resolve the crash reported in llvm#727 .
Opened a PR #728 for resolving the crash dump. The parser bug is not resolved. |
sure, looking at it now. |
This PR fixes the bug described as in #727 (comment). It should resolve the crash reported in #727 .
This PR fixes the bug described as in llvm#727 (comment). It should resolve the crash reported in llvm#727 .
This PR fixes the bug described as in llvm#727 (comment). It should resolve the crash reported in llvm#727 .
This PR fixes the bug described as in llvm#727 (comment). It should resolve the crash reported in llvm#727 .
This PR fixes the bug described as in llvm#727 (comment). It should resolve the crash reported in llvm#727 .
This PR fixes the bug described as in #727 (comment). It should resolve the crash reported in #727 .
Hi, I am trying to use ClangIR to emit MLIR code from a C file. This is simple test that already fails (called
test.c
):I built Clang from the current commit in the main branch (80e1a10). When I execute
/work/wz273176/software/clangir/bin/clang -fclangir -Xclang -fno-clangir-direct-lowering -Xclang -emit-mlir -c test.c -o test.mlir
, I get the following error:With
/work/wz273176/software/clangir/bin/clang -fclangir -Xclang -emit-cir -c test.c -o test.cir
I am able to emit the following CIR:When I now try to lower to MLIR with
/work/wz273176/software/clangir/bin/cir-opt -o test.mlir test.cir
, I get the following error:Since I cannot find
dsolocal
in the documentation forcir.func
but only in the documentation forcir.global
, my guess would be that it is mistakenly added tocir.func
. Any help is appreciated!Moritz
The text was updated successfully, but these errors were encountered: