Skip to content
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

Use a reduced recursion limit in the MIR inliner's cycle breaker #129714

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

saethlin
Copy link
Member

@saethlin saethlin commented Aug 28, 2024

This probably papers over #128887, but primarily I'm opening this PR because multiple compiler people have thought about making this change which probably means it's a good idea.

r? compiler-errors

@saethlin saethlin added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 28, 2024
@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 Aug 28, 2024
@rustbot
Copy link
Collaborator

rustbot commented Aug 28, 2024

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Member

@bors r+ rollup=never

@bors
Copy link
Contributor

bors commented Aug 29, 2024

📌 Commit 950437a has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 29, 2024
@compiler-errors
Copy link
Member

Ideally we'd have a UI test for this, but presumably it depends too much on the def path ordering hack? Or were you just too lazy to add a test, @saethlin?

@saethlin
Copy link
Member Author

I'm too lazy, but also you're right that a UI test would be probabilistic, though we have at least one of those already.

@compiler-errors
Copy link
Member

@saethlin: In the future please make sure to bundle observable changes to the compiler with a UI test if possible, even if it's probabilistic :^)

@saethlin
Copy link
Member Author

I can probably add a ui test to this tomorrow

@wesleywiser
Copy link
Member

@bors p=1

Candidate for backport to 1.81.

@apiraino
Copy link
Contributor

Beta backport accepted as per compiler team on Zulip. A backport PR will be authored by the release team at the end of the current development cycle.

@rustbot label +beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Aug 29, 2024
@bors
Copy link
Contributor

bors commented Aug 29, 2024

⌛ Testing commit 950437a with merge 784d444...

@bors
Copy link
Contributor

bors commented Aug 29, 2024

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 784d444 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 29, 2024
@bors bors merged commit 784d444 into rust-lang:master Aug 29, 2024
7 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 29, 2024
@saethlin saethlin deleted the half-a-recursion branch August 29, 2024 19:38
@cuviper cuviper mentioned this pull request Aug 29, 2024
@cuviper cuviper modified the milestones: 1.82.0, 1.81.0 Aug 29, 2024
@cuviper cuviper removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 29, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (784d444): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

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

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: missing data
Artifact size: 338.70 MiB -> 338.73 MiB (0.01%)

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 30, 2024
[beta] backports

- Emit specific message for `time<0.3.35` inference failure rust-lang#129343
- Use a reduced recursion limit in the MIR inliner's cycle breaker rust-lang#129714
- rustdoc: do not run doctests with invalid langstrings rust-lang#128838

r? cuviper
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 30, 2024
[beta] backports

- Emit specific message for `time<0.3.35` inference failure rust-lang#129343
- Use a reduced recursion limit in the MIR inliner's cycle breaker rust-lang#129714
- rustdoc: do not run doctests with invalid langstrings rust-lang#128838

r? cuviper
@Kobzol
Copy link
Contributor

Kobzol commented Aug 30, 2024

Something weird has happened here. Bootstrap was not benchmarked and only a subset of the normal benchmarks was executed. In the following merge, bootstrap was measured fine, but we also only got a subset of results, because it was compared with this PR. The next merged PR should show us whether it was a transient issue.

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 30, 2024
[beta] backports

- Emit specific message for `time<0.3.35` inference failure rust-lang#129343
- Use a reduced recursion limit in the MIR inliner's cycle breaker rust-lang#129714
- rustdoc: do not run doctests with invalid langstrings rust-lang#128838

r? cuviper
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 30, 2024
[beta] backports

- Emit specific message for `time<0.3.35` inference failure rust-lang#129343
- Use a reduced recursion limit in the MIR inliner's cycle breaker rust-lang#129714
- rustdoc: do not run doctests with invalid langstrings rust-lang#128838

r? cuviper
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 31, 2024
[beta] backports

- Emit specific message for `time<0.3.35` inference failure rust-lang#129343
- Use a reduced recursion limit in the MIR inliner's cycle breaker rust-lang#129714
- rustdoc: do not run doctests with invalid langstrings rust-lang#128838

r? cuviper
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 31, 2024
[beta] backports

- Emit specific message for `time<0.3.35` inference failure rust-lang#129343
- Use a reduced recursion limit in the MIR inliner's cycle breaker rust-lang#129714
- rustdoc: do not run doctests with invalid langstrings rust-lang#128838

r? cuviper
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 31, 2024
[beta] backports

- Emit specific message for `time<0.3.35` inference failure rust-lang#129343
- Use a reduced recursion limit in the MIR inliner's cycle breaker rust-lang#129714
- rustdoc: do not run doctests with invalid langstrings rust-lang#128838

r? cuviper
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 1, 2024
[do not merge] test rust-lang#129714 revert on bootstrap times

It seems we're currently experiencing some instability with the benchmarking results. rust-lang#129714 had weird results, somehow failing to measure bootstrap and other benchmarks. Since then bootstrap measurements [have also increased](https://perf.rust-lang.org/bootstrap.html). Let's see if a revert does anything to bootstrap times at the very least, to see if the PR is maybe involved.

r? ghost
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 1, 2024
[do not merge] test rust-lang#129714 revert on bootstrap times

It seems we're currently experiencing some instability with the benchmarking results. rust-lang#129714 had weird results, somehow failing to measure bootstrap and other benchmarks. Since then bootstrap measurements [have also increased](https://perf.rust-lang.org/bootstrap.html). Let's see if a revert does anything to bootstrap times at the very least, to see if the PR is maybe involved.

r? ghost
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (784d444): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

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

Max RSS (memory usage)

Results (primary -2.2%, secondary 0.9%)

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
Regressions ❌
(secondary)
0.9% [0.9%, 0.9%] 1
Improvements ✅
(primary)
-2.2% [-2.2%, -2.2%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.2% [-2.2%, -2.2%] 1

Cycles

Results (secondary -1.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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.7% [-1.7%, -1.7%] 1
All ❌✅ (primary) - - 0

Binary size

Results (secondary -0.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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 1
All ❌✅ (primary) - - 0

Bootstrap: 791.88s -> 787.871s (-0.51%)
Artifact size: 338.70 MiB -> 338.73 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

10 participants