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

Avoid some redundant work in GVN #119439

Merged
merged 4 commits into from
Jan 16, 2024
Merged

Avoid some redundant work in GVN #119439

merged 4 commits into from
Jan 16, 2024

Conversation

cjgillot
Copy link
Contributor

The first 2 commits are about reducing the perf effect.

Third commit avoids doing redundant work: is a local is SSA, it already has been simplified, and the resulting value is in self.locals. No need to call any code on it.

The last commit avoids removing some storage statements.

r? wg-mir-opt

@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 Dec 30, 2023
@rustbot
Copy link
Collaborator

rustbot commented Dec 30, 2023

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@cjgillot
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 Dec 30, 2023
@cjgillot cjgillot added the A-mir-opt Area: MIR optimizations label Dec 30, 2023
@bors
Copy link
Contributor

bors commented Dec 30, 2023

⌛ Trying commit abc3f62 with merge 13099a3...

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 30, 2023
Avoid some redundant work in GVN

The first 2 commits are about reducing the perf effect.

Third commit avoids doing redundant work: is a local is SSA, it already has been simplified, and the resulting value is in `self.locals`. No need to call any code on it.

The last commit avoids removing some storage statements.

r? wg-mir-opt
@bors
Copy link
Contributor

bors commented Dec 30, 2023

☀️ Try build successful - checks-actions
Build commit: 13099a3 (13099a3967124ca0416b78ee139e3fe856be6b4e)

1 similar comment
@bors
Copy link
Contributor

bors commented Dec 30, 2023

☀️ Try build successful - checks-actions
Build commit: 13099a3 (13099a3967124ca0416b78ee139e3fe856be6b4e)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (13099a3): 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.8% [0.7%, 0.8%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.5% [-0.7%, -0.3%] 4
Improvements ✅
(secondary)
-0.4% [-0.4%, -0.4%] 1
All ❌✅ (primary) 0.0% [-0.7%, 0.8%] 7

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.9% [0.2%, 5.9%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-4.1% [-7.6%, -0.5%] 3
Improvements ✅
(secondary)
-2.3% [-2.3%, -2.3%] 1
All ❌✅ (primary) -0.6% [-7.6%, 5.9%] 6

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)
1.0% [1.0%, 1.0%] 2
Regressions ❌
(secondary)
2.8% [2.0%, 3.8%] 8
Improvements ✅
(primary)
-0.6% [-0.7%, -0.5%] 2
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.1%] 2
All ❌✅ (primary) 0.2% [-0.7%, 1.0%] 4

Binary size

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.1% [0.0%, 0.6%] 29
Regressions ❌
(secondary)
0.1% [0.0%, 0.2%] 2
Improvements ✅
(primary)
-0.3% [-0.6%, -0.0%] 7
Improvements ✅
(secondary)
-0.8% [-1.1%, -0.6%] 6
All ❌✅ (primary) 0.1% [-0.6%, 0.6%] 36

Bootstrap: 667.681s -> 669.659s (0.30%)
Artifact size: 311.77 MiB -> 311.76 MiB (-0.00%)

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

r? wg-mir-opt

@rustbot rustbot assigned oli-obk and unassigned JakobDegen Jan 12, 2024
@oli-obk
Copy link
Contributor

oli-obk commented Jan 15, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Jan 15, 2024

📌 Commit 7e39100 has been approved by oli-obk

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 15, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 15, 2024
Avoid some redundant work in GVN

The first 2 commits are about reducing the perf effect.

Third commit avoids doing redundant work: is a local is SSA, it already has been simplified, and the resulting value is in `self.locals`. No need to call any code on it.

The last commit avoids removing some storage statements.

r? wg-mir-opt
@bors
Copy link
Contributor

bors commented Jan 15, 2024

⌛ Testing commit 7e39100 with merge 2b69aec...

@bors
Copy link
Contributor

bors commented Jan 15, 2024

💔 Test failed - checks-actions

@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 15, 2024
@cjgillot
Copy link
Contributor Author

@bors retry Could not resolve host: github.com

@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 15, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 15, 2024
Avoid some redundant work in GVN

The first 2 commits are about reducing the perf effect.

Third commit avoids doing redundant work: is a local is SSA, it already has been simplified, and the resulting value is in `self.locals`. No need to call any code on it.

The last commit avoids removing some storage statements.

r? wg-mir-opt
@bors
Copy link
Contributor

bors commented Jan 15, 2024

⌛ Testing commit 7e39100 with merge 14eda5b...

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] rustc_query_impl test:true 47.863
[RUSTC-TIMING] rustc_interface test:false 74.534
[RUSTC-TIMING] rustc_traits test:true 0.754
[RUSTC-TIMING] rustc_passes test:true 6.875
##[error]The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled.
##[group]Clock drift check
  local time: Tue Jan 16 00:02:28 UTC 2024
  network time: Tue, 16 Jan 2024 00:02:28 GMT
##[endgroup]
##[endgroup]
Session terminated, killing shell...[RUSTC-TIMING] rustc_borrowck test:true 15.315
 ...killed.
##[error]The operation was canceled.

@bors
Copy link
Contributor

bors commented Jan 16, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 16, 2024
@cjgillot
Copy link
Contributor Author

Shutdown signal, no visible reason.
@bors retry

@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 16, 2024
@bors
Copy link
Contributor

bors commented Jan 16, 2024

⌛ Testing commit 7e39100 with merge f9c2421...

@bors
Copy link
Contributor

bors commented Jan 16, 2024

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing f9c2421 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 16, 2024
@bors bors merged commit f9c2421 into rust-lang:master Jan 16, 2024
12 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Jan 16, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f9c2421): 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.8% [0.6%, 0.9%] 4
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.7% [-1.1%, -0.5%] 4
Improvements ✅
(secondary)
-0.4% [-0.4%, -0.4%] 1
All ❌✅ (primary) 0.0% [-1.1%, 0.9%] 8

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)
1.1% [0.2%, 2.0%] 2
Regressions ❌
(secondary)
3.0% [3.0%, 3.0%] 1
Improvements ✅
(primary)
-3.2% [-4.2%, -2.3%] 2
Improvements ✅
(secondary)
-3.0% [-3.0%, -3.0%] 1
All ❌✅ (primary) -1.1% [-4.2%, 2.0%] 4

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

Binary size

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

Bootstrap: 667.744s -> 666.062s (-0.25%)
Artifact size: 308.24 MiB -> 308.24 MiB (0.00%)

@pnkfelix
Copy link
Member

  • primary regressions are regex-1.5.5 debug-full, opt-incr-patched:Job, incr-full, and exa opt-full.
  • the exa regression looks like a blip. The regex ones were predicted during a try run for the PR. I assume they were deemed acceptable as they are offset improvements elsewhere (or dismissed as noise?)
  • marking as triaged.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Jan 16, 2024
@cjgillot cjgillot deleted the gvn-faster branch January 16, 2024 22:19
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 20, 2024
Perform opportunistic simplifications during value numbering

~Based on rust-lang#109597
~Based on rust-lang#119439

Opening mostly for discussion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mir-opt Area: MIR optimizations 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.

8 participants