-
Notifications
You must be signed in to change notification settings - Fork 317
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
Bump LLVM to 10407be542aeb2b59477b167bbba3716538dc722. #7550
Conversation
Opening this now, because I want to get some eyes on it. This is mostly a benign bump, but one thing has merged upstream that affects SystemC: llvm/llvm-project#91475. More discussion here: https://discourse.llvm.org/t/psa-modelling-memory-of-emitc-variables/80556. Concretely, the only thing I saw that effects our tests is this: circt/test/Target/ExportSystemC/basic.mlir Line 153 in 6743073
emitc.apply "&" now requires an lvalue type for its operand. I'm curious what @maerhart thinks... it's been a while since I looked at the SystemC dialect, but it looks like we have our own ops for modeling lvalues (systemc.cpp.variable, systemc.cpp.assign, etc.). I'm not sure how far we want to go to down the road of compatibility with EmitC dialect's lvalues. Perhaps systemc.cpp.variable's result type could be an lvalue type, and the destination of systemc.cpp.assign could be an lvalue type. Or we could start using the upstream EmitC ops instead. I took a brief look at the former, but decided it would be best to let the experts weigh in so I've sent this PR as-is. The in-tree CI should pass, but I'm not sure if there are deeper things to consider. FYI I will now be on vacation for a week, so please feel free to pick this up while I'm out or chat with @dtzSiFive who has offered to help with LLVM bumps. |
Thanks @mikeurbach I can take care of this on Friday if nobody else has picked it up until then. |
That would be great, thank you! |
This reverts commit d7e247b.
After taking a closer look at the current state of EmitC, I noticed that EmitC in its current state is quite locked down and doesn't like to be mixed with other dialects. For example, the lvalue type verifies that the nested type is an emitc type and many operations do the same. This means, it is not possible to have a custom type representing some C struct (or even C++ class) explicitly rather than via the opaque type and directly use it with the emitc operations and types.
I think option 2 is the most promising one because it keeps both the SystemC and EmitC dialects simple and separate. Given the frequent upstream changes this will help with downstream integration. It also leads to a clear boundary between the SystemC/C++ and the C parts. Let me know what you think. To unblock this bump, I'll just untangle the tests a bit such that the systemc and emitc parts are more separated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for updating initial op lowering. Interesting that unrealized_conversion cast is removed even whey cast is not introduced by dialect conversion.
Standard LLVM version update.