Skip to content

Remove CollectItemTypesVisitor #142074

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 4 commits into from
Jun 8, 2025
Merged

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jun 5, 2025

I always felt like we were very unnecessarily walking the HIR, let's see if perf agrees

There is lots to improve consolidate further here, as we still have 3 item wfchecks:

  • check_item (matching on the hir::ItemKind)
    • actually doing trait solver based checks (by using HIR spans)
  • lower_item (matching on the hir::ItemKind after loading it again??)
    • just ensure_ok-ing a bunch of queries
  • check_item_type (matching on DefKind)
    • some type based checks, mostly ensure_ok-ing a bunch of queries

fixes #121429

@rustbot
Copy link
Collaborator

rustbot commented Jun 5, 2025

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Jun 5, 2025
@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 5, 2025

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Jun 5, 2025
Remove CollectItemTypesVisitor

I always felt like we were very unnecessarily walking the HIR, let's see if perf agrees

There is lots to improve further here, as we still have 3 item wfchecks:

* check_item (matching on the hir::ItemKind)
    * actually doing trait solver based checks (by using HIR spans)
* lower_item (matching on the hir::ItemKind after loading it again??)
    * just ensure_ok-ing a bunch of queries
* check_item_type (matching on DefKind)
    * some type based checks, mostly ensure_ok-ing a bunch of queries
@rust-bors
Copy link

rust-bors bot commented Jun 5, 2025

⌛ Trying commit 8539121 with merge 54f4196

To cancel the try build, run the command @bors2 try cancel.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 5, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Jun 5, 2025

☀️ Try build successful (CI)
Build commit: 54f4196 (54f4196c43452f7bdf022e5c4217701a3af99cca)

@rust-timer

This comment has been minimized.

@oli-obk oli-obk force-pushed the its-finally-gone branch from 8539121 to fa282f4 Compare June 5, 2025 13:38
@rustbot
Copy link
Collaborator

rustbot commented Jun 5, 2025

This PR changes a file inside tests/crashes. If a crash was fixed, please move into the corresponding ui subdir and add 'Fixes #' to the PR description to autoclose the issue upon merge.

@petrochenkov petrochenkov removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 5, 2025
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (54f4196): 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 the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.1%, -0.1%] 3
Improvements ✅
(secondary)
-0.2% [-0.4%, -0.1%] 11
All ❌✅ (primary) -0.1% [-0.1%, -0.1%] 3

Max RSS (memory usage)

Results (secondary -0.9%)

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)
1.6% [0.6%, 2.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.8%, -1.6%] 4
All ❌✅ (primary) - - 0

Cycles

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

Binary size

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

Bootstrap: 749.811s -> 751.196s (0.18%)
Artifact size: 371.77 MiB -> 371.80 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 5, 2025
@petrochenkov petrochenkov added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 5, 2025
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 6, 2025

📌 Commit fa282f4 has been approved by petrochenkov

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 Jun 6, 2025
@bors
Copy link
Collaborator

bors commented Jun 8, 2025

⌛ Testing commit fa282f4 with merge 0b65d0d...

@bors
Copy link
Collaborator

bors commented Jun 8, 2025

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 0b65d0d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 8, 2025
@bors bors merged commit 0b65d0d into rust-lang:master Jun 8, 2025
11 checks passed
@rustbot rustbot added this to the 1.89.0 milestone Jun 8, 2025
Copy link
Contributor

github-actions bot commented Jun 8, 2025

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing a5584a8 (parent) -> 0b65d0d (this PR)

Test differences

Show 2 test diffs

Stage 1

  • [crashes] tests/crashes/121429.rs: pass -> [missing] (J1)

Stage 2

  • [crashes] tests/crashes/121429.rs: pass -> [missing] (J0)

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 0b65d0db5f77c44bf37b4a25489562d68c14aecf --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-apple-various: 6039.6s -> 7390.3s (22.4%)
  2. x86_64-apple-1: 5885.3s -> 7075.9s (20.2%)
  3. aarch64-apple: 5420.3s -> 4435.1s (-18.2%)
  4. x86_64-apple-2: 4986.0s -> 4207.2s (-15.6%)
  5. dist-aarch64-apple: 5013.6s -> 5705.9s (13.8%)
  6. dist-s390x-linux: 5071.3s -> 4554.3s (-10.2%)
  7. dist-ohos-x86_64: 4450.2s -> 4062.8s (-8.7%)
  8. x86_64-msvc-2: 6565.5s -> 7110.1s (8.3%)
  9. dist-armhf-linux: 4959.2s -> 4623.0s (-6.8%)
  10. dist-armv7-linux: 5247.2s -> 4916.5s (-6.3%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0b65d0d): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.1%, -0.1%] 1
Improvements ✅
(secondary)
-0.2% [-0.4%, -0.1%] 8
All ❌✅ (primary) -0.1% [-0.1%, -0.1%] 1

Max RSS (memory usage)

Results (primary 1.2%, secondary 1.2%)

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.2% [1.2%, 1.2%] 1
Regressions ❌
(secondary)
4.4% [1.2%, 9.6%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.0% [-2.0%, -2.0%] 3
All ❌✅ (primary) 1.2% [1.2%, 1.2%] 1

Cycles

Results (secondary 2.4%)

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

Binary size

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

Bootstrap: 752.018s -> 753.249s (0.16%)
Artifact size: 372.42 MiB -> 372.47 MiB (0.01%)

@oli-obk oli-obk deleted the its-finally-gone branch June 8, 2025 07:27
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.

ICE: expected const for .. but found Type(usize) when instantiating args=[usize]
6 participants