-
Notifications
You must be signed in to change notification settings - Fork 53
rustup: update to nightly-2025-05-09
(~1.88) and Rust 2024 edition.
#249
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
base: main
Are you sure you want to change the base?
Conversation
88fd99e
to
554d850
Compare
…allowing libcore to build.
Thanks for getting us up to the newest versions! 🎉 |
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.
Some minor comments. I liked how many of your changes are better than mine ha. Only rejecting so it doesn't merge and others can review.
@@ -276,6 +317,12 @@ mod maybe_pqp_cg_ssa; | |||
|
|||
println!("cargo::rustc-check-cfg=cfg(rustc_codegen_spirv_disable_pqp_cg_ssa)"); | |||
|
|||
// HACK(eddyb) `if cfg!(llvm_enzyme)` added upstream for autodiff support. | |||
println!("cargo::rustc-check-cfg=cfg(llvm_enzyme)"); |
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.
Oh cool, I didn't know you could put those here.
ty::Bool => { | ||
// HACK(eddyb) we can't bypass e.g. `Option<bool>` being a byte, | ||
// due to `core` PR https://github.com/rust-lang/rust/pull/138881 | ||
// (which adds a new `transmute`, from `ControlFlow<bool>` to `u8`). |
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.
Should we fix / backout stuff upstream?
// --- Attempt GEP Merging Path --- | ||
|
||
// Check if the base pointer `ptr` itself was the result of a previous | ||
// AccessChain instruction. Merging is only attempted if the input type `ty` | ||
// matches the pointer's actual underlying pointee type `original_pointee_ty`. | ||
// If they differ, merging could be invalid. | ||
// HACK(eddyb) always attempted now, because we `pointercast` first, which: |
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.
Just update the comment rather than having a new comment modify...we have git 😄
@@ -908,12 +910,21 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { | |||
// 2. The *last* index of the original AccessChain is a constant. | |||
// 3. The *first* index (`ptr_base_index`) of the *current* GEP is a constant. | |||
// Merging usually involves adding these two constant indices. | |||
// | |||
// FIXME(eddyb) the above comment seems inaccurate, there is no reason |
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.
Again, just fix or delete the comment.
self.constant_u64(self.span(), u64::MAX >> 1), | ||
), | ||
_ => bug!("copysign must have width 32 or 64, not {}", width), | ||
let [mask_sign, mask_value] = { |
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 seems a lot more obtuse than the previous code.
This PR supersedes (and includes many of the changes from):
nightly-2025-04-28
#246This brings us 4 whole Rust releases ahead, to a 1.88-equivalent nightly.
(Rust 1.88.0 stable will be released on June 26th, 2025)
The many commits exist in part because of nightly bisection (to find
nightly-2024-12-16
, containing the GEP array change), but also because there have been several changes of note:unknown
unknown
component in e.g.spirv-unknown-vulkan1.1
is the vendor, whereas the OS isnone
and omitted in the "triple")maybe_inbounds_gep
had to be made more flexible, due to:Modifies the index instruction from
gep [0 x %Type]
togep %Type
rust-lang/rust#134117pointercast
first, which can itself produce a "first element of array" GEP that can then be merged with an "intra-array indexing GEP")f16
/f128
required some stubbing out (i.e. intrinsics)f16
, but I've not attempted that in this PRbool
(i.e. makingOption<bool>
byte-sized), due atransmute
(fromControlFlow<bool>
tou8
) added tocore::cmp
in:Use the chaining methods on PartialOrd for slices too rust-lang/rust#138881
Option<bool>
ever worked in Rust-GPU (the comments I found are confusing, I thought it had users and/or tests, but maybe not)rustc_codegen_ssa
patching)rustc_codegen_ssa
patching (akapqp_cg_ssa
). #182)rustc_codegen_spirv
had to be switched to the Rust 2024 edition (asrustc_codegen_ssa
had done the same upstream)#[repr(simd)]
(using individualstruct
fields) has had even more support ripped out upstreamrustc_codegen_ssa::back
(i.e.object
) required more patching to remove their use sitesobject
, breakingextern crate object;
(as it may load the wrong version)nightly-2025-04-28
#246(before all the other issues were discovered through testing)
While not necessary, this (just like #246) includes a full migration of the entire workspace to Rust 2024 (leading to lots of
unsafe {...}
inunsafe fn
s inspirv-std
, mainly) - we can split that out if it seems better, but I at least tried to keep it in its own commit.