Inline try_get.
This speeds up lots of rustc-perf benchmark runs. The maximum improvement is 1%, but there are a lot in the 0.5--1.0% range.
This commit is contained in:
parent
4c26e2e3fb
commit
95120164b0
1 changed files with 4 additions and 0 deletions
|
|
@ -105,6 +105,10 @@ impl<'a, 'tcx, Q: QueryDescription<'tcx>> JobOwner<'a, 'tcx, Q> {
|
|||
/// start executing the query, or it returns with the result of the query.
|
||||
/// If the query is executing elsewhere, this will wait for it.
|
||||
/// If the query panicked, this will silently panic.
|
||||
///
|
||||
/// This function is inlined because that results in a noticeable speedup
|
||||
/// for some compile-time benchmarks.
|
||||
#[inline(always)]
|
||||
pub(super) fn try_get(
|
||||
tcx: TyCtxt<'a, 'tcx, '_>,
|
||||
span: Span,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue