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

Make encode_info_for_trait_item use queries instead of accessing the HIR #105472

Merged
merged 1 commit into from
Dec 12, 2022

Conversation

spastorino
Copy link
Member

@spastorino spastorino commented Dec 8, 2022

This change avoids accessing the HIR on encode_info_for_trait_item and uses queries. We will need to execute this function for elements that have no HIR and by using queries we will be able to feed for definitions that have no HIR.

r? @oli-obk

@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 Dec 8, 2022
@spastorino
Copy link
Member Author

There are more places where we need to use queries, I can keep sending them in other PRs.

@spastorino
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 Dec 8, 2022
@bors
Copy link
Contributor

bors commented Dec 8, 2022

⌛ Trying commit f41f006dee5ff18c7aa4ae795a3d24ede04e1707 with merge 5dceb29da84ee9d39efb7f1975a101119f998a89...

@bors
Copy link
Contributor

bors commented Dec 8, 2022

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5dceb29da84ee9d39efb7f1975a101119f998a89): 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)
0.8% [0.2%, 2.1%] 88
Regressions ❌
(secondary)
1.0% [0.1%, 2.5%] 32
Improvements ✅
(primary)
-0.3% [-0.5%, -0.2%] 5
Improvements ✅
(secondary)
-0.4% [-0.5%, -0.2%] 11
All ❌✅ (primary) 0.7% [-0.5%, 2.1%] 93

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.4% [0.5%, 4.0%] 24
Regressions ❌
(secondary)
1.0% [0.8%, 1.2%] 5
Improvements ✅
(primary)
-0.8% [-0.8%, -0.8%] 1
Improvements ✅
(secondary)
-2.1% [-2.6%, -1.6%] 2
All ❌✅ (primary) 1.4% [-0.8%, 4.0%] 25

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)
1.5% [1.0%, 1.8%] 3
Regressions ❌
(secondary)
3.6% [3.6%, 3.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.2%] 1
All ❌✅ (primary) 1.5% [1.0%, 1.8%] 3

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Dec 9, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5dceb29da84ee9d39efb7f1975a101119f998a89): 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)
0.8% [0.2%, 2.1%] 88
Regressions ❌
(secondary)
1.0% [0.1%, 2.5%] 32
Improvements ✅
(primary)
-0.3% [-0.5%, -0.2%] 5
Improvements ✅
(secondary)
-0.4% [-0.5%, -0.2%] 11
All ❌✅ (primary) 0.7% [-0.5%, 2.1%] 93

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.4% [0.5%, 4.0%] 24
Regressions ❌
(secondary)
1.0% [0.8%, 1.2%] 5
Improvements ✅
(primary)
-0.8% [-0.8%, -0.8%] 1
Improvements ✅
(secondary)
-2.1% [-2.6%, -1.6%] 2
All ❌✅ (primary) 1.4% [-0.8%, 4.0%] 25

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)
1.5% [1.0%, 1.8%] 3
Regressions ❌
(secondary)
3.6% [3.6%, 3.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.2%] 1
All ❌✅ (primary) 1.5% [1.0%, 1.8%] 3

@spastorino spastorino changed the title Make encoder use queries Make encode_info_for_trait_item use queries instead of accessing the HIR Dec 9, 2022
@spastorino
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 Dec 9, 2022
@bors
Copy link
Contributor

bors commented Dec 9, 2022

⌛ Trying commit 99d2290 with merge 9c91984911c88dd36638d61c89ea3d9d93edf9e6...

@bors
Copy link
Contributor

bors commented Dec 9, 2022

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9c91984911c88dd36638d61c89ea3d9d93edf9e6): 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)
0.2% [0.2%, 0.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.3%, -0.3%] 1
Improvements ✅
(secondary)
-0.3% [-0.4%, -0.2%] 4
All ❌✅ (primary) -0.0% [-0.3%, 0.2%] 2

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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.9% [-0.9%, -0.9%] 1
All ❌✅ (primary) - - 0

Cycles

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

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

oli-obk commented Dec 9, 2022

r=me with a sentence on the motivation in the main comment

@spastorino
Copy link
Member Author

@bors r=oli-obk rollup

@bors
Copy link
Contributor

bors commented Dec 11, 2022

📌 Commit 99d2290 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 Dec 11, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Dec 11, 2022
…s, r=oli-obk

Make encode_info_for_trait_item use queries instead of accessing the HIR

This change avoids accessing the HIR on `encode_info_for_trait_item` and uses queries. We will need to execute this function for elements that have no HIR and by using queries we will be able to feed for definitions that have no HIR.

r? `@oli-obk`
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 11, 2022
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#101648 (Better documentation for env::home_dir()'s broken behaviour)
 - rust-lang#105283 (Don't call `diagnostic_hir_wf_check` query if we have infer variables)
 - rust-lang#105369 (Detect spurious ; before assoc fn body)
 - rust-lang#105472 (Make encode_info_for_trait_item use queries instead of accessing the HIR)
 - rust-lang#105521 (separate heading from body)
 - rust-lang#105555 (llvm-wrapper: adapt for LLVM API changes)
 - rust-lang#105560 (Extend rustdoc hashtag prepended line test)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6ed8cb6 into rust-lang:master Dec 12, 2022
@rustbot rustbot added this to the 1.68.0 milestone Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf-regression Performance regression. 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.

5 participants