Skip to content

Optimize const_prop mir-opt by writing the layouts to ext #96213

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

Closed
wants to merge 1 commit into from

Conversation

SparrowLii
Copy link
Member

From the FIXME in the const_prop mir-opt.
Write layouts of locals to ext in advance, which should reduce the invocation of layout_of query and thus reduce compilation time.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 19, 2022
@rust-highfive
Copy link
Contributor

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 Apr 19, 2022
@petrochenkov
Copy link
Contributor

r? @oli-obk (as suggested by github)

@wesleywiser
Copy link
Member

@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 Apr 19, 2022
@bors
Copy link
Collaborator

bors commented Apr 19, 2022

⌛ Trying commit 2fb2960 with merge 5577c9a78853cb76c76e642a7d972afa992a0b22...

@bors
Copy link
Collaborator

bors commented Apr 19, 2022

☀️ Try build successful - checks-actions
Build commit: 5577c9a78853cb76c76e642a7d972afa992a0b22 (5577c9a78853cb76c76e642a7d972afa992a0b22)

@rust-timer
Copy link
Collaborator

Queued 5577c9a78853cb76c76e642a7d972afa992a0b22 with parent c102c5c, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5577c9a78853cb76c76e642a7d972afa992a0b22): comparison url.

Summary:

  • Primary benchmarks: 😿 relevant regression found
  • Secondary benchmarks: 😿 relevant regressions found
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 1 8 0 0 1
mean2 2.1% 0.6% N/A N/A 2.1%
max 2.1% 1.2% N/A N/A 2.1%

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 may lead 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

Footnotes

  1. number of relevant changes

  2. the arithmetic mean of the percent change

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Apr 19, 2022
@SparrowLii
Copy link
Member Author

It seems that writing layouts of locals into ext hardly helps in reducing compilation time. I think this PR can be closed, and maybe this FIXME can also be removed?

@oli-obk
Copy link
Contributor

oli-obk commented Apr 20, 2022

Yea, that sounds reasonable

@SparrowLii SparrowLii closed this Apr 20, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 24, 2022
Optimize `const_prop` mir-opt by accessing `local_decls` through `ecx`

From the FIXME in the impl of `ConstPropagator`. Accessing `local_decls` and `scource_scopes` from `ecx` can reduce `clone` calls and save compile time.
Besides, according to rust-lang#96213 , the FIXME about writing `layouts` to `ecx` in advance can also be removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf-regression Performance regression. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants