about summary refs log tree commit diff
path: root/compiler/rustc_incremental
diff options
context:
space:
mode:
authorTyson Nottingham <tgnottingham@gmail.com>2021-01-01 14:06:17 -0800
committerTyson Nottingham <tgnottingham@gmail.com>2021-01-12 11:22:57 -0800
commit62139ffad4a77d45b9651b04b440c89c5b9c1b5c (patch)
treed0fc8cd89acc34f082884682709cc85be11784fb /compiler/rustc_incremental
parent497c9a256b1c2961e91565ccc6e0dd3a87a031ed (diff)
downloadrust-62139ffad4a77d45b9651b04b440c89c5b9c1b5c.tar.gz
rust-62139ffad4a77d45b9651b04b440c89c5b9c1b5c.zip
Remove DepKind::CrateMetadata and pre-allocation of DepNodes
Remove much of the special-case handling around crate metadata
dependency tracking by replacing `DepKind::CrateMetadata` and the
pre-allocation of corresponding `DepNodes` with on-demand invocation
of the `crate_hash` query.
Diffstat (limited to 'compiler/rustc_incremental')
-rw-r--r--compiler/rustc_incremental/src/lib.rs1
-rw-r--r--compiler/rustc_incremental/src/persist/load.rs9
-rw-r--r--compiler/rustc_incremental/src/persist/mod.rs1
3 files changed, 0 insertions, 11 deletions
diff --git a/compiler/rustc_incremental/src/lib.rs b/compiler/rustc_incremental/src/lib.rs
index a80c4be3e93..95456c07b10 100644
--- a/compiler/rustc_incremental/src/lib.rs
+++ b/compiler/rustc_incremental/src/lib.rs
@@ -17,7 +17,6 @@ mod persist;
 pub use assert_dep_graph::assert_dep_graph;
 pub use persist::copy_cgu_workproduct_to_incr_comp_cache_dir;
 pub use persist::delete_workproduct_files;
-pub use persist::dep_graph_tcx_init;
 pub use persist::finalize_session_directory;
 pub use persist::garbage_collect_session_directories;
 pub use persist::in_incr_comp_dir;
diff --git a/compiler/rustc_incremental/src/persist/load.rs b/compiler/rustc_incremental/src/persist/load.rs
index 35428dc8d84..0add0c5aa26 100644
--- a/compiler/rustc_incremental/src/persist/load.rs
+++ b/compiler/rustc_incremental/src/persist/load.rs
@@ -4,7 +4,6 @@ use rustc_data_structures::fx::FxHashMap;
 use rustc_hir::definitions::Definitions;
 use rustc_middle::dep_graph::{PreviousDepGraph, SerializedDepGraph, WorkProduct, WorkProductId};
 use rustc_middle::ty::query::OnDiskCache;
-use rustc_middle::ty::TyCtxt;
 use rustc_serialize::opaque::Decoder;
 use rustc_serialize::Decodable as RustcDecodable;
 use rustc_session::Session;
@@ -15,14 +14,6 @@ use super::file_format;
 use super::fs::*;
 use super::work_product;
 
-pub fn dep_graph_tcx_init(tcx: TyCtxt<'_>) {
-    if !tcx.dep_graph.is_fully_enabled() {
-        return;
-    }
-
-    tcx.allocate_metadata_dep_nodes();
-}
-
 type WorkProductMap = FxHashMap<WorkProductId, WorkProduct>;
 
 pub enum LoadResult<T> {
diff --git a/compiler/rustc_incremental/src/persist/mod.rs b/compiler/rustc_incremental/src/persist/mod.rs
index 7bc3b47e15a..8821b34b502 100644
--- a/compiler/rustc_incremental/src/persist/mod.rs
+++ b/compiler/rustc_incremental/src/persist/mod.rs
@@ -15,7 +15,6 @@ pub use fs::garbage_collect_session_directories;
 pub use fs::in_incr_comp_dir;
 pub use fs::in_incr_comp_dir_sess;
 pub use fs::prepare_session_directory;
-pub use load::dep_graph_tcx_init;
 pub use load::load_query_result_cache;
 pub use load::LoadResult;
 pub use load::{load_dep_graph, DepGraphFuture};