-
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
codegen: store ScalarPair via memset when one side is undef and the other side can be memset #135335
Conversation
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri, @rust-lang/wg-const-eval |
@bors try @rust-timer queue cc @saethlin in case you were interested in where #135258 was going |
This comment has been minimized.
This comment has been minimized.
Treat undef bytes as equal to any other byte Basically since `undef` can be any byte, it can also be the byte(s) that are in the non-undef parts of a value. So we can just treat the `undef` at not being there and only look at the initialized bytes and memset over them fixes rust-lang#104290 based on rust-lang#135258
This comment has been minimized.
This comment has been minimized.
e64a5a0
to
b7e20ee
Compare
Some changes occurred in compiler/rustc_codegen_gcc |
@bors try |
Treat undef bytes as equal to any other byte Basically since `undef` can be any byte, it can also be the byte(s) that are in the non-undef parts of a value. So we can just treat the `undef` at not being there and only look at the initialized bytes and memset over them fixes rust-lang#104290 based on rust-lang#135258
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (cabcef2): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (secondary -2.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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeResults (primary -0.1%, secondary -0.1%)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: 763.776s -> 764.773s (0.13%) |
Widespread (even though small) binary size improvements in debug builds indicate this is firing and decently relevant. |
I have updated the PR title since I found the old one really confusing.^^ |
Well my original plan was to do this for general |
Feel free to further adjust the title. The old title was extremely unspecific though.^^ |
r? saethlin |
codegen: store ScalarPair via memset when one side is undef and the other side can be memset Basically since `undef` can be any byte, it can also be the byte(s) that are in the non-undef parts of a value. So we can just treat the `undef` at not being there and only look at the initialized bytes and memset over them fixes rust-lang#104290 based on rust-lang#135258
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
83476be
to
8f5f5e5
Compare
@bors r=saethlin |
☀️ Test successful - checks-actions |
Finished benchmarking commit (a7a6c64): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -2.2%, 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeResults (primary -0.1%, secondary -0.1%)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: 763.258s -> 763.46s (0.03%) |
Basically since
undef
can be any byte, it can also be the byte(s) that are in the non-undef parts of a value. So we can just treat theundef
at not being there and only look at the initialized bytes and memset over themfixes #104290
based on #135258