-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
More CGU cleanups #112369
More CGU cleanups #112369
Conversation
Currently it sorts by symbol name, which is a mangled name like `_ZN1a4main17hb29587cdb6db5f42E`, which leads to non-obvious orderings. This commit changes it to use the existing `items_in_deterministic_order`, which iterates in source code order.
Because the next commit will merge them.
Because they have a lot of overlap.
This loop is doing two different things. For inlined items, it's adding them to the CGU. For all items, it's recording them in `mono_item_placements`. This commit splits it into two separate loops. This avoids putting root mono items into `reachable`, and removes the low-value check that `roots` doesn't contain inlined mono items.
It's no longer used.
@bors rollup |
It's currently created in `place_inlined_mono_items` and then used in `internalize_symbols`. This commit moves the creation to `internalize_symbols`.
Should have no perf effect, let's check: @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 8533456 with merge fcef110a8a3c14f8861bf33a4688867d2c019d81... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (fcef110a8a3c14f8861bf33a4688867d2c019d81): comparison URL. Overall result: ❌ regressions - 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 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 sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 647.37s -> 646.951s (-0.06%) |
|
No perf effects, as expected. @bors rollup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with or without nit 🙂
// without marking this one as internal. | ||
continue; | ||
|
||
if !single_codegen_unit { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe just leave some kind of comment here (could copy from the deleted one) about why it's ok to skip this check if there's only one CGU
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I felt like the "Found a user from another CGU" comment below covered the reasoning sufficiently here.
@bors r=wesleywiser |
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#110141 (expand: Change how `#![cfg(FALSE)]` behaves on crate root) - rust-lang#112369 (More CGU cleanups) - rust-lang#112467 (Compile rustc_driver by default) - rust-lang#112468 (Change format of rustdoc-js tests by putting query and correction directly alongside the expected values) - rust-lang#112473 (Update cargo) - rust-lang#112481 (Ignore tests that hang in new solver) r? `@ghost` `@rustbot` modify labels: rollup
An assortment of improvements.
r? @wesleywiser