Conversation
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Prepare NonNull for pattern types
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (ea5f33e): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -0.7%, secondary 8.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 0.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 481.396s -> 480.639s (-0.16%) |
|
☔ The latest upstream changes (presumably #148190) made this pull request unmergeable. Please resolve the merge conflicts. |
| let pointer: *const T = crate::ptr::without_provenance(addr.get()); | ||
| // SAFETY: we know `addr` is non-zero. | ||
| unsafe { NonNull { pointer } } | ||
| unsafe { NonNull { pointer: transmute(pointer) } } |
There was a problem hiding this comment.
up to you: if this is going to transmute anyway, maybe just transmute directly to NonNull?
Going through the usize then the pointer then the aggregate doesn't seem particularly meaningful; maybe just go straight NonZero→NonNull if there needs to be a transmute here regardless?
| #[no_mangle] | ||
| pub fn load_box<'a>(x: Box<Box<i32>>) -> Box<i32> { | ||
| // CHECK: load ptr, ptr %{{.*}}, align [[PTR_ALIGNMENT]], !nonnull !{{[0-9]+}}, !align ![[ALIGN_4_META]], !noundef !{{[0-9]+}} | ||
| // CHECK: load ptr, ptr %{{.*}}, align [[PTR_ALIGNMENT]], !nonnull !{{[0-9]+}}, !noundef !{{[0-9]+}} |
There was a problem hiding this comment.
Hmm, if this is showing up here with just the nonnull change it looks like whatever emits this !align needs an update to see through pattern types, maybe?
Pull out the changes that affect some tests, but do not require pattern types.
See #136006 (comment) for what triggered this PR
r? @scottmcm