1
Fork 0

Delete QueryLookup

This was largely just caching the shard value at this point, which is not
particularly useful -- in the use sites the key was being hashed nearby anyway.
This commit is contained in:
Mark Rousskov 2022-02-19 22:56:56 -05:00
parent 9deed6f74e
commit 75ef068920
4 changed files with 24 additions and 45 deletions

View file

@ -222,12 +222,12 @@ macro_rules! define_callbacks {
let cached = try_get_cached(self.tcx, &self.tcx.query_caches.$name, &key, noop);
let lookup = match cached {
match cached {
Ok(()) => return,
Err(lookup) => lookup,
};
Err(()) => (),
}
self.tcx.queries.$name(self.tcx, DUMMY_SP, key, lookup, QueryMode::Ensure);
self.tcx.queries.$name(self.tcx, DUMMY_SP, key, QueryMode::Ensure);
})*
}
@ -251,12 +251,12 @@ macro_rules! define_callbacks {
let cached = try_get_cached(self.tcx, &self.tcx.query_caches.$name, &key, copy);
let lookup = match cached {
match cached {
Ok(value) => return value,
Err(lookup) => lookup,
};
Err(()) => (),
}
self.tcx.queries.$name(self.tcx, self.span, key, lookup, QueryMode::Get).unwrap()
self.tcx.queries.$name(self.tcx, self.span, key, QueryMode::Get).unwrap()
})*
}
@ -314,7 +314,6 @@ macro_rules! define_callbacks {
tcx: TyCtxt<$tcx>,
span: Span,
key: query_keys::$name<$tcx>,
lookup: QueryLookup,
mode: QueryMode,
) -> Option<query_stored::$name<$tcx>>;)*
}