Uh oh!
There was an error while loading. Please reload this page.
Let codegen decide when to mem::swap with immediates - #122582
Conversation
This comment has been minimized.
This comment has been minimized.
725417f to
9f992daCompareUh oh!
There was an error while loading. Please reload this page.
rustbot
commented
Mar 16, 2024
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri The Miri subtree was changed cc @rust-lang/miri |
Uh oh!
There was an error while loading. Please reload this page.
scottmcm
commented
Mar 16, 2024
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Let codegen decide when to `mem::swap` with immediates Making `libcore` decide this is silly; the backend has so much better information about when it's a good idea. Thus this PR introduces a new `typed_swap` intrinsic with a fallback body, and replaces that fallback implementation when swapping immediates or scalar pairs. r? oli-obk Replaces rust-lang#111744, and means we'll never need more libs PRs like rust-lang#111803 or rust-lang#107140
bors
commented
Mar 16, 2024
bors
commented
Mar 16, 2024
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
Uh oh!
There was an error while loading. Please reload this page.
| } | ||
| } | ||
| /// Non-overlapping *typed* swap of a single value. |
There was a problem hiding this comment.
Should it be called typed_swap_nonoverlapping?
There was a problem hiding this comment.
I went back and forth multiple times on this. typed_swap_nonoverlapping sounds to me like ptr::swap_nonoverlapping, just typed. So that would make this typed_swap_nonoverlapping_one or something, and now that's just seeming really long.
So since it's internal, I think I'm inclined to leave it as-is for now unless someone feels particularly strongly about it.
There was a problem hiding this comment.
I feel like the "nonoverlapping" distinction is way more fundamental than the "one" distinction. And since it is internal, consistency with ptr::swap_nonoverlapping isn't very important IMO.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
bors
commented
Mar 23, 2024
💔 Test failed - checks-actions |
scottmcm
commented
Mar 23, 2024
@bors r=oli-obk |
bors
commented
Mar 23, 2024
bors
commented
Mar 23, 2024
Let codegen decide when to `mem::swap` with immediates Making `libcore` decide this is silly; the backend has so much better information about when it's a good idea. Thus this PR introduces a new `typed_swap` intrinsic with a fallback body, and replaces that fallback implementation when swapping immediates or scalar pairs. r? oli-obk Replaces rust-lang#111744, and means we'll never need more libs PRs like rust-lang#111803 or rust-lang#107140
bors
commented
Mar 23, 2024
💥 Test timed out |
rust-log-analyzer
commented
Mar 23, 2024
RalfJung
commented
Mar 23, 2024
@bors retry |
bors
commented
Mar 23, 2024
bors
commented
Mar 23, 2024
☀️ Test successful - checks-actions |
rust-timer
commented
Mar 23, 2024
Finished benchmarking commit (d6eb0f5): comparison URL. Overall result: ✅ improvements - no action needed@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: 669.588s -> 671.198s (0.24%) |
Let codegen decide when to `mem::swap` with immediates Making `libcore` decide this is silly; the backend has so much better information about when it's a good idea. Thus this PR introduces a new `typed_swap` intrinsic with a fallback body, and replaces that fallback implementation when swapping immediates or scalar pairs. r? oli-obk Replaces rust-lang#111744, and means we'll never need more libs PRs like rust-lang#111803 or rust-lang#107140
Making
libcoredecide this is silly; the backend has so much better information about when it's a good idea.Thus this PR introduces a new
typed_swapintrinsic with a fallback body, and replaces that fallback implementation when swapping immediates or scalar pairs.r? oli-obk
Replaces #111744, and means we'll never need more libs PRs like #111803 or #107140