Auto merge of #108794 - nnethercote:avoid-unnecessary-hashing, r=cjgillot
Avoid unnecessary hashing I noticed some stable hashing being done in a non-incremental build. It turns out that some of this is necessary to compute the crate hash, but some of it is not. Removing the unnecessary hashing is a perf win. r? `@cjgillot`
This commit is contained in:
commit
150cb38147
10 changed files with 100 additions and 82 deletions
|
@ -577,5 +577,5 @@ fn get_body_span<'tcx>(
|
|||
fn hash_mir_source<'tcx>(tcx: TyCtxt<'tcx>, hir_body: &'tcx rustc_hir::Body<'tcx>) -> u64 {
|
||||
// FIXME(cjgillot) Stop hashing HIR manually here.
|
||||
let owner = hir_body.id().hir_id.owner;
|
||||
tcx.hir_owner_nodes(owner).unwrap().hash_including_bodies.to_smaller_hash()
|
||||
tcx.hir_owner_nodes(owner).unwrap().opt_hash_including_bodies.unwrap().to_smaller_hash()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue