-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Clean up MonoItem::instantiation_mode #136394
Conversation
7ae2e33
to
eea88f5
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…, r=<try> Clean up MonoItem::instantiation_mode More progress on cleaning up and documenting instantiation mode selection. Tests pass locally, but I want this to pass perf first. r? ghost
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (ab75159): 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 (primary -3.9%, secondary 1.4%)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 sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 777.851s -> 777.154s (-0.09%) |
r? compiler |
@bors r+ |
There's a lot of nevers in the queue and this is supposed to no semantic changes and has passed a perf run with no changes. @bors rollup=maybe |
… r=<try> Remove InstanceKind::generates_cgu_internal_copy This is on top of rust-lang#136394 for now. `InstanceKind::generates_cgu_internal_copy` was called in two places: 1. By `reachable_non_generics`, but in that case the caller was guaranteed to not be generic and therefore we always fall through to just calling `cross_crate_inlinable`. 2. By `MonoItem::instantiation_mode`, but in that case the *only* thing that it does is some very complicated logic for selecting the instantiation mode for drop glue, and only very recently do we have a single codegen test for this. So I've touched up the logic in `cross_crate_inlinable` so that we don't try to claim that `drop_in_place` isn't cross-crate-inlinable, because it clearly is. Now off to perf, and if we get regressions I'll start reintroducing the logic about drop glue but, but this time into `MonoItem::instantiation_mode` where it always should have been.
…de, r=compiler-errors Clean up MonoItem::instantiation_mode More progress on cleaning up and documenting instantiation mode selection. This should have no behavior changes at all, it just rearranges the code inside `MonoItem::instantiation_mode` to a more logical flow and I've tried to explain every choice the implementation is making.
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#134272 (Remove rustc_encodable_decodable feature) - rust-lang#136283 (Update encode_utf16 to mention it is native endian) - rust-lang#136394 (Clean up MonoItem::instantiation_mode) - rust-lang#136402 (diagnostics: fix borrowck suggestions for if/while let conditionals) - rust-lang#136415 (Highlight clarifying information in "expected/found" error) - rust-lang#136422 (Convert two `rustc_middle::lint` functions to `Span` methods.) - rust-lang#136434 (rustc_allowed_through_unstable_modules: require deprecation message) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#136394 - saethlin:clean-up-instantiation-mode, r=compiler-errors Clean up MonoItem::instantiation_mode More progress on cleaning up and documenting instantiation mode selection. This should have no behavior changes at all, it just rearranges the code inside `MonoItem::instantiation_mode` to a more logical flow and I've tried to explain every choice the implementation is making.
… r=<try> Remove InstanceKind::generates_cgu_internal_copy This is on top of rust-lang#136394 for now. `InstanceKind::generates_cgu_internal_copy` was called in two places: 1. By `reachable_non_generics`, but in that case the caller was guaranteed to not be generic and therefore we always fall through to just calling `cross_crate_inlinable`. 2. By `MonoItem::instantiation_mode`, but in that case the *only* thing that it does is some very complicated logic for selecting the instantiation mode for drop glue, and only very recently do we have a single codegen test for this. So I've touched up the logic in `cross_crate_inlinable` so that we don't try to claim that `drop_in_place` isn't cross-crate-inlinable, because it clearly is. Now off to perf, and if we get regressions I'll start reintroducing the logic about drop glue but, but this time into `MonoItem::instantiation_mode` where it always should have been.
More progress on cleaning up and documenting instantiation mode selection.
This should have no behavior changes at all, it just rearranges the code inside
MonoItem::instantiation_mode
to a more logical flow and I've tried to explain every choice the implementation is making.