-
Notifications
You must be signed in to change notification settings - Fork 302
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
[ImportVerilog] Upgrade slang to slang 5 #7212
Comments
@fabianschuiki How's this coming? (poke) |
Hi, is there any work in progress to update the version of Slang used in CIRCT? |
Not yet, but we should definitely try to do it! 😃 Since Slang is an optional feature of CIRCT, I don't think we have to care about the C++20 requirement too much. If users want Slang they'll have to have a C++20 compliant compiler. As long as our CI can run all the ImportVerilog tests, we're good 🥳 If you would like to give this a shot, try changing this line in CMakeLists.txt and see what kind of errors appear: https://github.com/llvm/circt/blob/main/CMakeLists.txt#L560 |
@fabianschuiki I spent a bunch of time getting the CI images to support C++20 when you first started (and I'm pretty sure I tested them with Slang 5) so they should be good. |
I did some initial testing at 37597be, and the required changes to compile against the current master seem pretty minor. I haven't checked
I'll take a look at that when I have time, unless somebody else beats me to it! The most annoying thing I ran into was that they (as far as I can tell) require the input buffers to be zero terminated https://github.com/MikePopoloski/slang/blob/bad0d6ba3dec20355b0156c535bbddf2f926ab37/source/parsing/Lexer.cpp#L49, which means I failed to remove the extra copying described here. |
That sounds very promising. Bumping this to v5 would certainly make @teqdruid very happy 😁 |
Any reason to prefer |
I'd be very happy with version 7 as well! 👍 |
Is anyone doing this task? If not, I can try to do it |
I've started a branch at #7792. Progress is slow, but I'm working on it every now and then when I find time. It currently works on my machine, but I'm working on getting it through CI, as compiling with |
The shared/static builds are definitely an adventure 🙈 I was originally hoping that we could statically link Slang into ImportVerilog regardless of whether CIRCT was built with dynamic or static libraries. No idea if that's reasonable or even achievable. |
I'd like to try help if it possible |
As far as I understand, that is how it works today thanks to the What I have been struggling with is that when
compared to the target when an object library is not generated:
I pushed a slightly less confusing hack to 88a8c02. |
Fantastic! Right now, the only failing CI failure is due to https://github.com/llvm/circt/blob/88a8c02fe3b75ad523c008154447c605eba6f31e/.github/workflows/shortIntegrationTests.yml running on ghcr.io/circt/images/circt-integration-test:v15.1, which does not have Feel free to help out wherever you would like, but a review of the cumulative changes in https://github.com/llvm/circt/pull/7792/files would be much appreciated. |
When slang was being added as a dep, the CI images couldn't handle C++20. They were very quickly upgraded to make them optionally use a newer clang version which supported C++20. The idea was to use slang 5 (which now supports compiling without RTTI and exceptions (IIRC) when a C++20 compiler was detected.
This hasn't happened yet.
The text was updated successfully, but these errors were encountered: