Stream the dep-graph to a file.

This commit is contained in:
Camille GILLOT 2021-03-02 22:38:49 +01:00
parent 16156fb278
commit 6bfaf3a9cb
18 changed files with 710 additions and 918 deletions

View file

@ -1021,9 +1021,6 @@ pub fn start_codegen<'tcx>(
rustc_symbol_mangling::test::report_symbol_names(tcx);
}
tcx.sess.time("assert_dep_graph", || rustc_incremental::assert_dep_graph(tcx));
tcx.sess.time("serialize_dep_graph", || rustc_incremental::save_dep_graph(tcx));
info!("Post-codegen\n{:?}", tcx.debug_stats());
if tcx.sess.opts.output_types.contains_key(&OutputType::Mir) {

View file

@ -207,7 +207,13 @@ impl<'tcx> Queries<'tcx> {
})
.open(self.session())
});
DepGraph::new(prev_graph, prev_work_products)
rustc_incremental::build_dep_graph(
self.session(),
prev_graph,
prev_work_products,
)
.unwrap_or_else(DepGraph::new_disabled)
}
})
})
@ -435,6 +441,9 @@ impl Compiler {
if self.session().opts.debugging_opts.query_stats {
gcx.enter(rustc_query_impl::print_stats);
}
self.session()
.time("serialize_dep_graph", || gcx.enter(rustc_incremental::save_dep_graph));
}
_timer = Some(self.session().timer("free_global_ctxt"));