Skip to content

Commit 9f257bb

Browse files
committed
Prefetch exported symbols
1 parent d739ca9 commit 9f257bb

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
@@ -1710,10 +1710,15 @@ pub(super) fn encode_metadata(tcx: TyCtxt<'_>) -> EncodedMetadata {
17101710
|| {
17111711
// Prefetch some queries used by metadata encoding
17121712
tcx.dep_graph.with_ignore(|| {
1713-
par_for_each_in(tcx.mir_keys(LOCAL_CRATE), |&def_id| {
1714-
tcx.optimized_mir(def_id);
1715-
tcx.promoted_mir(def_id);
1716-
});
1713+
join(
1714+
|| {
1715+
par_for_each_in(tcx.mir_keys(LOCAL_CRATE), |&def_id| {
1716+
tcx.optimized_mir(def_id);
1717+
tcx.promoted_mir(def_id);
1718+
})
1719+
},
1720+
|| tcx.exported_symbols(LOCAL_CRATE),
1721+
);
17171722
})
17181723
},
17191724
)

0 commit comments

Comments
 (0)