Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only compute Obligation cache_key once in register_obligation_at #84923

Merged
merged 1 commit into from
May 6, 2021

Conversation

estebank
Copy link
Contributor

@estebank estebank commented May 4, 2021

No description provided.

@rust-highfive
Copy link
Collaborator

r? @petrochenkov

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 4, 2021
@estebank
Copy link
Contributor Author

estebank commented May 4, 2021

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 4, 2021
@bors
Copy link
Contributor

bors commented May 4, 2021

⌛ Trying commit 4bd5505 with merge 8cb096cd1b5a7231a55f4ce1e96f365e0c17fb78...

@bors
Copy link
Contributor

bors commented May 4, 2021

☀️ Try build successful - checks-actions
Build commit: 8cb096cd1b5a7231a55f4ce1e96f365e0c17fb78 (8cb096cd1b5a7231a55f4ce1e96f365e0c17fb78)

@rust-timer
Copy link
Collaborator

Queued 8cb096cd1b5a7231a55f4ce1e96f365e0c17fb78 with parent dc5f2cd, future comparison URL.

@petrochenkov petrochenkov removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 4, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (8cb096cd1b5a7231a55f4ce1e96f365e0c17fb78): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels May 4, 2021
@jyn514
Copy link
Member

jyn514 commented May 4, 2021

Perf looks like noise :/

@petrochenkov
Copy link
Contributor

Still makes sense as a minor cleanup.
@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 5, 2021

📌 Commit 4bd5505 has been approved by petrochenkov

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 5, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request May 5, 2021
…chenkov

Only compute Obligation `cache_key` once  in `register_obligation_at`
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request May 5, 2021
…chenkov

Only compute Obligation `cache_key` once  in `register_obligation_at`
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request May 6, 2021
…chenkov

Only compute Obligation `cache_key` once  in `register_obligation_at`
bors added a commit to rust-lang-ci/rust that referenced this pull request May 6, 2021
Rollup of 8 pull requests

Successful merges:

 - rust-lang#83507 (Implement RFC 2951: Native link modifiers)
 - rust-lang#84328 (Stablize {HashMap,BTreeMap}::into_{keys,values})
 - rust-lang#84712 (Simplify chdir implementation and minimize unsafe block)
 - rust-lang#84851 (:arrow_up: rust-analyzer)
 - rust-lang#84923 (Only compute Obligation `cache_key` once  in `register_obligation_at`)
 - rust-lang#84945 (E0583: Include secondary path in error message)
 - rust-lang#84949 (Fix typo in `MaybeUninit::array_assume_init` safety comment)
 - rust-lang#84950 (Revert PR 83866)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b5f40df into rust-lang:master May 6, 2021
@rustbot rustbot added this to the 1.54.0 milestone May 6, 2021
@@ -365,7 +366,7 @@ impl<O: ForestObligation> ObligationForest<O> {
&& self
.error_cache
.get(&obligation_tree_id)
.map(|errors| errors.contains(&obligation.as_cache_key()))
.map(|errors| errors.contains(&cache_key))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be v.key(), allowing the clone on line 345 to be elided.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@estebank estebank deleted the as_cache_key-once branch November 9, 2023 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants