1
Fork 0

Prefetch exported symbols

This commit is contained in:
John Kåre Alsaker 2020-01-11 04:02:22 +01:00
parent 1a34cbc2e2
commit 03af82bb0c

View file

@ -1726,10 +1726,15 @@ pub(super) fn encode_metadata(tcx: TyCtxt<'_>) -> EncodedMetadata {
|| {
// Prefetch some queries used by metadata encoding
tcx.dep_graph.with_ignore(|| {
par_for_each_in(tcx.mir_keys(LOCAL_CRATE), |&def_id| {
tcx.optimized_mir(def_id);
tcx.promoted_mir(def_id);
});
join(
|| {
par_for_each_in(tcx.mir_keys(LOCAL_CRATE), |&def_id| {
tcx.optimized_mir(def_id);
tcx.promoted_mir(def_id);
})
},
|| tcx.exported_symbols(LOCAL_CRATE),
);
})
},
)