-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rollup of 5 pull requests #124241
Rollup of 5 pull requests #124241
Conversation
…cjgillot Add an intrinsic for `ptr::from_raw_parts(_mut)` Fixes rust-lang#123174 cc `@CAD97` `@saethlin` r? `@cjgillot` As suggested in rust-lang#123190 (comment), this adds a new `AggregateKind::RawPtr` for creating a pointer from its data pointer and its metadata. That means that `slice::from_raw_parts` and friends no longer need to hard-code pointer layout into `libcore`, and because it no longer does union hacks the MIR is shorter and more amenable to optimizations.
cleanup: unnecessary clone during lower generics args
…ifest, r=Mark-Simulacrum Add gnullvm targets to manifest Fixes an oversight from rust-lang#121712
remove from reviewers not gonna be around for a few weeks
Move some tests r? `@petrochenkov`
@bors r+ rollup=never p=5 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 1b3fba066c In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (fb89862): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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 sizeResultsThis 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: 674.072s -> 671.331s (-0.41%) |
@rust-timer build 9272ac8 |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (9272ac8): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDInstruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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 sizeResultsThis 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: 674.072s -> 673.108s (-0.14%) |
How meaningful are the runtime benchmarks these days? There's three improvements to runtime benchmarks, which would fit with this letting LLVM optimize more, thus also taking more instructions. The IR we give to LLVM is actually substantially simpler with that PR https://rust.godbolt.org/z/EeT3K9q8M Before: %"core::ptr::metadata::PtrComponents<[i32]>" = type { ptr, i64 }
%"core::ptr::metadata::PtrRepr<[i32]>" = type { [2 x i64] }
define { ptr, i64 } @demo(ptr noundef %p, i64 noundef %n) unnamed_addr #0 {
%_6 = alloca %"core::ptr::metadata::PtrComponents<[i32]>", align 8
%_5 = alloca %"core::ptr::metadata::PtrRepr<[i32]>", align 8
call void @llvm.lifetime.start.p0(i64 16, ptr %_5)
call void @llvm.lifetime.start.p0(i64 16, ptr %_6)
store ptr %p, ptr %_6, align 8
%0 = getelementptr inbounds i8, ptr %_6, i64 8
store i64 %n, ptr %0, align 8
%1 = load ptr, ptr %_6, align 8, !noundef !3
%2 = getelementptr inbounds i8, ptr %_6, i64 8
%3 = load i64, ptr %2, align 8, !noundef !3
store ptr %1, ptr %_5, align 8
%4 = getelementptr inbounds i8, ptr %_5, i64 8
store i64 %3, ptr %4, align 8
call void @llvm.lifetime.end.p0(i64 16, ptr %_6)
%_3.0 = load ptr, ptr %_5, align 8, !noundef !3
%5 = getelementptr inbounds i8, ptr %_5, i64 8
%_3.1 = load i64, ptr %5, align 8, !noundef !3
call void @llvm.lifetime.end.p0(i64 16, ptr %_5)
%6 = insertvalue { ptr, i64 } poison, ptr %_3.0, 0
%7 = insertvalue { ptr, i64 } %6, i64 %_3.1, 1
ret { ptr, i64 } %7
} After: define { ptr, i64 } @demo(ptr noundef %p, i64 noundef %n) unnamed_addr #0 {
start:
%0 = insertvalue { ptr, i64 } poison, ptr %p, 0
%1 = insertvalue { ptr, i64 } %0, i64 %n, 1
ret { ptr, i64 } %1
} (Godbolt is still on 04-20 nightly at time of posting, so I had to generate that after locally, but the link above should show it soon™.) |
I would believe the runtime instruction counts (not cycles though) results, it looks like a small improvement. |
Successful merges:
ptr::from_raw_parts(_mut)
#123840 (Add an intrinsic forptr::from_raw_parts(_mut)
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup