Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Do partial SsaLocals analysis in unoptimized builds #134051

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

Draft
saethlin wants to merge 1 commit into rust-lang:master
base: master
Choose a base branch
Loading
from saethlin:partial-ssa-analysis

Conversation

Copy link
Member

@saethlin saethlin commented Dec 9, 2024
edited
Loading

I've been musing about the perf implications of all the queries that is_freeze results in.

(it's not like this makes GVN lightweight or light on queries overall, because evaluating consts is still quite a lot of queries)

@rustbot rustbot added 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. labels Dec 9, 2024
@saethlin saethlin added S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 9, 2024

This comment has been minimized.

Copy link
Member Author

saethlin commented Dec 9, 2024

@bors try @rust-timer queue

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 9, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 9, 2024
Do partial SsaLocals analysis in unoptimized builds
I've been musing about the perf implications of all the queries that `is_freeze` results in. Let's perf it. CI will fail because I'm too lazy to figure out what's going on with the mir-opt tests for now. If perf looks bad, it's not worth fixing the tests.
(it's not like this makes GVN lightweight or light on queries overall, because evaluating consts is still quite a lot of queries)
r? ghost
Copy link
Collaborator

bors commented Dec 9, 2024

⌛ Trying commit 696799b with merge 46ae8eb...

Copy link
Collaborator

bors commented Dec 9, 2024

☀️ Try build successful - checks-actions
Build commit: 46ae8eb (46ae8eb67ec584d3f0bbf4a2618c0d3b6e562473)

This comment has been minimized.

Copy link
Collaborator

Finished benchmarking commit (46ae8eb): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

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-perf +perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.7% [0.2%, 1.2%] 17
Regressions ❌
(secondary)
0.7% [0.1%, 1.1%] 8
Improvements ✅
(primary)
-0.5% [-0.9%, -0.2%] 21
Improvements ✅
(secondary)
-10.2% [-27.7%, -0.2%] 13
All ❌✅ (primary) 0.1% [-0.9%, 1.2%] 38

Max RSS (memory usage)

Results (primary 0.1%, secondary -14.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.9% [2.0%, 6.8%] 3
Regressions ❌
(secondary)
2.7% [2.6%, 3.0%] 3
Improvements ✅
(primary)
-2.1% [-3.7%, -1.0%] 5
Improvements ✅
(secondary)
-26.8% [-29.2%, -25.2%] 4
All ❌✅ (primary) 0.1% [-3.7%, 6.8%] 8

Cycles

Results (primary 1.0%, secondary -8.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.0% [1.0%, 1.1%] 2
Regressions ❌
(secondary)
8.1% [2.3%, 10.3%] 7
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-31.0% [-36.5%, -10.6%] 5
All ❌✅ (primary) 1.0% [1.0%, 1.1%] 2

Binary size

Results (primary -0.5%, secondary -4.7%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.2% [0.0%, 0.9%] 39
Regressions ❌
(secondary)
0.1% [0.1%, 0.2%] 8
Improvements ✅
(primary)
-1.2% [-6.2%, -0.0%] 33
Improvements ✅
(secondary)
-6.4% [-25.3%, -0.0%] 24
All ❌✅ (primary) -0.5% [-6.2%, 0.9%] 72

Bootstrap: 766.815s -> 768.247s (0.19%)
Artifact size: 330.84 MiB -> 330.83 MiB (-0.00%)

scottmcm and workingjubilee reacted with eyes emoji

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Dec 9, 2024
Copy link
Member Author

saethlin commented Dec 9, 2024
edited
Loading

Interesting. Looks like this removes ~98% of the LLVM time for deep-vector.

Also it looks for incr-unchanged and incr-patched builds we have a handful of improvements and no regressions, but for full and incr-full builds we're almost all regressions. The self-profile breakdown points to GVN as the culprit (of course) except for the image debug-full build where the regression is... in LLVM??? image debug-full is also the largest binary size regression which corroborates that. How strange.

This comment has been minimized.

Copy link
Member Author

@bors try @rust-timer queue

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 15, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 15, 2025
Do partial SsaLocals analysis in unoptimized builds
I've been musing about the perf implications of all the queries that `is_freeze` results in.
(it's not like this makes GVN lightweight or light on queries overall, because evaluating consts is still quite a lot of queries)
Copy link
Collaborator

bors commented Feb 15, 2025

⌛ Trying commit a013042 with merge ef3fe2f...

This comment has been minimized.

@saethlin saethlin force-pushed the partial-ssa-analysis branch 2 times, most recently from f73cd00 to 04cc82e Compare February 15, 2025 02:24

This comment has been minimized.

This comment has been minimized.

@rustbot rustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label Feb 15, 2025
Copy link
Member Author

@bors try @rust-timer queue

This comment has been minimized.

Copy link
Collaborator

bors commented Feb 15, 2025

⌛ Trying commit 1580046 with merge b14fa64...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 15, 2025
Do partial SsaLocals analysis in unoptimized builds
I've been musing about the perf implications of all the queries that `is_freeze` results in.
(it's not like this makes GVN lightweight or light on queries overall, because evaluating consts is still quite a lot of queries)
Copy link
Collaborator

bors commented Feb 15, 2025

☀️ Try build successful - checks-actions
Build commit: b14fa64 (b14fa6478d5f801a9257f06e5ad8527530b7cfee)

This comment has been minimized.

Copy link
Collaborator

Finished benchmarking commit (b14fa64): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

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-perf +perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.7% [0.2%, 1.2%] 23
Regressions ❌
(secondary)
0.5% [0.1%, 1.0%] 8
Improvements ✅
(primary)
-0.4% [-1.0%, -0.2%] 26
Improvements ✅
(secondary)
-0.8% [-1.4%, -0.2%] 9
All ❌✅ (primary) 0.1% [-1.0%, 1.2%] 49

Max RSS (memory usage)

Results (primary 2.7%, secondary -3.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
5.7% [3.1%, 10.5%] 5
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.4% [-2.9%, -2.1%] 3
Improvements ✅
(secondary)
-3.2% [-3.2%, -3.2%] 1
All ❌✅ (primary) 2.7% [-2.9%, 10.5%] 8

Cycles

Results (primary 1.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.0% [1.0%, 1.0%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.0% [1.0%, 1.0%] 1

Binary size

Results (primary -0.4%, secondary -1.1%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.2% [0.0%, 0.9%] 30
Regressions ❌
(secondary)
0.1% [0.1%, 0.2%] 8
Improvements ✅
(primary)
-0.7% [-3.5%, -0.0%] 50
Improvements ✅
(secondary)
-1.7% [-6.1%, -0.0%] 18
All ❌✅ (primary) -0.4% [-3.5%, 0.9%] 80

Bootstrap: 790.529s -> 790.638s (0.01%)
Artifact size: 347.33 MiB -> 347.26 MiB (-0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 15, 2025

This comment has been minimized.

Copy link
Collaborator

bors commented Apr 3, 2025

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

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 3, 2025

This comment has been minimized.

Copy link
Collaborator

bors commented Apr 20, 2025

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

@saethlin saethlin force-pushed the partial-ssa-analysis branch from 2ece31b to 4845532 Compare May 2, 2025 02:43
Copy link
Collaborator

bors commented Jun 4, 2025

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

Copy link
Collaborator

The job tidy failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

added 291 packages in 40s
Running eslint on rustdoc JS files
info: ES-Check: there were no ES version matching errors! 🎉
some tidy checks failed
Command `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools-bin/rust-tidy /checkout /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo /checkout/obj/build 4 /node/bin/npm --extra-checks=py,cpp,js,spellcheck` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/tool.rs:1548:23
Executed at: src/bootstrap/src/core/build_steps/test.rs:1280:29
Command has failed. Rerun with -v to see more details.
Bootstrap failed while executing `test src/tools/tidy tidyselftest --extra-checks=py,cpp,js,spellcheck`
Build completed unsuccessfully in 0:03:12
 local time: Wed Sep 3 05:56:20 UTC 2025
 network time: 2025年9月03日 05:56:21 GMT
##[error]Process completed with exit code 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
A-run-make Area: port run-make Makefiles to rmake.rs perf-regression Performance regression. S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /