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

Move RegionKind to rustc_type_ir #98247

Merged
merged 1 commit into from
Jun 19, 2022

Conversation

jackh726
Copy link
Member

@jackh726 jackh726 commented Jun 19, 2022

(Also UniverseIndex)

r? rust-lang/types

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 19, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 19, 2022
@jackh726
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 19, 2022
@bors
Copy link
Contributor

bors commented Jun 19, 2022

⌛ Trying commit 1e9f8df with merge 4d6ba22fc03b88084f993c67596efbdcf8b0c96d...

@compiler-errors
Copy link
Member

Looks great! I'll give it another look-over once perf gets back and CI looks green, but glad to see that this was a much simpler move than migrating TyKind.

@jackh726
Copy link
Member Author

Looks great! I'll give it another look-over once perf gets back and CI looks green, but glad to see that this was a much simpler move than migrating TyKind.

So much simpler! The worst part was writing the impls 🙃

@compiler-errors
Copy link
Member

compiler-errors commented Jun 19, 2022

Oh, did you write them by hand? When I made them for TyKind, I just got them from cargo-expand + a lot of string replacement to clean them up. If you did write them by hand, I'll make sure to give them a particularly close looking over for correctness.

@jackh726
Copy link
Member Author

Oh, did you write them by hand? When I made them for TyKind, I just got them from cargo-expand + a lot of string replacement to clean them up. If you did write them by hand, I'll make sure to give them a particularly close looking over for correctness.

Yeah, I did. Probably would have been roughly the same time to do the other way.

@bors
Copy link
Contributor

bors commented Jun 19, 2022

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

@rust-timer
Copy link
Collaborator

Queued 4d6ba22fc03b88084f993c67596efbdcf8b0c96d with parent 3b98c08, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4d6ba22fc03b88084f993c67596efbdcf8b0c96d): comparison url.

Instruction count

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

Max RSS (memory usage)

Results
  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 😿 relevant regression found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
1.7% 1.7% 1
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) N/A N/A 0

Cycles

Results
  • Primary benchmarks: mixed results
  • Secondary benchmarks: 😿 relevant regressions found
mean1 max count2
Regressions 😿
(primary)
2.1% 2.1% 1
Regressions 😿
(secondary)
2.5% 2.9% 7
Improvements 🎉
(primary)
-2.5% -2.5% 1
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) -0.2% -2.5% 2

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

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-review -S-waiting-on-perf -perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 19, 2022
Comment on lines +1154 to +1155
// This is manually implemented because a derive would require `I: Copy`
impl<I: Interner> Copy for RegionKind<I>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it matter that derive would introduce that bound? In chalk, Copy is a supertrait of Interner; and in rustc, isn't I just a shared ref to the type context (which therefore is indeed Copy)?

I guess the same should apply for Clone even though it is not strictly a supertrait of Interner? After all, requiring I: Clone shouldn't be restrictive if we know that I: Copy.

As an aside, I wonder whether there wouldn't be some ergonomic benefit to using a derivative-like macro here to workaround #26925 without requiring all these manual impls?

@compiler-errors
Copy link
Member

@bors r+

🎉

@bors
Copy link
Contributor

bors commented Jun 19, 2022

📌 Commit 1e9f8df has been approved by compiler-errors

@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 Jun 19, 2022
@bors
Copy link
Contributor

bors commented Jun 19, 2022

⌛ Testing commit 1e9f8df with merge bb8c2f4...

@bors
Copy link
Contributor

bors commented Jun 19, 2022

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 19, 2022
@bors bors merged commit bb8c2f4 into rust-lang:master Jun 19, 2022
@rustbot rustbot added this to the 1.63.0 milestone Jun 19, 2022
jsha pushed a commit to jsha/rust that referenced this pull request Jun 19, 2022
…compiler-errors

Move RegionKind to rustc_type_ir

(Also UniverseIndex)

r? rust-lang/types
@jackh726 jackh726 deleted the regionkind-rustc-type-ir branch June 19, 2022 23:23
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bb8c2f4): comparison url.

Instruction count

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 😿 relevant regression found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
0.4% 0.4% 1
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) N/A N/A 0

Max RSS (memory usage)

Results
  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 😿 relevant regression found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
3.5% 3.5% 1
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) N/A N/A 0

Cycles

Results
  • Primary benchmarks: 🎉 relevant improvement found
  • Secondary benchmarks: no relevant changes found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
-2.7% -2.7% 1
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) -2.7% -2.7% 1

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

JohnTitor added a commit to JohnTitor/rust-semverver that referenced this pull request Jun 20, 2022
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
JohnTitor added a commit to JohnTitor/rust-semverver that referenced this pull request Jun 20, 2022
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
bors added a commit to rust-lang/rust-semverver that referenced this pull request Jun 22, 2022
Rustup to rust-lang/rust#98247

Closes #320

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
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