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

Revert "Normalize opaques with escaping bound vars" #103509

Merged
merged 3 commits into from
Nov 19, 2022

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Oct 25, 2022

This caused a perf regression in #103423, cc @skyzh this should fix #103423.

reverts #100980

r? @oli-obk

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 25, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 25, 2022
@compiler-errors
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 Oct 25, 2022
@compiler-errors
Copy link
Member Author

@skyzh you should be able to test this using the "try build" that will be created by bors. I can write up instructions to do so, or I might just try building the crate myself.

@skyzh
Copy link
Contributor

skyzh commented Oct 25, 2022

I can compile this branch of compiler by myself. Hopefully it should be the same as the generated artifacts from bors?

@compiler-errors
Copy link
Member Author

Yes, that works too.

@bors
Copy link
Contributor

bors commented Oct 25, 2022

⌛ Trying commit 625500e305c3e8d21c274d85198fb7a09593ffb2 with merge f4d10a74e46baa8f6e56c17fa022b2e8701c6e38...

@skyzh
Copy link
Contributor

skyzh commented Oct 25, 2022

This fix works on the previous PR I mentioned. Debug builds successfully in 1m 58s. Nearly no regression in time compared with nightly-07-29. Only tested on aarch64-apple-darwin.

@bors
Copy link
Contributor

bors commented Oct 25, 2022

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

@rust-timer
Copy link
Collaborator

Queued f4d10a74e46baa8f6e56c17fa022b2e8701c6e38 with parent 758f196, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f4d10a74e46baa8f6e56c17fa022b2e8701c6e38): 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-review -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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.9% [0.9%, 0.9%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.4% [-2.1%, -0.2%] 7
All ❌✅ (primary) - - 0

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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.5% [-4.5%, -4.5%] 1
All ❌✅ (primary) - - 0

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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.3%, -2.2%] 4
All ❌✅ (primary) - - 0

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Oct 25, 2022
@lcnr
Copy link
Contributor

lcnr commented Oct 25, 2022

I would like to wait with this PR until we get a minimization for this issue. We still have more than 7 weeks until this would hit stable and I think normalizing opaque types with escaping vars is an important improvement to Rust. I fear that by simply reverting this now, we will not take the time to actually search for a MVCE here.

@skyzh
Copy link
Contributor

skyzh commented Oct 25, 2022

I would like to wait with this PR until we get a minimization for this issue. We still have more than 7 weeks until this would hit stable and I think normalizing opaque types with escaping vars is an important improvement to Rust. I fear that by simply reverting this now, we will not take the time to actually search for a MVCE here.

Sounds good, and I’m still working on it 🤣

@compiler-errors compiler-errors added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 25, 2022
@skyzh
Copy link
Contributor

skyzh commented Oct 27, 2022

MVCE in #103423 (comment)

@oli-obk
Copy link
Contributor

oli-obk commented Nov 7, 2022

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Nov 7, 2022
@compiler-errors
Copy link
Member Author

I've got some normalization work in the pipeline, but that's 100% not going to get beta backported, so this can/should get landed instead.

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 15, 2022
@compiler-errors compiler-errors added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Nov 15, 2022
@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Nov 18, 2022
@rustbot
Copy link
Collaborator

rustbot commented Nov 18, 2022

The Miri subtree was changed

cc @rust-lang/miri

@oli-obk
Copy link
Contributor

oli-obk commented Nov 18, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Nov 18, 2022

📌 Commit 6ae4e5e 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 Nov 18, 2022
@bors
Copy link
Contributor

bors commented Nov 19, 2022

⌛ Testing commit 6ae4e5e with merge 5e6de23...

@bors
Copy link
Contributor

bors commented Nov 19, 2022

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 5e6de23 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 19, 2022
@bors bors merged commit 5e6de23 into rust-lang:master Nov 19, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 19, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5e6de23): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

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

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
Regressions ❌
(secondary)
0.6% [0.3%, 0.8%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.6% [-2.2%, -0.3%] 6
All ❌✅ (primary) - - 0

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)
1.8% [0.8%, 2.7%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.9% [-6.3%, -1.2%] 6
All ❌✅ (primary) - - 0

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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.3%, -2.1%] 4
All ❌✅ (primary) - - 0

@Mark-Simulacrum Mark-Simulacrum modified the milestones: 1.67.0, 1.66.0 Nov 20, 2022
@Mark-Simulacrum Mark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Nov 20, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 20, 2022
…mulacrum

[beta] backport

*  Use nominal_obligations_without_const in wf for FnDef rust-lang#104180
*  Don't silently eat label before block in block-like expr rust-lang#103986
*  Revert "Update CI to use Android NDK r25b" rust-lang#104628
*  rustdoc: Resolve doc links in external traits having local impls rust-lang#104364
*  Use 64 bits for incremental cache in-file positions rust-lang#104164
*  rustdoc: Do not add external traits to the crate in register_res rust-lang#103649
*  Revert "Normalize opaques with escaping bound vars" rust-lang#103509
* Bump to released stable compiler
* [beta] Update cargo rust-lang#104486

r? `@Mark-Simulacrum`
@rylev
Copy link
Member

rylev commented Nov 22, 2022

This is a necessary fix for a compiler hang. Additionally the improvements outweigh the regressions and this is all confined to secondary benchmarks.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Nov 22, 2022
Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
…-r-hard, r=oli-obk

Revert "Normalize opaques with escaping bound vars"

This caused a perf regression in rust-lang#103423, cc `@skyzh` this should fix rust-lang#103423.

reverts rust-lang#100980

r? `@oli-obk`
@compiler-errors compiler-errors deleted the opaques-w-bound-vars-r-hard branch August 11, 2023 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. 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.

large number of obligation produced in async code causing compiler stuck