diff --git a/src/librustc/dep_graph/graph.rs b/src/librustc/dep_graph/graph.rs index 0616f00b8c4..0148997ca9e 100644 --- a/src/librustc/dep_graph/graph.rs +++ b/src/librustc/dep_graph/graph.rs @@ -497,8 +497,8 @@ impl DepGraph { let current_dep_graph = &self.data.as_ref().unwrap().current; Some(( - current_dep_graph.total_read_count.load(SeqCst), - current_dep_graph.total_duplicate_read_count.load(SeqCst), + current_dep_graph.total_read_count.load(Relaxed), + current_dep_graph.total_duplicate_read_count.load(Relaxed), )) } else { None @@ -1111,7 +1111,7 @@ impl DepGraphData { if let Some(task_deps) = icx.task_deps { let mut task_deps = task_deps.lock(); if cfg!(debug_assertions) { - self.current.total_read_count.fetch_add(1, SeqCst); + self.current.total_read_count.fetch_add(1, Relaxed); } if task_deps.read_set.insert(source) { task_deps.reads.push(source); @@ -1129,7 +1129,7 @@ impl DepGraphData { } } } else if cfg!(debug_assertions) { - self.current.total_duplicate_read_count.fetch_add(1, SeqCst); + self.current.total_duplicate_read_count.fetch_add(1, Relaxed); } } })