Skip to content

Remove SimpleDefKind #94066

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
Feb 21, 2022
Merged

Conversation

Mark-Simulacrum
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum commented Feb 16, 2022

Now that rustc_query_system depends on rustc_hir, we can just directly make use of the regular DefKind.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Feb 16, 2022
@rust-highfive
Copy link
Contributor

r? @davidtwco

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 16, 2022
@Mark-Simulacrum
Copy link
Member Author

@bors try @rust-timer queue

(But even without a performance impact, might be a nice small refactor)

@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 Feb 16, 2022
@bors
Copy link
Collaborator

bors commented Feb 16, 2022

⌛ Trying commit d338fa7527725b766de357e37bd86bc2f2e21ef9 with merge d9c0847522681f2c45c673d80e2c90eb6138f1ad...

@bors
Copy link
Collaborator

bors commented Feb 17, 2022

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

@rust-timer
Copy link
Collaborator

Queued d9c0847522681f2c45c673d80e2c90eb6138f1ad with parent 75d9a0a, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d9c0847522681f2c45c673d80e2c90eb6138f1ad): comparison url.

Summary: This benchmark run did not return any relevant results. 3 results were found to be statistically significant but too small to be relevant.

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 led to changes in compiler perf.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 17, 2022
@Mark-Simulacrum
Copy link
Member Author

Looks like no significant impact on overall runtimes, probably only worth it if it looks like a nice refactor regardless of bootstrap performance impact (which I suspect is there, just tiny). Might also try adding an inline(never) which could help.

@Mark-Simulacrum Mark-Simulacrum force-pushed the factor-out-simple-def-kind branch from d338fa7 to 57e534e Compare February 17, 2022 12:56
@Mark-Simulacrum
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 Feb 17, 2022
@bors
Copy link
Collaborator

bors commented Feb 17, 2022

⌛ Trying commit 57e534e93b29107438b4f0a7bbdb2a13de28dbad with merge 7dc78f414000d93ed6f88e572db2a4859cc59aa5...

@bors
Copy link
Collaborator

bors commented Feb 17, 2022

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

@rust-timer
Copy link
Collaborator

Queued 7dc78f414000d93ed6f88e572db2a4859cc59aa5 with parent 930fc4f, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7dc78f414000d93ed6f88e572db2a4859cc59aa5): comparison url.

Summary: This benchmark run did not return any relevant results.

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 led to changes in compiler perf.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 17, 2022
@cjgillot
Copy link
Contributor

rustc_query_system depends on rustc_hir. We can remove the SimpleDefKind datatype and use DefKind directly. Hence dropping completely to_simple_def_kind.

@Mark-Simulacrum Mark-Simulacrum force-pushed the factor-out-simple-def-kind branch from 57e534e to ddda851 Compare February 17, 2022 23:08
@Mark-Simulacrum Mark-Simulacrum changed the title Factor out to_simple_def_kind Remove SimpleDefKind Feb 17, 2022
@Mark-Simulacrum
Copy link
Member Author

FWIW, it looks like the only usage of SimpleDefKind is some slight adjustments to cycle diagnostics. I'm not personally convinced those are worth it -- but maybe they are. In any case, something to be considered separately I suppose, for now this just refactors to drop SimpleDefKind in favor of DefKind.

@bors try @rust-timer queue

I suspect this'll be largely performance neutral or a slight hit -- DefKind is likely larger by a few bytes at least -- but likely to not matter much.

@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 Feb 17, 2022
@bors
Copy link
Collaborator

bors commented Feb 17, 2022

⌛ Trying commit ddda851 with merge b61621d972aab729bc51f3643e7381c0860332b9...

@bors
Copy link
Collaborator

bors commented Feb 18, 2022

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

@rust-timer
Copy link
Collaborator

Queued b61621d972aab729bc51f3643e7381c0860332b9 with parent 30b3f35, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b61621d972aab729bc51f3643e7381c0860332b9): comparison url.

Summary: This benchmark run did not return any relevant results. 5 results were found to be statistically significant but too small to be relevant.

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 led to changes in compiler perf.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 18, 2022
@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 18, 2022

📌 Commit ddda851 has been approved by davidtwco

@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 Feb 18, 2022
@bors
Copy link
Collaborator

bors commented Feb 21, 2022

⌛ Testing commit ddda851 with merge cdb64f7d343d11888d1c6e8f5e647c8f22b95cdd...

@bors
Copy link
Collaborator

bors commented Feb 21, 2022

💔 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 Feb 21, 2022
@Mark-Simulacrum
Copy link
Member Author

@bors retry aarch64 runner down?

@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 Feb 21, 2022
@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
Copy link
Collaborator

bors commented Feb 21, 2022

⌛ Testing commit ddda851 with merge 026d8ce...

@bors
Copy link
Collaborator

bors commented Feb 21, 2022

☀️ Test successful - checks-actions
Approved by: davidtwco
Pushing 026d8ce to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 21, 2022
@bors bors merged commit 026d8ce into rust-lang:master Feb 21, 2022
@rustbot rustbot added this to the 1.61.0 milestone Feb 21, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (026d8ce): comparison url.

Summary: This benchmark run did not return any relevant results.

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

@rustbot label: -perf-regression

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.

8 participants