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

interpret: make read/write methods generic #114071

Merged
merged 4 commits into from Jul 26, 2023

Conversation

RalfJung
Copy link
Member

Instead of always having to call into() to convert things to PlaceTy/OpTy, make the relevant methods generic. This also means that when we read from an MPlaceTy, we avoid creating an intermediate PlaceTy.

This makes it feasible to remove the Copy from MPlaceTy. All the other *Ty interpreter types already had their Copy removed a while ago so this is only consistent. (And in fact we had one function that accidentally took MPlaceTy instead of &MPlaceTy.)

@rustbot
Copy link
Collaborator

rustbot commented Jul 25, 2023

r? @compiler-errors

(rustbot has picked a reviewer for you, use r? to override)

@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 Jul 25, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jul 25, 2023

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

The Miri subtree was changed

cc @rust-lang/miri

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@RalfJung
Copy link
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 25, 2023
@bors
Copy link
Contributor

bors commented Jul 25, 2023

⌛ Trying commit da3f0d0 with merge 738bde30e78de08f74c5b5bdb48306ca11d06d90...

@bors
Copy link
Contributor

bors commented Jul 25, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (738bde30e78de08f74c5b5bdb48306ca11d06d90): comparison URL.

Overall result: ✅ improvements - no 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.

@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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.9% [-2.1%, -1.6%] 6
All ❌✅ (primary) - - 0

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)
3.2% [3.2%, 3.2%] 1
Regressions ❌
(secondary)
3.6% [3.6%, 3.6%] 1
Improvements ✅
(primary)
-2.1% [-2.1%, -2.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.6% [-2.1%, 3.2%] 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)
4.1% [2.3%, 6.1%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-7.6% [-7.9%, -7.3%] 3
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 650.593s -> 650.759s (0.03%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 26, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Jul 26, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Jul 26, 2023

📌 Commit 12b9c96c9ea960060072fc01d802b6430a0f59be 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 Jul 26, 2023
@RalfJung RalfJung force-pushed the interpret-generic-read-write branch from 12b9c96 to 571e8ce Compare July 26, 2023 09:45
@RalfJung
Copy link
Member Author

Found some more unnecessary &mut around valtree_into_mplace

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Jul 26, 2023

📌 Commit 571e8ce has been approved by oli-obk

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jul 26, 2023

⌛ Testing commit 571e8ce with merge bd9785c...

@bors
Copy link
Contributor

bors commented Jul 26, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 26, 2023
@bors bors merged commit bd9785c into rust-lang:master Jul 26, 2023
12 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Jul 26, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bd9785c): 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
Improvements ✅
(secondary)
-1.9% [-2.1%, -1.7%] 6
All ❌✅ (primary) - - 0

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.6% [2.6%, 2.6%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.6% [2.6%, 2.6%] 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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.6% [-8.5%, -1.8%] 10
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 650.097s -> 650.721s (0.10%)

@RalfJung RalfJung deleted the interpret-generic-read-write branch July 26, 2023 21:26
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.

None yet

6 participants