-
Notifications
You must be signed in to change notification settings - Fork 163
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
Reorganize the CPU feature detection #3195
Conversation
Move the code from i386-rust.cc to i386-rust-and-jit.inc so that it can be reused by libgccjit. gcc/ChangeLog: * config/i386/i386-rust-and-jit.inc: New file. * config/i386/i386-rust.cc: Move code to i386-rust-and-jit.inc.
As discussed with you, @CohenArthur, here's the PR that will allow us to not have duplication for the CPU features detection. Some more context on the mailing list. I already tested this in rustc_codegen_gcc: you can see the libgccjit commit here. Test results:
(same on the |
cc @davidmalcolm: Is this what you had in mind? |
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.
this looks good to me @antoyo, thank you for working on this!!
Waiting for David's opinion but happy to merge this |
Yes; this looks great; thank you. |
Note that we might want to merge this once stage1 opens again @antoyo, as these aren't changes to |
@CohenArthur Given the "rust" and "jit" in the file names I think these patches can be approved by rust and jit maintainers. Given that you are the former and I'm the latter (and yes, I do approve the patch), I think you're good to go - but it should be posted to gcc-patches. |
@CohenArthur: I thought we were in stage 1 until November 18? |
Yes, but that is only in 14 days - given how long it usually takes to get reviews and considering that reviewers will be pretty busy until that day, I consider it a bit late. However, as David said, we're probably maintainers of our config files for our respective frontends, so I'm happy to push this as part of our upstreaming process and post the patch upstream |
Thanks @CohenArthur! Could you please CC me when you post this on the mailing list? |
Yes will do @antoyo! |
Move the code from i386-rust.cc to i386-rust-and-jit.inc so that it can be reused by libgccjit.
gcc/ChangeLog:
Here is a checklist to help you with your PR.
make check-rust
passes locally (it doesn't pass, but same number of failures as onmaster
)clang-format
gcc/testsuite/rust/
Since both libgccjit (via rustc_codegen_gcc) and gccrs need to do the same CPU features detection, refactor this code to avoid duplication.