Skip to content

[WIP] Refactor dep graph representation both in memory and on disk #60035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 17 commits into from
Closed
Prev Previous commit
Next Next commit
wip
  • Loading branch information
Zoxc committed Jun 18, 2019
commit 9a6ef66db4324cf7a48e422c1cc60df76e86f0ec
6 changes: 3 additions & 3 deletions src/librustc/dep_graph/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ impl DepGraph {
};

debug_assert_eq!(
data.colors.get(prev_index),
DepNodeState::Unknown,
data.colors.get(prev_index).color(),
None,
"DepGraph::with_task() - Duplicate DepNodeState insertion for {:?}",
key
);
Expand Down Expand Up @@ -807,7 +807,7 @@ impl DepGraph {
// There may be multiple threads trying to mark the same dep node green concurrently

#[cfg(not(parallel_compiler))]
debug_assert_eq!(data.colors.get(dep_node_index), DepNodeState::Unknown,
debug_assert_eq!(data.colors.get(dep_node_index).color(), None,
"DepGraph::try_mark_previous_green() - Duplicate DepNodeState \
insertion for {:?}", dep_node);

Expand Down
6 changes: 3 additions & 3 deletions src/librustc/dep_graph/serialized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ pub fn decode_dep_graph(
nodes[i] = node;
edges[i] = Some(Box::<[DepNodeIndex]>::decode(d)?);

if likely!(node.kind.is_eval_always()) {
state[i] = AtomicCell::new(DepNodeState::Unknown);
} else {
if unlikely!(node.kind.is_eval_always()) {
state[i] = AtomicCell::new(DepNodeState::UnknownEvalAlways);
} else {
state[i] = AtomicCell::new(DepNodeState::Unknown);
}
}
}
Expand Down