-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
MetadataOnlyCodegenBackend: run the collector only once #57418
Conversation
Use the `collect_and_partition_mono_items ` query to avoid calling the collector
r? @cramertj (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -136,24 +135,15 @@ impl CodegenBackend for MetadataOnlyCodegenBackend { | |||
::symbol_names_test::report_symbol_names(tcx); | |||
::rustc_incremental::assert_dep_graph(tcx); | |||
::rustc_incremental::assert_module_sources::assert_module_sources(tcx); | |||
::rustc_mir::monomorphize::assert_symbols_are_distinct(tcx, |
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.
Note to anybody looking through this: collect_and_partition_mono_items
query does this assert internally.
(At least this basic first Travis pass seems to work, so I'm removing the WIP-ness) |
codegen-backend: run the collector only once Use the `collect_and_partition_mono_items` query to avoid calling the collector directly twice. Fixes #57406.
☀️ Test successful - status-travis |
@rust-timer build 85cebe1 |
Success: Queued 85cebe1 with parent 9d54812, comparison URL. |
This will not have any perf change, because this is not the llvm codegen backend, but a backend only emitting metadata introduced in #44085. You have to pass Edit: correct debug flag. |
Finished benchmarking try commit 85cebe1 |
Oh, it's a different backend... Well, does it rely on collection being eager? Why does it even monomorphize items in the first place? |
Probably not.
I tried to make as many tests pass using it. |
Since the results of the method calls in the loop are not used, I assume the calls are only there for triggering diagnostics.
|
Yes.
As far as I know it hasn't really been used by anyone (including me). It can be removed if you want. |
This function has no side effects, and its result is ignored.
📌 Commit e5318f3 has been approved by |
…ster MetadataOnlyCodegenBackend: run the collector only once Use the `collect_and_partition_mono_items` query to avoid calling the collector directly twice. Fixes rust-lang#57406.
…ster MetadataOnlyCodegenBackend: run the collector only once Use the `collect_and_partition_mono_items` query to avoid calling the collector directly twice. Fixes rust-lang#57406.
Rollup of 6 pull requests Successful merges: - #57232 (Parallelize and optimize parts of HIR map creation) - #57418 (MetadataOnlyCodegenBackend: run the collector only once) - #57465 (Stabilize cfg_target_vendor) - #57477 (clarify resolve typo suggestion) - #57556 (privacy: Fix private-in-public check for existential types) - #57584 (Remove the `connect_timeout_unroutable` test.) Failed merges: r? @ghost
Use the
collect_and_partition_mono_items
query to avoid calling the collector directly twice.Fixes #57406.