-
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
Delete Rvalue::Len
🎉
#134330
Delete Rvalue::Len
🎉
#134330
Conversation
// actual = len(place) | ||
self.cfg.push_assign(block, source_info, actual, Rvalue::Len(place)); | ||
let actual = self.len_of_slice_or_array(block, place, test.span, source_info); |
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.
One functional change here, reusing this helper from #133734
mir! { | ||
{ | ||
let x = [5_i32; C]; | ||
let c = Len(x); |
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 was here testing the custom-mir Len
, which is removed here, so I deleted the test.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
761e299
to
db4e734
Compare
☔ The latest upstream changes (presumably #134332) made this pull request unmergeable. Please resolve the merge conflicts. |
db4e734
to
cb58432
Compare
This comment has been minimized.
This comment has been minimized.
Everything's moved to `PtrMetadata` instead.
cb58432
to
29889fd
Compare
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 This PR changes MIR cc @oli-obk, @RalfJung, @JakobDegen, @davidtwco, @celinval, @vakaras Some changes occurred to the CTFE machinery cc @rust-lang/wg-const-eval Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
Discussion of this was here for anyone wondering: https://rust-lang.zulipchat.com/#narrow/channel/189540-t-compiler.2Fwg-mir-opt/topic/.60RValue.3A.3ALen.60.20vs.20.60UnOp.3A.3APtrMetadata.60 @bors r+ rollup=iffy |
☀️ Test successful - checks-actions |
Finished benchmarking commit (e108481): 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 1.1%, secondary -1.5%)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 4.5%, secondary 3.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.
Binary sizeResults (primary 0.1%, secondary 0.0%)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.312s -> 763.813s (-0.20%) |
More improvements than regressions. @rustbot label: +perf-regression-triaged |
Propagated form rust-lang/rust#134330. `RValue::Len(place)` is still present in StableMIR, so we translate it back to MIR as `PtrMetadata(Copy(place))`.
Propagated form rust-lang/rust#134330. `RValue::Len(place)` is still present in StableMIR, so we translate it back to MIR as `PtrMetadata(Copy(place))`.
Propagated form rust-lang/rust#134330. `RValue::Len(place)` is still present in StableMIR, so we translate it back to MIR as `PtrMetadata(Copy(place))`.
Everything's moved to
PtrMetadata
, so we can get rid of theLen
variant now.Depends on #134326, so draft until that landsReady!r? mir