Skip to content

Commit 03af82b

Browse files
committed
Prefetch exported symbols
1 parent 1a34cbc commit 03af82b

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/librustc_metadata/rmeta/encoder.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,10 +1726,15 @@ pub(super) fn encode_metadata(tcx: TyCtxt<'_>) -> EncodedMetadata {
17261726
|| {
17271727
// Prefetch some queries used by metadata encoding
17281728
tcx.dep_graph.with_ignore(|| {
1729-
par_for_each_in(tcx.mir_keys(LOCAL_CRATE), |&def_id| {
1730-
tcx.optimized_mir(def_id);
1731-
tcx.promoted_mir(def_id);
1732-
});
1729+
join(
1730+
|| {
1731+
par_for_each_in(tcx.mir_keys(LOCAL_CRATE), |&def_id| {
1732+
tcx.optimized_mir(def_id);
1733+
tcx.promoted_mir(def_id);
1734+
})
1735+
},
1736+
|| tcx.exported_symbols(LOCAL_CRATE),
1737+
);
17331738
})
17341739
},
17351740
)

0 commit comments

Comments
 (0)