Skip to content

Commit 14e4345

Browse files
committed
Auto merge of #69109 - Zoxc:query-refactor, r=<try>
[WIP] Split query execution into hot and cold paths
2 parents 2d2be57 + 2807fd9 commit 14e4345

File tree

6 files changed

+455
-239
lines changed

6 files changed

+455
-239
lines changed

src/librustc/dep_graph/graph.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,7 @@ impl CurrentDepGraph {
11221122
}
11231123

11241124
impl DepGraphData {
1125+
#[inline]
11251126
fn read_index(&self, source: DepNodeIndex) {
11261127
ty::tls::with_context_opt(|icx| {
11271128
let icx = if let Some(icx) = icx { icx } else { return };

src/librustc/ty/context.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,7 +1608,7 @@ pub mod tls {
16081608

16091609
use crate::dep_graph::TaskDeps;
16101610
use crate::ty::query;
1611-
use rustc_data_structures::sync::{self, Lock, Lrc};
1611+
use rustc_data_structures::sync::{self, Lock};
16121612
use rustc_data_structures::thin_vec::ThinVec;
16131613
use rustc_data_structures::OnDrop;
16141614
use rustc_errors::Diagnostic;
@@ -1633,7 +1633,7 @@ pub mod tls {
16331633

16341634
/// The current query job, if any. This is updated by `JobOwner::start` in
16351635
/// `ty::query::plumbing` when executing a query.
1636-
pub query: Option<Lrc<query::QueryJob<'tcx>>>,
1636+
pub query: Option<query::QueryJobId>,
16371637

16381638
/// Where to store diagnostics for the current query job, if any.
16391639
/// This is updated by `JobOwner::start` in `ty::query::plumbing` when executing a query.
@@ -1684,6 +1684,7 @@ pub mod tls {
16841684

16851685
/// Gets the pointer to the current `ImplicitCtxt`.
16861686
#[cfg(not(parallel_compiler))]
1687+
#[inline]
16871688
fn get_tlv() -> usize {
16881689
TLV.with(|tlv| tlv.get())
16891690
}

0 commit comments

Comments
 (0)