Skip to content

Commit 7557519

Browse files
committed
Auto merge of #151877 - Zoxc:try-mark-inline-tweaks, r=<try>
Tweak inlining for `try_mark_previous_green`
2 parents 44e34e1 + d0fc180 commit 7557519

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • compiler/rustc_query_system/src/dep_graph

compiler/rustc_query_system/src/dep_graph/graph.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,7 @@ impl<D: Deps> DepGraphData<D> {
887887
}
888888

889889
#[instrument(skip(self, qcx, parent_dep_node_index, frame), level = "debug")]
890+
#[inline(always)]
890891
fn try_mark_parent_green<'tcx, Qcx: QueryContext<'tcx, Deps = D>>(
891892
&self,
892893
qcx: Qcx,
@@ -977,6 +978,7 @@ impl<D: Deps> DepGraphData<D> {
977978

978979
/// Try to mark a dep-node which existed in the previous compilation session as green.
979980
#[instrument(skip(self, qcx, prev_dep_node_index, frame), level = "debug")]
981+
#[inline(never)]
980982
fn try_mark_previous_green<'tcx, Qcx: QueryContext<'tcx, Deps = D>>(
981983
&self,
982984
qcx: Qcx,
@@ -1395,7 +1397,7 @@ impl DepNodeColorMap {
13951397
}
13961398
}
13971399

1398-
#[inline]
1400+
#[inline(always)]
13991401
pub(super) fn get(&self, index: SerializedDepNodeIndex) -> DepNodeColor {
14001402
let value = self.values[index].load(Ordering::Acquire);
14011403
// Green is by far the most common case. Check for that first so we can succeed with a

0 commit comments

Comments
 (0)