Rollup merge of #57027 - Zoxc:query-perf5, r=michaelwoerister
Optimize away a move r? @michaelwoerister
This commit is contained in:
commit
9b2331d2ca
1 changed files with 4 additions and 1 deletions
|
|
@ -136,11 +136,14 @@ impl<'a, 'tcx, Q: QueryDescription<'tcx>> JobOwner<'a, 'tcx, Q> {
|
|||
Entry::Vacant(entry) => {
|
||||
// No job entry for this query. Return a new one to be started later
|
||||
return tls::with_related_context(tcx, |icx| {
|
||||
// Create the `parent` variable before `info`. This allows LLVM
|
||||
// to elide the move of `info`
|
||||
let parent = icx.query.clone();
|
||||
let info = QueryInfo {
|
||||
span,
|
||||
query: Q::query(key.clone()),
|
||||
};
|
||||
let job = Lrc::new(QueryJob::new(info, icx.query.clone()));
|
||||
let job = Lrc::new(QueryJob::new(info, parent));
|
||||
let owner = JobOwner {
|
||||
cache,
|
||||
job: job.clone(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue