Drop AST on a separate thread and prefetch hir_crate
This commit is contained in:
@@ -900,6 +900,12 @@ fn run_required_analyses(tcx: TyCtxt<'_>) {
|
||||
// is not defined. So we need to cfg it out.
|
||||
#[cfg(all(not(doc), debug_assertions))]
|
||||
rustc_passes::hir_id_validator::check_crate(tcx);
|
||||
|
||||
// Prefetch this to prevent multiple threads from blocking on it later.
|
||||
// This is needed since the `hir_id_validator::check_crate` call above is not guaranteed
|
||||
// to use `hir_crate`.
|
||||
tcx.ensure_done().hir_crate(());
|
||||
|
||||
let sess = tcx.sess;
|
||||
sess.time("misc_checking_1", || {
|
||||
parallel!(
|
||||
|
||||
Reference in New Issue
Block a user