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

Merge the two depkind vtables #89978

Merged
merged 11 commits into from
Oct 20, 2021
Merged

Merge the two depkind vtables #89978

merged 11 commits into from
Oct 20, 2021

Conversation

cjgillot
Copy link
Contributor

Knowledge of DepKinds is managed using two arrays containing flags (is_anon, eval_always, fingerprint_style), and function pointers (forcing and loading code).

This PR aims at merging the two arrays so as to reduce unneeded indirect calls and (hopefully) increase code locality.
r? @ghost

@cjgillot
Copy link
Contributor Author

@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 Oct 17, 2021
@bors
Copy link
Contributor

bors commented Oct 17, 2021

⌛ Trying commit daeb774d905256f876441a02b67374f79ee99370 with merge 9311997381062f445ad1b8d25c99e8fc41762ccf...

@bors
Copy link
Contributor

bors commented Oct 17, 2021

☀️ Try build successful - checks-actions
Build commit: 9311997381062f445ad1b8d25c99e8fc41762ccf (9311997381062f445ad1b8d25c99e8fc41762ccf)

@rust-timer
Copy link
Collaborator

Queued 9311997381062f445ad1b8d25c99e8fc41762ccf with parent 12b5bce, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9311997381062f445ad1b8d25c99e8fc41762ccf): comparison url.

Summary: This change led to moderate relevant mixed results 🤷 in compiler performance.

  • Moderate improvement in instruction counts (up to -1.6% on incr-unchanged builds of helloworld)
  • Moderate regression in instruction counts (up to 0.5% on incr-unchanged builds of stm32f4)

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR led to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

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

@rustbot rustbot added perf-regression Performance regression. 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 Oct 17, 2021
@cjgillot
Copy link
Contributor Author

r? @Mark-Simulacrum

@cjgillot cjgillot marked this pull request as ready for review October 18, 2021 18:31
@Mark-Simulacrum
Copy link
Member

Overall looks fine to me -- the performance regressions seem likely to be just reshuffling of optimization choices, and don't seem worth additional investigation in my opinion. There's a bunch of improvements in there as well. If we were to try and investigate I'd suggest splitting this PR up -- I think there's several commits which aren't necessarily tied into the primary goal.

I am happy to r=me with the one debug_assert nit fixed.

@bors
Copy link
Contributor

bors commented Oct 19, 2021

☔ The latest upstream changes (presumably #89933) made this pull request unmergeable. Please resolve the merge conflicts.

@Mark-Simulacrum
Copy link
Member

r=me when rebased, I think the perf regression noted here is mostly down to this code being very sensitive and so hard to get just improvements in. The improvements seem larger than the regressions, and this is a good cleanup, so I'm OK proceeding.

@Mark-Simulacrum Mark-Simulacrum added perf-regression-triaged The performance regression has been triaged. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 20, 2021
@cjgillot
Copy link
Contributor Author

@bors r=Mark-Simulacrum

@bors
Copy link
Contributor

bors commented Oct 20, 2021

📌 Commit b11ec29 has been approved by Mark-Simulacrum

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 20, 2021
@bors
Copy link
Contributor

bors commented Oct 20, 2021

⌛ Testing commit b11ec29 with merge efd0483...

@bors
Copy link
Contributor

bors commented Oct 20, 2021

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing efd0483 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 20, 2021
@bors bors merged commit efd0483 into rust-lang:master Oct 20, 2021
@rustbot rustbot added this to the 1.58.0 milestone Oct 20, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (efd0483): comparison url.

Summary: This change led to moderate relevant mixed results 🤷 in compiler performance.

  • Moderate improvement in instruction counts (up to -2.0% on incr-unchanged builds of helloworld)
  • Moderate regression in instruction counts (up to 0.9% on incr-unchanged builds of clap-rs)

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression

@cjgillot cjgillot deleted the qarray branch October 21, 2021 17:54
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 25, 2021
Build the query vtable directly.

Continuation of rust-lang#89978.

This shrinks the query interface and attempts to reduce the amount of function pointer calls.
@Mark-Simulacrum
Copy link
Member

Marking as triaged per earlier comments, final results seem consistent with earlier ones.

@rustbot label +perf-regression-triaged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. 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.

None yet

5 participants