1
Fork 0

try to cache region_scope_tree as a query

This commit is contained in:
Ding Xiang Fei 2022-05-25 13:52:32 +08:00
parent b2eba058e6
commit 4c6074fbb0
No known key found for this signature in database
GPG key ID: 3CD748647EEF6359
16 changed files with 30 additions and 42 deletions

View file

@ -1048,6 +1048,12 @@ rustc_queries! {
desc { "reachability" }
}
/// Per-body `region::ScopeTree`. The `DefId` should be the owner `DefId` for the body;
/// in the case of closures, this will be redirected to the enclosing function.
query region_scope_tree(def_id: DefId) -> &'tcx crate::middle::region::ScopeTree {
desc { |tcx| "computing drop scopes for `{}`", tcx.def_path_str(def_id) }
}
/// Generates a MIR body for the shim.
query mir_shims(key: ty::InstanceDef<'tcx>) -> mir::Body<'tcx> {
storage(ArenaCacheSelector<'tcx>)