Closed
Description
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 at DepGraph
construction time.
Refactoring this would need the following steps:
- Load the previous work products data already in load_dep_graph() instead of in dep_graph_tcx_init()
- Pass previous work products data as parameter to DepGraph::new()
- Remove the
RwLock
around the DepGraph::previous_work_products field.
cc @rust-lang/wg-compiler-performance