Prefetch exported symbols
This commit is contained in:
parent
1a34cbc2e2
commit
03af82bb0c
1 changed files with 9 additions and 4 deletions
|
@ -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),
|
||||
);
|
||||
})
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue