Skip to content

Steal MIR for CTFE when possible. #114502

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
Aug 6, 2023
Merged

Conversation

cjgillot
Copy link
Contributor

@cjgillot cjgillot commented Aug 5, 2023

Some bodies, like constants, have CTFE MIR but no optimized MIR.
In that case, have mir_for_ctfe steal the MIR instead of cloning it.

@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 5, 2023
@cjgillot
Copy link
Contributor Author

cjgillot commented Aug 5, 2023

@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 Aug 5, 2023
@bors
Copy link
Collaborator

bors commented Aug 5, 2023

⌛ Trying commit 3e01572c4e541200d43f848893f591714bfa3656 with merge b8b2be5074b7b3846f46bb9c363baa66d7685448...

@bors
Copy link
Collaborator

bors commented Aug 5, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b8b2be5074b7b3846f46bb9c363baa66d7685448): 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)
1.3% [0.8%, 1.4%] 7
Regressions ❌
(secondary)
0.8% [0.5%, 1.0%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.4% [-2.6%, -0.6%] 19
All ❌✅ (primary) 1.3% [0.8%, 1.4%] 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)
- - 0
Regressions ❌
(secondary)
2.7% [2.7%, 2.7%] 1
Improvements ✅
(primary)
-1.1% [-1.4%, -0.8%] 2
Improvements ✅
(secondary)
-2.6% [-4.3%, -1.2%] 10
All ❌✅ (primary) -1.1% [-1.4%, -0.8%] 2

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)
-11.6% [-12.5%, -11.0%] 6
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 650.338s -> 649.841s (-0.08%)

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

cjgillot commented Aug 5, 2023

instr-count is balanced, while cycle count and max-rss appear greener.
r? compiler

@cjgillot cjgillot marked this pull request as ready for review August 5, 2023 21:21
@rustbot
Copy link
Collaborator

rustbot commented Aug 5, 2023

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@lqd
Copy link
Member

lqd commented Aug 5, 2023

and the incremental compilation benchmarks have been quite noisy on bitmaps yesterday/today

@oli-obk
Copy link
Contributor

oli-obk commented Aug 6, 2023

r? @oli-obk

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 6, 2023

📌 Commit 02e10a0 has been approved by oli-obk

It is now in the queue for this repository.

@rustbot rustbot assigned oli-obk and unassigned TaKO8Ki Aug 6, 2023
@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 6, 2023
@bors
Copy link
Collaborator

bors commented Aug 6, 2023

⌛ Testing commit 02e10a0 with merge f362387...

@bors
Copy link
Collaborator

bors commented Aug 6, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 6, 2023
@bors bors merged commit f362387 into rust-lang:master Aug 6, 2023
@rustbot rustbot added this to the 1.73.0 milestone Aug 6, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f362387): 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.6% [-0.6%, -0.6%] 1
Improvements ✅
(secondary)
-1.5% [-2.6%, -0.5%] 19
All ❌✅ (primary) -0.6% [-0.6%, -0.6%] 1

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.3% [1.3%, 1.3%] 1
Regressions ❌
(secondary)
1.4% [1.4%, 1.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.7% [-4.3%, -1.9%] 7
All ❌✅ (primary) 1.3% [1.3%, 1.3%] 1

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)
5.8% [4.8%, 6.7%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.4%, -2.0%] 3
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 651.433s -> 650.04s (-0.21%)

@rustbot rustbot removed the perf-regression Performance regression. label Aug 7, 2023
@cjgillot cjgillot deleted the steal-ctfe branch August 7, 2023 17:33
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. 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.

7 participants