Skip to content

[parallel-queries] Refactor away DepGraph::work_products to avoid shared mutable state #50500

Closed
@michaelwoerister

Description

@michaelwoerister

DepGraph::work_products is a field that collects the object files cached during the current compilation session. This information (probably) does not need to live in the dep-graph as shared mutable state. Instead the information could be threaded through via return values and function parameters. An initial analysis suggest that the following functions need to be modified:

  • rustc_incremental::persist::work_product::save_trans_partition()
  • librustc_trans::back::write::copy_module_artifacts_into_incr_comp_cache()
  • librustc_trans::back::write::OngoingCrateTranslation::join()
  • rustc_incremental::persist::save::save_work_products()

cc @rust-lang/wg-compiler-performance

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.WG-compiler-performanceWorking group: Compiler Performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions