diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-10-06 08:38:23 -0400 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-10-06 08:38:23 -0400 |
| commit | 4c32d475a8bd2c68f82120af9182c41730a81a82 (patch) | |
| tree | 34463ccf54af182de093f6893d375e243a58a4b1 | |
| parent | 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91 (diff) | |
| download | rust-4c32d475a8bd2c68f82120af9182c41730a81a82.tar.gz rust-4c32d475a8bd2c68f82120af9182c41730a81a82.zip | |
Remove loaded_from_cache map from DepGraph
It's now unused, even with -Zquery-dep-graph
| -rw-r--r-- | src/librustc/dep_graph/graph.rs | 23 | ||||
| -rw-r--r-- | src/librustc/ty/query/plumbing.rs | 8 |
2 files changed, 0 insertions, 31 deletions
diff --git a/src/librustc/dep_graph/graph.rs b/src/librustc/dep_graph/graph.rs index 0c56fc7914b..08c456547ce 100644 --- a/src/librustc/dep_graph/graph.rs +++ b/src/librustc/dep_graph/graph.rs @@ -75,9 +75,6 @@ struct DepGraphData { previous_work_products: FxHashMap<WorkProductId, WorkProduct>, dep_node_debug: Lock<FxHashMap<DepNode, String>>, - - // Used for testing, only populated when -Zquery-dep-graph is specified. - loaded_from_cache: Lock<FxHashMap<DepNodeIndex, bool>>, } pub fn hash_result<R>(hcx: &mut StableHashingContext<'_>, result: &R) -> Option<Fingerprint> @@ -104,7 +101,6 @@ impl DepGraph { emitting_diagnostics_cond_var: Condvar::new(), previous: prev_graph, colors: DepNodeColorMap::new(prev_graph_node_count), - loaded_from_cache: Default::default(), })), } } @@ -874,25 +870,6 @@ impl DepGraph { } } } - - pub fn mark_loaded_from_cache(&self, dep_node_index: DepNodeIndex, state: bool) { - debug!("mark_loaded_from_cache({:?}, {})", - self.data.as_ref().unwrap().current.borrow().data[dep_node_index].node, - state); - - self.data - .as_ref() - .unwrap() - .loaded_from_cache - .borrow_mut() - .insert(dep_node_index, state); - } - - pub fn was_loaded_from_cache(&self, dep_node: &DepNode) -> Option<bool> { - let data = self.data.as_ref().unwrap(); - let dep_node_index = data.current.borrow().node_to_node_index[dep_node]; - data.loaded_from_cache.borrow().get(&dep_node_index).cloned() - } } /// A "work product" is an intermediate result that we save into the diff --git a/src/librustc/ty/query/plumbing.rs b/src/librustc/ty/query/plumbing.rs index 955f1447c55..7cab8fe60ee 100644 --- a/src/librustc/ty/query/plumbing.rs +++ b/src/librustc/ty/query/plumbing.rs @@ -489,10 +489,6 @@ impl<'tcx> TyCtxt<'tcx> { self.incremental_verify_ich::<Q>(&result, dep_node, dep_node_index); } - if unlikely!(self.sess.opts.debugging_opts.query_dep_graph) { - self.dep_graph.mark_loaded_from_cache(dep_node_index, true); - } - result } @@ -570,10 +566,6 @@ impl<'tcx> TyCtxt<'tcx> { drop(prof_timer); profq_msg!(self, ProfileQueriesMsg::ProviderEnd); - if unlikely!(self.sess.opts.debugging_opts.query_dep_graph) { - self.dep_graph.mark_loaded_from_cache(dep_node_index, false); - } - if unlikely!(!diagnostics.is_empty()) { if dep_node.kind != crate::dep_graph::DepKind::Null { self.queries.on_disk_cache |
