Always calculate glob map but only for glob uses
Previously calculating glob map was *opt-in*, however it did record node id -> ident use for every use directive. This aims to see if we can unconditionally calculate the glob map and not regress performance.
This commit is contained in:
parent
75a369c5b1
commit
df9df19507
9 changed files with 11 additions and 41 deletions
|
|
@ -1239,7 +1239,6 @@ impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
|
|||
|
||||
// Make a comma-separated list of names of imported modules.
|
||||
let glob_map = &self.save_ctxt.analysis.glob_map;
|
||||
let glob_map = glob_map.as_ref().unwrap();
|
||||
let names = if glob_map.contains_key(&id) {
|
||||
glob_map.get(&id).unwrap().iter().map(|n| n.to_string()).collect()
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1122,8 +1122,6 @@ pub fn process_crate<'l, 'tcx, H: SaveHandler>(
|
|||
mut handler: H,
|
||||
) {
|
||||
tcx.dep_graph.with_ignore(|| {
|
||||
assert!(analysis.glob_map.is_some());
|
||||
|
||||
info!("Dumping crate {}", cratename);
|
||||
|
||||
let save_ctxt = SaveContext {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue