Skip to content

Commit

Permalink
Auto merge of rust-lang#85729 - LeSeulArtichaut:thir-no-hash, r=nikom…
Browse files Browse the repository at this point in the history
…atsakis

Don't hash `thir_body`

Experiment to see if/how much this helps negate the perf impact of rust-lang#85273.
r? `@ghost`
  • Loading branch information
bors committed May 27, 2021
2 parents ea78d1e + 9385be7 commit d854c3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_middle/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ rustc_queries! {

/// Fetch the THIR for a given body. If typeck for that body failed, returns an empty `Thir`.
query thir_body(key: ty::WithOptConstParam<LocalDefId>) -> (&'tcx Steal<thir::Thir<'tcx>>, thir::ExprId) {
// Perf tests revealed that hashing THIR is inefficient (see #85729).
no_hash
desc { |tcx| "building THIR for `{}`", tcx.def_path_str(key.did.to_def_id()) }
}

Expand Down

0 comments on commit d854c3c

Please sign in to comment.