-
Notifications
You must be signed in to change notification settings - Fork 78
Update to nightly-2021-09-11 #79
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
Conversation
Responsibility of implementing the black box is now lies on backend
No changes needed, apparently
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.
Thanks!
(There are not enough hours in the day) I have good news, bad news, and bad news (it's midnight and I'm a little bit unimaginative at midnights; I'll catch up another day). Good news: I've been able to verify that the Bad news: running codegen tests in requires being able to save intermediate artifacts to a file (judging by this). I haven't find a way to save GIMPLE to a separate file, or anywhere but stderr. (I checked your fork as well). Related to #81. Bad news: |
I think it should be changed to only do so when AVX-512 is actually enabled for the current function I think. It makes sense that GCC doesn't allow it when AVX-512 isn't enabled. I am slightly suprised that LLVM does allow it. cc @Amanieu.
The actual code for this is https://github.com/rust-lang/rust/blob/3ed6c1d23fd40f4367259a531465e809eb00ec27/compiler/rustc_target/src/asm/mod.rs#L802 which does indeed have k1-k7. Guess the docs need to be updated. |
Yes, LLVM simply ignores any invalid clobbers. So for GCC you would just have to gate the clobbers based on what target features are enabled. |
Note that this only applies to clobbers, LLVM still requires outputs (even dummy ones) to be valid registers for the current target. This is the code that handles this in the LLVM codegen backend: https://github.com/rust-lang/rust/blob/master/compiler/rustc_codegen_llvm/src/asm.rs#L175 |
I think this was wrong. We can just check features provided by the frontend as suggested by @Amanieu . |
@Commeownist: Is it okay for you if I fix the remaining reviews in order to merge this PR? I'd like to merge it soon to update the PR in rustc to move things forward. |
@antoyo Cool. |
@antoyo I've resolved reviews (except I'd like to leave the TODO comment) and updated to I'll leave codegen tests for another day. |
There's an error in the CI which seems unrelated: it's about the bootstrap. |
@antoyo Are you sure that
|
I suspect it's related to those wonderful |
Does this work locally? Perhaps the CI is having issue… |
Rustc uses a nightly rustfmt instead of the version associated with the bootstrap compiler. I don't quite remember why though. |
Bootstrap failed due to a new warning about an unused field that doesn't exist on beta. You could add Line 150 in 8ec7976
|
@antoyo Ready |
Thanks! |
There are quite a few changes in rustc I had to address, most notably
black_box
is now a backend-driven intrinsic. No more hacks forllvm_asm
!I haven't yet looked at the codegen tests: no spare time, sorry. Hopefully, this evening.