Skip to content

Defer extra liveness calculation for Polonius Alpha - #161938

Open
jackh726 wants to merge 4 commits into
rust-lang:mainfrom
jackh726:polonius-lazy-liveness-final
Open

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

Conversation

@jackh726

@jackh726 jackh726 commented Aug 28, 2026

Copy link
Copy Markdown
Member

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 3 times, most recently 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
@rust-cloud-vms
rust-cloud-vms Bot force-pushed the polonius-lazy-liveness-final branch from 29b9558 to fead75b Compare September 1, 2026 17:12
@jackh726
jackh726 marked this pull request as ready for review September 1, 2026 17:13
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 1, 2026
@rust-bors

rust-bors Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

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

@jackh726

jackh726 commented Sep 4, 2026

Copy link
Copy Markdown
Member Author

@craterbot check

As discussed today, this adds more region constraints for points that have drop locations but are not drop live - which could have some implications on things that use sccs.

@craterbot

Copy link
Copy Markdown
Collaborator

👌 Experiment pr-161938 created and queued.
🤖 Automatically detected try build f904a04
⚠️ Try build based on commit 29b9558, but latest commit is fead75b. Did you forget to make a new try build?
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 4, 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-crater Status: Waiting on a crater run to be completed. 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.

6 participants