Encode dep graph edges directly from the previous graph when promoting
This commit is contained in:
parent
020bbe46bd
commit
6119763e19
4 changed files with 171 additions and 51 deletions
|
@ -11,6 +11,7 @@ use rustc_session::config::IncrementalStateAssertion;
|
|||
use rustc_session::Session;
|
||||
use rustc_span::ErrorGuaranteed;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::Arc;
|
||||
|
||||
use super::data::*;
|
||||
use super::file_format;
|
||||
|
@ -88,7 +89,7 @@ fn delete_dirty_work_product(sess: &Session, swp: SerializedWorkProduct) {
|
|||
work_product::delete_workproduct_files(sess, &swp.work_product);
|
||||
}
|
||||
|
||||
fn load_dep_graph(sess: &Session) -> LoadResult<(SerializedDepGraph, WorkProductMap)> {
|
||||
fn load_dep_graph(sess: &Session) -> LoadResult<(Arc<SerializedDepGraph>, WorkProductMap)> {
|
||||
let prof = sess.prof.clone();
|
||||
|
||||
if sess.opts.incremental.is_none() {
|
||||
|
|
|
@ -10,6 +10,7 @@ use rustc_serialize::opaque::{FileEncodeResult, FileEncoder};
|
|||
use rustc_serialize::Encodable as RustcEncodable;
|
||||
use rustc_session::Session;
|
||||
use std::fs;
|
||||
use std::sync::Arc;
|
||||
|
||||
use super::data::*;
|
||||
use super::dirty_clean;
|
||||
|
@ -147,7 +148,7 @@ fn encode_query_cache(tcx: TyCtxt<'_>, encoder: FileEncoder) -> FileEncodeResult
|
|||
/// and moves it to the permanent dep-graph path
|
||||
pub(crate) fn build_dep_graph(
|
||||
sess: &Session,
|
||||
prev_graph: SerializedDepGraph,
|
||||
prev_graph: Arc<SerializedDepGraph>,
|
||||
prev_work_products: WorkProductMap,
|
||||
) -> Option<DepGraph> {
|
||||
if sess.opts.incremental.is_none() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue