-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Let CTFE to handle partially uninitialized unions without marking the entire value as uninitialized. #94527
Conversation
@bors r+ @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
📌 Commit 66a1d3d02ea0c3473163301fcd1d31b2fbd0fba6 has been approved by |
This comment has been minimized.
This comment has been minimized.
@bors r- oops |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit efa7539866423e0fd1ca420730ece30204dd8b74 with merge d8d9e85406dc30f48aa6825ae48eb8f7c366efea... |
This comment has been minimized.
This comment has been minimized.
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
Bors didn't seem to react? |
⌛ Trying commit 837ac8d340aa2ce177277ddd8e0c1e2f7ffa1f5c with merge 124a62c1537d6f500769f854b7e6d193479561a9... |
So from what I can tell this is entirely unconnected to the logic in #93670? We might not want to emit |
First I want to see if it is feasible to go this route, then we can talk to the llvm people. I do believe we should be able to use it at some point, but it may very well be badly handled by llvm for now. The linked PR works on types, where this PR encodes the information in the layout. So there may be unintended consequences. For now we should probably only use it in miri. Maybe we should also flip the logic of the Boolean and search for a better name ( |
☀️ Try build successful - checks-actions |
…lly initialized scalars can special case them.
…calar layout, allowing partially initializing them
@bors r=nagisa,erikdesjardin |
📌 Commit d57b755 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (f262ca1): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Footnotes |
test that partially uninit MaybeUninit works correctly This got finally fixed by rust-lang/rust#94527 :)
interp/validity: enforce Scalar::Initialized This is a follow-up to rust-lang#94527, to also account for the new kind of `Scalar` layout inside the validity checker. r? `@oli-obk`
`UnsafeCell` blocks niches inside its nested type from being available outside fixes rust-lang#87341 This implements the plan by `@eddyb` in rust-lang#87341 (comment) Somewhat related PR (not strictly necessary, but that cleanup made this PR simpler): rust-lang#94527
`UnsafeCell` blocks niches inside its nested type from being available outside fixes rust-lang#87341 This implements the plan by ``@eddyb`` in rust-lang#87341 (comment) Somewhat related PR (not strictly necessary, but that cleanup made this PR simpler): rust-lang#94527
`UnsafeCell` blocks niches inside its nested type from being available outside fixes rust-lang#87341 This implements the plan by `@eddyb` in rust-lang#87341 (comment) Somewhat related PR (not strictly necessary, but that cleanup made this PR simpler): rust-lang#94527
`UnsafeCell` blocks niches inside its nested type from being available outside fixes rust-lang#87341 This implements the plan by `@eddyb` in rust-lang#87341 (comment) Somewhat related PR (not strictly necessary, but that cleanup made this PR simpler): rust-lang#94527
follow up to #94411
To fix #69488 and by extension fix #94371, we should stop treating types like
MaybeUninit<usize>
as something that theScalar
type in the interpreter engine can represent. So we add a new field toabi::Primitive
that records whether the primitive is nested in a unioncc @RalfJung
r? @ghost