Skip to content

Reenable limited top-down MIR inlining #106364

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

Merged
merged 1 commit into from
Jan 3, 2023

Conversation

JakobDegen
Copy link
Contributor

Reverts most of #105119 and uses an alternative strategy to prevent exponential blowup. Specifically, we allow doing top-down inlining up to depth at most five, and for at most one call site per nested body.

r? @cjgillot

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 2, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jan 2, 2023

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 2, 2023
@JakobDegen
Copy link
Contributor 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 Jan 2, 2023
@bors
Copy link
Collaborator

bors commented Jan 2, 2023

⌛ Trying commit ee6503a with merge a865f33a588ffb31c0260ef8947f00ab25dfa033...

@bors
Copy link
Collaborator

bors commented Jan 2, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a865f33a588ffb31c0260ef8947f00ab25dfa033): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

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 a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.4% [0.2%, 1.1%] 20
Regressions ❌
(secondary)
0.6% [0.3%, 1.7%] 11
Improvements ✅
(primary)
-0.4% [-1.2%, -0.2%] 21
Improvements ✅
(secondary)
-0.7% [-2.0%, -0.3%] 20
All ❌✅ (primary) -0.0% [-1.2%, 1.1%] 41

Max RSS (memory usage)

Results

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)
2.3% [0.8%, 4.1%] 5
Regressions ❌
(secondary)
3.2% [3.2%, 3.2%] 1
Improvements ✅
(primary)
-2.1% [-2.9%, -0.4%] 6
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.1% [-2.9%, 4.1%] 11

Cycles

Results

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)
-2.0% [-3.2%, -1.1%] 4
All ❌✅ (primary) - - 0

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jan 2, 2023
@cjgillot
Copy link
Contributor

cjgillot commented Jan 2, 2023

Thanks @JakobDegen.
Improvements pretty much balance regressions. Slightly more improvements than regressions in cycle average.
We are going back to the situation before the deactivation of MIR inlining.
@bors r+

@bors
Copy link
Collaborator

bors commented Jan 2, 2023

📌 Commit ee6503a has been approved by cjgillot

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 Jan 2, 2023
@bors
Copy link
Collaborator

bors commented Jan 2, 2023

⌛ Testing commit ee6503a with merge 67d1617...

@bors
Copy link
Collaborator

bors commented Jan 3, 2023

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing 67d1617 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 3, 2023
@bors bors merged commit 67d1617 into rust-lang:master Jan 3, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 3, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (67d1617): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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.5% [0.3%, 1.1%] 4
Regressions ❌
(secondary)
0.6% [0.5%, 0.6%] 4
Improvements ✅
(primary)
-0.6% [-1.2%, -0.2%] 9
Improvements ✅
(secondary)
-0.9% [-2.4%, -0.2%] 18
All ❌✅ (primary) -0.2% [-1.2%, 1.1%] 13

Max RSS (memory usage)

Results

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)
2.0% [1.0%, 4.3%] 9
Regressions ❌
(secondary)
2.1% [1.6%, 2.7%] 5
Improvements ✅
(primary)
-2.5% [-3.7%, -0.4%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.6% [-3.7%, 4.3%] 13

Cycles

Results

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)
-3.5% [-5.7%, -1.3%] 2
Improvements ✅
(secondary)
-1.9% [-2.4%, -1.6%] 4
All ❌✅ (primary) -3.5% [-5.7%, -1.3%] 2

@rylev
Copy link
Member

rylev commented Jan 3, 2023

As pointed out here this was effectively a performance wash with regressions and improvements canceling themselves out.

@rustbot label +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Jan 3, 2023
@JakobDegen JakobDegen deleted the top-down-inlining branch January 4, 2023 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. 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.

6 participants