-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
[perf experiment] Enable DeduplicateBlocks #106551
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 098af8fbffa06926b3d72b2e136cc2e3c224431f with merge 11d6ba903e6762c93f69ccf2ece4c445cfc575ae... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (11d6ba903e6762c93f69ccf2ece4c445cfc575ae): comparison URL. Overall result: ❌✅ regressions and improvements - 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never 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.
|
Cachegrind diffs look like this:
Which is interesting. I have never seen a case like this where the whole regression is accounted for by a codegen change in one function. |
098af8f
to
ee29825
Compare
Compiling rustc, here is the size of the blocks that get deduplicated:
And with DestinationPropagation enabled, this distribution slants much more towards 0. The limit of this pass was previously set at 10. Things must have been very different back in the day to justify setting it that high. I'm setting the limit down to 3. @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit ee29825 with merge 303c0a1f5a0e2a8be2e7b8e1eac1978c0a63f3e5... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (303c0a1f5a0e2a8be2e7b8e1eac1978c0a63f3e5): comparison URL. Overall result: ❌✅ regressions and improvements - 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never 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.
|
Adding a tighter limit to this seems to have removed our improvements but hardly altered the regressions. I would not have expected that. So if I remove the limit entirely, I should see huge regression due to making @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 3b77094 with merge 8992fea7489ae2ab19a68d91257bc3ea778fcf79... |
This comment has been minimized.
This comment has been minimized.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (8992fea7489ae2ab19a68d91257bc3ea778fcf79): comparison URL. Overall result: ❌✅ regressions and improvements - 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never 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.
|
Marking as waiting on author because it's still a draft. |
#106428 enabled deduplicating unreachable blocks. The distribution of block sizes now looks like this (it used to be dominated by 0):
It looks like most of the 0-statement blocks are I suspect that this distribution will be significantly reshaped by jump threading or whatever other passes land, and since this pass isn't deleting enough MIR to produce a benefit, I'm closing this. |
It looks to me like all this really does is delete duplicated empty
unreachable
blocks, and the occasionalStorageDead + drop
block. Perhaps something unexpected turns up in perf.r? @ghost