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 DepKindStruct from rustc_middle to rustc_query_system #101710

Merged
merged 4 commits into from
Sep 26, 2022

Conversation

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 12, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 12, 2022
Comment on lines 177 to 180
fn extract_def_id<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Option<DefId> {
if self.kind.fingerprint_style(tcx) == FingerprintStyle::DefPathHash {
if tcx.fingerprint_style(self.kind) == FingerprintStyle::DefPathHash {
Some(tcx.def_path_hash_to_def_id(DefPathHash(self.hash.into()), &mut || {
Copy link
Member Author

Choose a reason for hiding this comment

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

This can't be moved to rustc_query_system without adding def_path_hash_to_def_id to the DepContext trait; I can do that, but not sure it was worth the churn. Let me know and I'm happy to change it.

compiler/rustc_middle/src/dep_graph/mod.rs Outdated Show resolved Hide resolved
Comment on lines 76 to 73
fn from_label_string(label: &str) -> Result<Self, ()> {
dep_node::dep_kind_from_label_string(label)
Copy link
Member Author

Choose a reason for hiding this comment

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

needed for the functions I removed from the DepNodeExt trait

Comment on lines -43 to +55
fn try_force_from_dep_node(&self, dep_node: DepNode<Self::DepKind>) -> bool;
fn try_force_from_dep_node(self, dep_node: DepNode<Self::DepKind>) -> bool {
Copy link
Member Author

Choose a reason for hiding this comment

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

It's possible to make these and the others standalone functions instead of part of the trait, but then I have to change the callsites from tcx.is_eval_always(kind) to is_eval_always(tcx, kind) (and deal with privacy, re-exports, etc). Let me know if you'd prefer I change it.

@cjgillot
Copy link
Contributor

@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 Sep 13, 2022
@bors
Copy link
Contributor

bors commented Sep 13, 2022

⌛ Trying commit bc1ed929c227ed5d3036ec95beb685ff7e93ca02 with merge f293fc9a1c28900c94a2e3ec999f92888e22d37d...

@bors
Copy link
Contributor

bors commented Sep 13, 2022

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

@rust-timer
Copy link
Collaborator

Queued f293fc9a1c28900c94a2e3ec999f92888e22d37d with parent 5338f5f, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f293fc9a1c28900c94a2e3ec999f92888e22d37d): comparison URL.

Overall result: ❌✅ regressions and 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-review -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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.4% [1.4%, 1.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.7% [-1.7%, -1.7%] 1
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.

mean1 range count2
Regressions ❌
(primary)
2.9% [2.9%, 2.9%] 1
Regressions ❌
(secondary)
2.7% [1.8%, 4.0%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-2.8%, -2.8%] 1
All ❌✅ (primary) 2.9% [2.9%, 2.9%] 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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.9% [2.9%, 2.9%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 13, 2022
@cjgillot cjgillot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 14, 2022
@jyn514
Copy link
Member Author

jyn514 commented Sep 18, 2022

@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 Sep 18, 2022
@bors
Copy link
Contributor

bors commented Sep 18, 2022

⌛ Trying commit 6f86352ff611abb0bf96c6a527659b767c2315a8 with merge 7d71171239224e27e782f4734b314e7bdbf131a3...

@bors
Copy link
Contributor

bors commented Sep 19, 2022

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

@rust-timer
Copy link
Collaborator

Queued 7d71171239224e27e782f4734b314e7bdbf131a3 with parent a37499a, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7d71171239224e27e782f4734b314e7bdbf131a3): comparison URL.

Overall result: ❌ regressions - 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-review -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.

mean1 range count2
Regressions ❌
(primary)
0.7% [0.4%, 1.3%] 82
Regressions ❌
(secondary)
1.1% [0.3%, 2.0%] 34
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.7% [0.4%, 1.3%] 82

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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.4% [3.4%, 3.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-3.0%, -2.7%] 2
All ❌✅ (primary) - - 0

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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.1% [2.1%, 2.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.6% [-3.2%, -2.0%] 11
All ❌✅ (primary) - - 0

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@rustbot rustbot added perf-regression Performance regression. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Sep 19, 2022
@jyn514
Copy link
Member Author

jyn514 commented Sep 25, 2022

From the code POV, this looks good. Do you have an idea for the regression? A missing inline perhaps?

Not sure off the top of my head - I added inline to dep_kind_info, I'll see if that helps.

@jyn514
Copy link
Member Author

jyn514 commented Sep 25, 2022

@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 Sep 25, 2022
@bors
Copy link
Contributor

bors commented Sep 25, 2022

⌛ Trying commit 00cde6d with merge 1480da8b0f4003f052b5450cd4b17b2f71caede5...

@bors
Copy link
Contributor

bors commented Sep 25, 2022

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

@rust-timer
Copy link
Collaborator

Queued 1480da8b0f4003f052b5450cd4b17b2f71caede5 with parent 17e8752, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1480da8b0f4003f052b5450cd4b17b2f71caede5): 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-review -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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.5% [-0.9%, -0.2%] 66
Improvements ✅
(secondary)
-0.6% [-1.4%, -0.3%] 22
All ❌✅ (primary) -0.5% [-0.9%, -0.2%] 66

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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.4% [4.4%, 4.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.2% [-3.2%, -3.2%] 1
All ❌✅ (primary) - - 0

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.

mean1 range count2
Regressions ❌
(primary)
3.2% [3.2%, 3.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.2% [3.2%, 3.2%] 1

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. perf-regression Performance regression. labels Sep 25, 2022
@cjgillot
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Sep 25, 2022

📌 Commit 00cde6d 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. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 25, 2022
@bors
Copy link
Contributor

bors commented Sep 25, 2022

⌛ Testing commit 00cde6d with merge ff40f2e...

@bors
Copy link
Contributor

bors commented Sep 26, 2022

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 26, 2022
@bors bors merged commit ff40f2e into rust-lang:master Sep 26, 2022
@rustbot rustbot added this to the 1.66.0 milestone Sep 26, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ff40f2e): 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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.5% [-0.9%, -0.2%] 66
Improvements ✅
(secondary)
-0.4% [-0.7%, -0.2%] 18
All ❌✅ (primary) -0.5% [-0.9%, -0.2%] 66

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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.1% [-4.3%, -2.0%] 2
All ❌✅ (primary) - - 0

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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.2% [-2.2%, -2.2%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.2% [-2.2%, -2.2%] 1

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@jyn514 jyn514 deleted the move-dep-kind-node branch February 25, 2023 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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.

6 participants