Auto merge of #85729 - LeSeulArtichaut:thir-no-hash, r=nikomatsakis

Don't hash `thir_body`

Experiment to see if/how much this helps negate the perf impact of #85273.
r? `@ghost`
This commit is contained in:
bors 2021-05-27 15:46:48 +00:00
commit d854c3c0e9

View file

@ -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()) }
}