Remove ArenaCacheSelector for visible_parent_map query.
Optimize visible_parent_map to use LRC to prevent unnecessary cloning
This commit is contained in:
parent
8ad3c1dd1d
commit
852dea89b2
2 changed files with 2 additions and 3 deletions
|
@ -360,7 +360,7 @@ pub fn provide(providers: &mut Providers) {
|
||||||
visible_parent_map.entry(child).or_insert(parent);
|
visible_parent_map.entry(child).or_insert(parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
visible_parent_map
|
Lrc::new(visible_parent_map)
|
||||||
},
|
},
|
||||||
|
|
||||||
dependency_formats: |tcx, ()| Lrc::new(crate::dependency_format::calculate(tcx)),
|
dependency_formats: |tcx, ()| Lrc::new(crate::dependency_format::calculate(tcx)),
|
||||||
|
|
|
@ -1552,8 +1552,7 @@ rustc_queries! {
|
||||||
desc { "calculating the missing lang items in a crate" }
|
desc { "calculating the missing lang items in a crate" }
|
||||||
separate_provide_extern
|
separate_provide_extern
|
||||||
}
|
}
|
||||||
query visible_parent_map(_: ()) -> DefIdMap<DefId> {
|
query visible_parent_map(_: ()) -> Lrc<DefIdMap<DefId>> {
|
||||||
storage(ArenaCacheSelector<'tcx>)
|
|
||||||
desc { "calculating the visible parent map" }
|
desc { "calculating the visible parent map" }
|
||||||
}
|
}
|
||||||
query trimmed_def_paths(_: ()) -> FxHashMap<DefId, Symbol> {
|
query trimmed_def_paths(_: ()) -> FxHashMap<DefId, Symbol> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue