-
Notifications
You must be signed in to change notification settings - Fork 13.4k
force share-generics on drop-glue locally #108838
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
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit b4a689e with merge 7361760bf34b8f3cf6d72c054452b70106cbf531... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (7361760bf34b8f3cf6d72c054452b70106cbf531): comparison URL. Overall result: ❌ regressions - 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.
|
This seems to be a regression on both compile time and executable size. |
Finished benchmarking commit (7361760bf34b8f3cf6d72c054452b70106cbf531): comparison URL. Overall result: ❌ regressions - 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.
|
The job Click to see the possible cause of the failure (guessed by this bot)
|
I'm guessing fewer things get monomorphized into nothing as a result. |
@bjorn3 As the previous share-generics on drop-glue stated that drop-glue should be instantiated if used https://github.com/rust-lang/rust/pull/68414/files#diff-28d299e2742f2ca199c4d3dcd9df0d8bae3dd0998db034803da401057501fa56R15 |
I see. Going to re-assign as this is tricky code and I can't convince myself of the correctness due to lack of experience with this code. r? compiler |
Is there a rationale to this change written anywhere? |
@davidtwco This patch was trying to address #84175 , but it regressed a lot, and I can not find a better solution, asking for the team for advice. as for this patch itself, it should not be accepted obviously. |
I can't think of another way to do this - I think there will just be a performance penalty to always generate drop-glue. It might be beneficial when that drop-glue goes on to be used, but there will be many cases where we now generate drop-glue that will never be used. |
After reading the code of share-generics and PGO, I'm wandering if it is possible to generate some profdata for rustc itself like PGO profdata for llvm, which teaches rustc to do share-generics on functions for a local project. We are doing this manually by create a top level crate which instantiates functions inside it, then make the business modules depends on it. thanks for your reviewing :) |
r? @bjorn3
a perf-run is requested, thanks.