-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Temporarily bring back Rvalue::Len
#135709
Conversation
Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter cc @rust-lang/miri, @rust-lang/wg-const-eval Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred to the CTFE machinery cc @rust-lang/wg-const-eval Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 This PR changes MIR |
Let me know if y'all would like to brainstorm how to fix this properly, and let's maybe do another crater run before fully removing the operand again. Crater runs should be really quick these days. I think the right solution would be to emit some sort of special copy operation to clone the slice pointer but allow borrowck and miri to understand that we're only copying the ref to read its metadata, similarly to how we have Sorry that the test coverage was lacking; I could not have expected anyone to catch this without a failing test, but thank goodness we have beta backports :) I'll leave this open for a day or so b/c it's the weekend, but I'll likely r+ this soon thereafter. Also open to just backporting this and trying to find a fix-forward on master, though that comes with all the normal complications of that approach that I think we're all aware of. |
No worries from my end about reverting these. Definitely better to get the regression fixed. I can take a couple of simpler smaller steps on the way too, like getting Glad to hear there's a plan to get more tests here! |
☀️ Test successful - checks-actions |
Finished benchmarking commit (c62b732): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary -2.3%, secondary -1.6%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary -1.1%, secondary 1.7%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResults (primary 0.0%, secondary 0.3%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 765.901s -> 765.96s (0.01%) |
Revert @rustbot label: +perf-regression-triaged |
Those sound like promising approaches. Adding this info to |
r? @compiler-errors as requested in #135671 (comment)
Agreed. To fix the IMO P-critical #135671 for which we somehow didn't have test coverage, this PR temporarily reverts:
usize
#134371Rvalue::Len
🎉 #134330cc @scottmcm
I added the few samples from that issue as a test, but we can add more in the future, in particular it seems @steffahn will work on that.
Fixes #135671. And if we want to land this, it should also be nominated for beta backport.