Auto merge of #88435 - cjgillot:no-walk-crate, r=Aaron1011
Avoid invoking the hir_crate query to traverse the HIR Walking the HIR tree is done using the `hir_crate` query. However, this is unnecessary, since `hir_owner(CRATE_DEF_ID)` provides the same information. Since depending on `hir_crate` forces dependents to always be executed, this leads to unnecessary work. By splitting HIR and attributes visits, we can avoid an edge to `hir_crate` when trying to visit the HIR tree.
This commit is contained in:
commit
7849e3e9dd
25 changed files with 117 additions and 132 deletions
|
@ -464,10 +464,6 @@ pub fn lower_to_hir<'res, 'tcx>(
|
|||
arena,
|
||||
);
|
||||
|
||||
if sess.opts.debugging_opts.hir_stats {
|
||||
hir_stats::print_hir_stats(&hir_crate);
|
||||
}
|
||||
|
||||
sess.time("early_lint_checks", || {
|
||||
rustc_lint::check_ast_crate(
|
||||
sess,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue