Skip to content

Canonicalize input ty/ct infer/placeholder in the root universe #142732

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 2 commits into from
Jul 5, 2025

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Jun 19, 2025

We shouldn't care what universe the inputs are, since we only ever do the leak check on the universes instantiated after entering the canonical binder.

@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jun 19, 2025
@compiler-errors
Copy link
Member Author

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Jun 19, 2025
[perf] Canonicalize input ty/ct infer/placeholder in the root universe

meow
@rust-bors
Copy link

rust-bors bot commented Jun 19, 2025

⌛ Trying commit 334396a with merge 46d20f6

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 19, 2025
@rust-bors
Copy link

rust-bors bot commented Jun 19, 2025

☀️ Try build successful (CI)
Build commit: 46d20f6 (46d20f64bffb874fc758158dac884838b14b4eb4, parent: 2fcf1776b9ccef89993dfe40e9f5c4908e2d2d48)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (46d20f6): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

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

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

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

Max RSS (memory usage)

Results (primary -1.2%, secondary -4.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.2% [-1.5%, -1.0%] 2
Improvements ✅
(secondary)
-4.1% [-6.1%, -2.2%] 2
All ❌✅ (primary) -1.2% [-1.5%, -1.0%] 2

Cycles

Results (secondary 4.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.7% [4.7%, 4.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 692.244s -> 694.134s (0.27%)
Artifact size: 371.99 MiB -> 372.00 MiB (0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 20, 2025
Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

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

also rip out the compress universe for inputs, all inputs should now be in the root.

@compiler-errors
Copy link
Member Author

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Jun 23, 2025

⌛ Trying commit 782f2d1 with merge d69c32b

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

rust-bors bot added a commit that referenced this pull request Jun 23, 2025
[perf] Canonicalize input ty/ct infer/placeholder in the root universe

meow
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 23, 2025
@rust-bors
Copy link

rust-bors bot commented Jun 23, 2025

☀️ Try build successful (CI)
Build commit: d69c32b (d69c32bb48809cf202e1b423d21ff0f694fc7f9a, parent: 706f244db581212cabf2e619e0113d70999b2bbe)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d69c32b): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

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

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.3% [-2.4%, -0.3%] 13
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -1.3%, secondary -1.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.3% [-1.3%, -1.3%] 1
Improvements ✅
(secondary)
-1.8% [-1.8%, -1.8%] 1
All ❌✅ (primary) -1.3% [-1.3%, -1.3%] 1

Cycles

Results (secondary -2.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.0% [-2.7%, -1.7%] 7
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 688.989s -> 688.708s (-0.04%)
Artifact size: 371.96 MiB -> 371.86 MiB (-0.03%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 24, 2025
@compiler-errors compiler-errors changed the title [perf] Canonicalize input ty/ct infer/placeholder in the root universe Canonicalize input ty/ct infer/placeholder in the root universe Jun 24, 2025
@compiler-errors compiler-errors marked this pull request as ready for review June 24, 2025 03:38
@rustbot
Copy link
Collaborator

rustbot commented Jun 24, 2025

r? @SparrowLii

rustbot has assigned @SparrowLii.
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 the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 24, 2025
@compiler-errors compiler-errors assigned lcnr and unassigned SparrowLii Jun 24, 2025
@compiler-errors
Copy link
Member Author

ty @lcnr for the suggestion, perf looks a bit better now :3

@lcnr
Copy link
Contributor

lcnr commented Jun 24, 2025

r? lcnr

Comment on lines +269 to +274
let var_kinds = self.delegate.cx().mk_canonical_var_kinds(&var_kinds);
(ty::UniverseIndex::ROOT, var_kinds)
Copy link
Contributor

Choose a reason for hiding this comment

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

can you debug assert that this is actually the case :3

r=me after that

@lcnr lcnr 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 Jul 3, 2025
@compiler-errors
Copy link
Member Author

@bors r=lcnr

@bors
Copy link
Collaborator

bors commented Jul 5, 2025

📌 Commit 4185874 has been approved by lcnr

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 5, 2025
@bors
Copy link
Collaborator

bors commented Jul 5, 2025

⌛ Testing commit 4185874 with merge 5adb489...

@bors
Copy link
Collaborator

bors commented Jul 5, 2025

☀️ Test successful - checks-actions
Approved by: lcnr
Pushing 5adb489 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 5, 2025
@bors bors merged commit 5adb489 into rust-lang:master Jul 5, 2025
12 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 5, 2025
Copy link
Contributor

github-actions bot commented Jul 5, 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 175e043 (parent) -> 5adb489 (this PR)

Test differences

Show 3 test diffs

3 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 5adb489a8034f7b56b29f3b28af0813c866f679c --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-aarch64-linux: 8011.2s -> 5427.7s (-32.2%)
  2. dist-apple-various: 6485.9s -> 7624.7s (17.6%)
  3. x86_64-rust-for-linux: 2539.3s -> 2822.6s (11.2%)
  4. x86_64-apple-1: 6826.3s -> 6130.4s (-10.2%)
  5. x86_64-gnu-tools: 3277.7s -> 3600.8s (9.9%)
  6. aarch64-gnu: 6227.2s -> 6793.7s (9.1%)
  7. x86_64-gnu-llvm-20-1: 3268.3s -> 3511.5s (7.4%)
  8. i686-gnu-1: 7196.7s -> 7729.1s (7.4%)
  9. aarch64-apple: 3968.9s -> 4255.6s (7.2%)
  10. dist-x86_64-apple: 8207.3s -> 8774.2s (6.9%)
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 (5adb489): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.3% [0.3%, 0.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.0% [-1.8%, -0.3%] 13
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -5.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-5.4% [-5.4%, -5.4%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -5.4% [-5.4%, -5.4%] 1

Cycles

Results (secondary -1.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.7% [-2.8%, -0.7%] 2
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 459.09s -> 460.95s (0.41%)
Artifact size: 372.18 MiB -> 372.07 MiB (-0.03%)

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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants