Skip to content

Enable polonius alpha on nightly#159343

Draft
jackh726 wants to merge 3 commits into
rust-lang:mainfrom
jackh726:enable-polonius-alpha
Draft

Enable polonius alpha on nightly#159343
jackh726 wants to merge 3 commits into
rust-lang:mainfrom
jackh726:enable-polonius-alpha

Conversation

@jackh726

Copy link
Copy Markdown
Member

See rust-lang/compiler-team#

The first commit here adds an -Zpolonius=nll argument for tests and so people can disable alpha on nightly.

@rustbot rustbot added 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. labels Jul 15, 2026
@jackh726

Copy link
Copy Markdown
Member Author

@bors try @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 Jul 15, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 15, 2026
@rust-bors

rust-bors Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 24e1a22 (24e1a22664233bce1f9b5dc6eee7c1f74327e28c)
Base parent: df1ae0f (df1ae0f7dd168513de2d89beb2cb7a95d4fdc118)

@rust-timer

This comment has been minimized.

@jackh726

Copy link
Copy Markdown
Member Author

@craterbot check p=1

(priority bump b/c we want to get this enabled for testing)

@craterbot

Copy link
Copy Markdown
Collaborator

👌 Experiment pr-159343 created and queued.
🤖 Automatically detected try build 24e1a22
🔍 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-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jul 15, 2026
@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (24e1a22): 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)
3.0% [0.3%, 15.3%] 88
Regressions ❌
(secondary)
2.1% [0.2%, 15.1%] 102
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.1% [-1.2%, -1.0%] 6
All ❌✅ (primary) 3.0% [0.3%, 15.3%] 88

Max RSS (memory usage)

Results (primary 4.2%, secondary 3.2%)

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

mean range count
Regressions ❌
(primary)
4.2% [2.1%, 7.7%] 6
Regressions ❌
(secondary)
6.2% [2.0%, 11.7%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.3% [-6.2%, -2.4%] 2
All ❌✅ (primary) 4.2% [2.1%, 7.7%] 6

Cycles

Results (primary 4.2%, secondary 4.6%)

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

mean range count
Regressions ❌
(primary)
4.2% [1.8%, 8.4%] 25
Regressions ❌
(secondary)
4.6% [2.1%, 7.1%] 21
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 4.2% [1.8%, 8.4%] 25

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 487.651s -> 492.438s (0.98%)
Artifact size: 389.37 MiB -> 389.64 MiB (0.07%)

@rustbot rustbot added the perf-regression Performance regression. label Jul 15, 2026
@Kobzol

Kobzol commented Jul 16, 2026

Copy link
Copy Markdown
Member

The way we enabled nightly-only for LLD was through a build configuration in bootstrap, I think that's a more explicit way, and will be easier to revert/modify on beta/stable, than to have that code in the compiler. If we did it like this PR does currently, then Polonius would be used by default if you use RUSTC_BOOTSTRAP=1 on stable, which is not ideal, I think. I'm pretty sure we set that flag kinda randomly all over bootstrap even on stable/beta toolchains, that would produce a lot of confusion.

If we did it through bootstrap, then there would be an env variable or a cfg that would be set by bootstrap at rustc build time, which would select the default mode and hardcode it when we build rustc.

@jackh726

Copy link
Copy Markdown
Member Author

@lqd said something similar to me. I'll take stab at it. As to whether RUSTC_BOOTSTRAP=1 should enable this, idk. Probably not,

@craterbot

Copy link
Copy Markdown
Collaborator

🚧 Experiment pr-159343 is now running

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

@craterbot

Copy link
Copy Markdown
Collaborator

🎉 Experiment pr-159343 is completed!
📊 2 regressed and 18 fixed (1026208 total)
📊 5682 spurious results on the retry-regressed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-159343/retry-regressed-list.txt

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Jul 19, 2026
@jackh726

Copy link
Copy Markdown
Member Author

@craterbot check p=2 crates=https://crater-reports.s3.amazonaws.com/pr-159343/retry-regressed-list.txt name=pr-159343-retry

Let's recheck this to see how we're doing. Wondering if these are performance-related.

@craterbot

Copy link
Copy Markdown
Collaborator

👌 Experiment pr-159343-retry created and queued.
🤖 Automatically detected try build 24e1a22
🔍 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 Jul 21, 2026
@rust-cloud-vms
rust-cloud-vms Bot force-pushed the enable-polonius-alpha branch from 0006999 to 3379bb5 Compare July 21, 2026 18:12
@craterbot

Copy link
Copy Markdown
Collaborator

🚧 Experiment pr-159343-retry is now running

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

@rust-cloud-vms
rust-cloud-vms Bot force-pushed the enable-polonius-alpha branch from 3379bb5 to f7d91a7 Compare July 22, 2026 18:07
@craterbot

Copy link
Copy Markdown
Collaborator

🎉 Experiment pr-159343-retry is completed!
📊 0 regressed and 0 fixed (5632 total)
📊 773 spurious results on the retry-regressed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-159343-retry/retry-regressed-list.txt

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Jul 22, 2026
@rust-bors

rust-bors Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

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

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.

5 participants