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

finish Reveal removal #133242

Merged
merged 7 commits into from
Nov 23, 2024
Merged

finish Reveal removal #133242

merged 7 commits into from
Nov 23, 2024

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Nov 20, 2024

After #133212 changed the TypingMode to be the only source of truth, this entirely rips out Reveal.

cc #132279

r? @compiler-errors

@rustbot rustbot added PG-exploit-mitigations Project group: Exploit mitigations 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Nov 20, 2024
@rustbot
Copy link
Collaborator

rustbot commented Nov 20, 2024

changes to the core type system

cc @compiler-errors, @lcnr

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri, @rust-lang/wg-const-eval

Some changes occurred in match checking

cc @Nadrieril

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred in exhaustiveness checking

cc @Nadrieril

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred in tests/ui/sanitizer

cc @rust-lang/project-exploit-mitigations, @rcvalle

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@lcnr lcnr force-pushed the questionable-uwu branch 3 times, most recently from 7a16b56 to 08c4525 Compare November 20, 2024 11:13
@lcnr
Copy link
Contributor Author

lcnr commented Nov 20, 2024

@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 Nov 20, 2024
@bors
Copy link
Contributor

bors commented Nov 20, 2024

⌛ Trying commit 08c4525 with merge e7c53b1...

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 20, 2024
finish `Reveal` removal

After rust-lang#133212 changed the `TypingMode` to be the only source of truth, this entirely rips out `Reveal`.

cc rust-lang#132279

r? `@compiler-errors`
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Nov 20, 2024

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e7c53b1): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

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 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)
1.8% [1.8%, 1.8%] 1
Improvements ✅
(primary)
-0.6% [-1.4%, -0.2%] 22
Improvements ✅
(secondary)
-3.3% [-9.2%, -0.1%] 12
All ❌✅ (primary) -0.6% [-1.4%, -0.2%] 22

Max RSS (memory usage)

Results (primary -2.3%, secondary 3.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.7% [1.7%, 1.7%] 1
Regressions ❌
(secondary)
3.2% [2.9%, 3.4%] 3
Improvements ✅
(primary)
-3.0% [-3.8%, -2.3%] 5
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.3% [-3.8%, 1.7%] 6

Cycles

Results (primary -1.4%, secondary -6.1%)

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)
-1.4% [-1.7%, -1.2%] 8
Improvements ✅
(secondary)
-6.1% [-9.3%, -2.2%] 6
All ❌✅ (primary) -1.4% [-1.7%, -1.2%] 8

Binary size

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

Bootstrap: 793.177s -> 793.562s (0.05%)
Artifact size: 335.96 MiB -> 336.05 MiB (0.03%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Nov 20, 2024
@lcnr
Copy link
Contributor Author

lcnr commented Nov 20, 2024

@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 Nov 20, 2024
@bors
Copy link
Contributor

bors commented Nov 20, 2024

⌛ Trying commit af0d83a with merge 546d974...

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 20, 2024
finish `Reveal` removal

After rust-lang#133212 changed the `TypingMode` to be the only source of truth, this entirely rips out `Reveal`.

cc rust-lang#132279

r? `@compiler-errors`
@bors
Copy link
Contributor

bors commented Nov 20, 2024

☀️ Try build successful - checks-actions
Build commit: 546d974 (546d97442244c95e308661462ac7d8d89189497b)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (546d974): comparison URL.

Overall result: ❌ regressions - please read the text below

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 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.6% [0.2%, 3.6%] 13
Regressions ❌
(secondary)
0.3% [0.2%, 0.4%] 23
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.3% [-1.3%, -1.3%] 1
All ❌✅ (primary) 0.6% [0.2%, 3.6%] 13

Max RSS (memory usage)

Results (primary 1.4%, secondary 2.6%)

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%, 3.3%] 11
Regressions ❌
(secondary)
2.6% [1.1%, 3.3%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.4% [0.5%, 3.3%] 11

Cycles

Results (primary 4.3%)

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)
4.3% [3.1%, 5.5%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 4.3% [3.1%, 5.5%] 2

Binary size

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

Bootstrap: 793.512s -> 793.496s (-0.00%)
Artifact size: 335.99 MiB -> 335.99 MiB (0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 20, 2024
@compiler-errors
Copy link
Member

Can you open a tracking issue to write a packing implementation of TypingEnv?

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 23, 2024
@lcnr
Copy link
Contributor Author

lcnr commented Nov 23, 2024

@bors r=compiler-errors,BoxyUwU rollup=never

@bors
Copy link
Contributor

bors commented Nov 23, 2024

📌 Commit 776731d has been approved by compiler-errors,BoxyUwU

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 Nov 23, 2024
@jieyouxu

This comment was marked as outdated.

@jieyouxu
Copy link
Member

@bors p=6 (threading this between two rollups)

@bors
Copy link
Contributor

bors commented Nov 23, 2024

⌛ Testing commit 776731d with merge 386a7c7...

@bors
Copy link
Contributor

bors commented Nov 23, 2024

☀️ Test successful - checks-actions
Approved by: compiler-errors,BoxyUwU
Pushing 386a7c7 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 23, 2024
@bors bors merged commit 386a7c7 into rust-lang:master Nov 23, 2024
7 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Nov 23, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (386a7c7): comparison URL.

Overall result: ❌ regressions - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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.7% [0.2%, 3.6%] 11
Regressions ❌
(secondary)
0.3% [0.2%, 0.4%] 24
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.7% [0.2%, 3.6%] 11

Max RSS (memory usage)

Results (primary 1.5%)

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% [0.8%, 2.1%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.5% [0.8%, 2.1%] 3

Cycles

Results (primary 3.1%)

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)
3.1% [2.9%, 3.4%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.1% [2.9%, 3.4%] 2

Binary size

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

Bootstrap: 795.832s -> 798.452s (0.33%)
Artifact size: 336.26 MiB -> 336.33 MiB (0.02%)

@Kobzol
Copy link
Contributor

Kobzol commented Nov 26, 2024

Do you think there's a way to reduce the regressions (from #133212 and this PR)? I assume that this is an important refactoring and that it might not worth be the hassle, so if not, then nevermind.

@lcnr
Copy link
Contributor Author

lcnr commented Nov 26, 2024

This is an important refactoring 😁 #132279 has a subissue #133336 which would halve the size of TypingMode, likely giving us some of the perf back.

I also have a caching optimization in mind which should allow us to actually get a perf benefit from this. Both of these changes aren't completely trivial so I will probably not get to them right away.

@Kobzol
Copy link
Contributor

Kobzol commented Nov 26, 2024

Great, thanks for the explanation! Then we don't need to deal with the regressions now, especially when there's a chance that there will be perf. improvements in the future.

@marxin
Copy link
Contributor

marxin commented Dec 29, 2024

After this change, there are 2 new orphan links in rustc-dev-guide, please fix them:

error: Server returned 404 Not Found for https://doc.rust-lang.org/nightly/nightly-rustc/rustc_infer/traits/enum.Reveal.html
  ┌─ param_env/param_env_what_is_it.md:6:86
  │
6 │ The information represented by `ParamEnv` is a list of in-scope where-clauses, and a [`Reveal`][reveal] (see linked docs for more information). A `ParamEnv` typically corresponds to a specific item's where clauses, some clauses are not explicitly written bounds and instead are implicitly added in [`predicates_of`][predicates_of] such as `ConstArgHasType` or some implied bounds.
  │                                                                                      ^^^^^^^^^^^^^^^^^^ Server returned 404 Not Found for https://doc.rust-lang.org/nightly/nightly-rustc/rustc_infer/traits/enum.Reveal.html

error: Server returned 404 Not Found for https://doc.rust-lang.org/nightly/nightly-rustc/rustc_infer/traits/enum.Reveal.html
   ┌─ param_env/param_env_acquisition.md:24:58
   │
24 │ An additional piece of complexity here is specifying the [`Reveal`][reveal] (see linked docs for explanation of what reveal does) used for the `ParamEnv`. When constructing a param env using the `param_env` query it will have `Reveal::UserFacing`, if `Reveal::All` is desired then the [`tcx.param_env_reveal_all_normalized`][env_reveal_all_normalized] query can be used instead.
   │                                                          ^^^^^^^^^^^^^^^^^^ Server returned 404 Not Found for https://doc.rust-lang.org/nightly/nightly-rustc/rustc_infer/traits/enum.Reveal.html

@lcnr lcnr deleted the questionable-uwu branch January 6, 2025 06:50
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. perf-regression Performance regression. PG-exploit-mitigations Project group: Exploit mitigations 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.

9 participants