[parallel-queries] DepGraph::previous_work_products could be made immutable to avoid shared mutable state #50501
Labels
A-parallel-queries
Area: Parallel query execution
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
WG-compiler-performance
Working group: Compiler Performance
DepGraph::previous_work_products is a field in the dep-graph that contains the list of object files cached during the previous compilation session. In theory, this information is available already at the time when we load the previous dep-graph and thus the field could be made immutable (i.e. not use an
RwLock
) and be initialized atDepGraph
construction time.Refactoring this would need the following steps:
RwLock
around the DepGraph::previous_work_products field.cc @rust-lang/wg-compiler-performance
The text was updated successfully, but these errors were encountered: