From d0fc18030f99b98a81bb64ba573a3566fd5e9044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20K=C3=A5re=20Alsaker?= Date: Fri, 30 Jan 2026 23:46:51 +0100 Subject: [PATCH] Tweak inlining for `try_mark_previous_green` --- compiler/rustc_query_system/src/dep_graph/graph.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_query_system/src/dep_graph/graph.rs b/compiler/rustc_query_system/src/dep_graph/graph.rs index 6d46d144d0f18..4aed367ad81ea 100644 --- a/compiler/rustc_query_system/src/dep_graph/graph.rs +++ b/compiler/rustc_query_system/src/dep_graph/graph.rs @@ -887,6 +887,7 @@ impl DepGraphData { } #[instrument(skip(self, qcx, parent_dep_node_index, frame), level = "debug")] + #[inline(always)] fn try_mark_parent_green<'tcx, Qcx: QueryContext<'tcx, Deps = D>>( &self, qcx: Qcx, @@ -977,6 +978,7 @@ impl DepGraphData { /// Try to mark a dep-node which existed in the previous compilation session as green. #[instrument(skip(self, qcx, prev_dep_node_index, frame), level = "debug")] + #[inline(never)] fn try_mark_previous_green<'tcx, Qcx: QueryContext<'tcx, Deps = D>>( &self, qcx: Qcx, @@ -1395,7 +1397,7 @@ impl DepNodeColorMap { } } - #[inline] + #[inline(always)] pub(super) fn get(&self, index: SerializedDepNodeIndex) -> DepNodeColor { let value = self.values[index].load(Ordering::Acquire); // Green is by far the most common case. Check for that first so we can succeed with a