Skip to content

Defer extra liveness calculation for Polonius Alpha - #161938

Draft
jackh726 wants to merge 9 commits into
rust-lang:mainfrom
jackh726:polonius-lazy-liveness-final
Draft

Defer extra liveness calculation for Polonius Alpha#161938
jackh726 wants to merge 9 commits into
rust-lang:mainfrom
jackh726:polonius-lazy-liveness-final

Conversation

@jackh726

@jackh726 jackh726 commented Aug 28, 2026

Copy link
Copy Markdown
Member

Based on #161937

Best reviewed by commit.

This moves liveness calculation of NLL-boring/Polonius-relevant locals to be lazy. This allows us to skip unnecessary work.

r? lqd

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 28, 2026
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 28, 2026
@jackh726

Copy link
Copy Markdown
Member Author

@bors try @rust-time queue

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 28, 2026
Defer extra liveness calculation for Polonius Alpha
@jackh726

Copy link
Copy Markdown
Member Author

@rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 28, 2026
@jackh726

Copy link
Copy Markdown
Member Author

Disclosure: An LLM was used for experiments here, but all code here is written fresh.

@rust-log-analyzer

This comment has been minimized.

@rust-bors

rust-bors Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

πŸ’” Test for 254d008 failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms
rust-cloud-vms Bot force-pushed the polonius-lazy-liveness-final branch 2 times, most recently from 3af31e2 to ef46fa3 Compare August 28, 2026 15:51
@rust-cloud-vms
rust-cloud-vms Bot force-pushed the polonius-lazy-liveness-final branch from ef46fa3 to 29b9558 Compare August 28, 2026 15:52
@jackh726

Copy link
Copy Markdown
Member Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 28, 2026
Defer extra liveness calculation for Polonius Alpha
@rust-bors

rust-bors Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

β˜€οΈ Try build successful (CI)
Build commit: f904a04 (f904a046d815a8f17021ba39511de661f74c1612)
Base parent: 344f790 (344f7902949345394fa40a5d7dda31f012ccbc0d)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (f904a04): comparison URL.

Overall result: βŒβœ… regressions and improvements - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

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

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.4% [0.3%, 0.5%] 11
Regressions ❌
(secondary)
1.2% [0.1%, 3.5%] 20
Improvements βœ…
(primary)
-3.3% [-11.9%, -0.2%] 18
Improvements βœ…
(secondary)
-4.5% [-11.6%, -0.1%] 19
All βŒβœ… (primary) -1.9% [-11.9%, 0.5%] 29

Max RSS (memory usage)

Results (primary -2.0%, secondary 1.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.9% [0.8%, 9.2%] 16
Improvements βœ…
(primary)
-2.0% [-2.0%, -2.0%] 1
Improvements βœ…
(secondary)
-4.4% [-5.3%, -3.1%] 5
All βŒβœ… (primary) -2.0% [-2.0%, -2.0%] 1

Cycles

Results (primary -3.6%, secondary -5.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.6% [4.2%, 5.0%] 2
Improvements βœ…
(primary)
-3.6% [-4.4%, -3.0%] 6
Improvements βœ…
(secondary)
-6.9% [-19.1%, -2.3%] 14
All βŒβœ… (primary) -3.6% [-4.4%, -3.0%] 6

Binary size

Results (secondary -0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements βœ…
(primary)
- - 0
Improvements βœ…
(secondary)
-0.0% [-0.0%, -0.0%] 4
All βŒβœ… (primary) - - 0

Bootstrap: 475.673s -> 475.822s (0.03%)
Artifact size: 403.60 MiB -> 402.91 MiB (-0.17%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Aug 28, 2026
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-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

Development

Successfully merging this pull request may close these issues.

5 participants