Skip to content

Conversation

BoxyUwU
Copy link
Member

@BoxyUwU BoxyUwU commented Jan 12, 2022

reverts #87280 except for some of the changes around ty::Unevaluated having a visitor and a generic for promoted
why revert: #92805 (comment)

r? @lcnr

@rust-highfive
Copy link
Contributor

Some changes occured to the CTFE / Miri engine

cc @rust-lang/miri

Some changes occured to rustc_codegen_cranelift

cc @bjorn3

Some changes occured to the CTFE / Miri engine

cc @rust-lang/miri

Some changes occurred in src/tools/clippy.

cc @rust-lang/clippy

@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jan 12, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 12, 2022
@rust-log-analyzer

This comment has been minimized.

@BoxyUwU BoxyUwU added the A-const-generics Area: const generics (parameters and arguments) label Jan 12, 2022
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@oli-obk
Copy link
Contributor

oli-obk commented Jan 12, 2022

Why is this getting reverted?

@BoxyUwU
Copy link
Member Author

BoxyUwU commented Jan 12, 2022

I knew I forgot something when making this PR.... will add a description explaining the "why" 😅

@lcnr
Copy link
Contributor

lcnr commented Jan 12, 2022

I think we want visit_unevaluated_const to stick around idk how useful that is by itself 🤔 the part which I want to remove again is the TypeFlags change as that one caused some bugs in the past (#90266 and #90375) and is generally just quite confusing.

I never got to filtering the generic params (which is also more difficult than originally assumed) and we will probably implement a different solution for the "unused substs" problem in the future, so keeping these changes doesn't seem too practical for feature(generic_const_exprs).

And finally, we don't need any substs filtering for #![feature(min_generic_const_expr)] which is what i want to focus on first

@oli-obk
Copy link
Contributor

oli-obk commented Jan 12, 2022

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 12, 2022

📌 Commit e24b05e122b134496aa76e6b2333b1cbb5b618af has been approved by oli-obk

@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 Jan 12, 2022
@lcnr
Copy link
Contributor

lcnr commented Jan 12, 2022

@bors rollup=never

this is perf sensitive

@lcnr
Copy link
Contributor

lcnr commented Jan 12, 2022

I would like to keep the Unevaluated split wrt promoteds and keep using visit_unevaluated_const.
That also means that we don't have to revert #88557 which is quite nice imo.

Should have been more clear when talking about #87280 and what i actually want to revert '^^

@bors r- for now

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 12, 2022
@RalfJung
Copy link
Member

Also some of these commit messages look like they should be fixed before merging.^^

@BoxyUwU BoxyUwU force-pushed the revert-lazy-anon-const-substs branch from 1facfa2 to 1312f61 Compare January 12, 2022 23:38
@BoxyUwU BoxyUwU changed the title revert lazily "compute" anon const default substs partially revertish lazily "compute" anon const default substs Jan 12, 2022
@BoxyUwU BoxyUwU force-pushed the revert-lazy-anon-const-substs branch from 1312f61 to 7e2cf3b Compare January 13, 2022 01:14
@@ -444,15 +443,13 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
match constant.val {
ty::ConstKind::Unevaluated(uv) => {
assert!(uv.promoted.is_none());
Copy link
Contributor

Choose a reason for hiding this comment

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

we can remove that assert

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.

r=me afterwards

thanks @BoxyUwU :3

@BoxyUwU BoxyUwU force-pushed the revert-lazy-anon-const-substs branch from 9d2a60e to 6899064 Compare January 13, 2022 09:27
@lcnr
Copy link
Contributor

lcnr commented Jan 13, 2022

@bors r+ rollup=never

@bors
Copy link
Collaborator

bors commented Jan 13, 2022

📌 Commit 6899064be3ddaee785686a614179d9ccfd0d66a8 has been approved by lcnr

@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 Jan 13, 2022
@bors
Copy link
Collaborator

bors commented Jan 14, 2022

☔ The latest upstream changes (presumably #92883) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 14, 2022
@BoxyUwU BoxyUwU force-pushed the revert-lazy-anon-const-substs branch from 6899064 to 3f3a10f Compare January 15, 2022 01:20
@BoxyUwU
Copy link
Member Author

BoxyUwU commented Jan 15, 2022

@bors r=lcnr rollup=never

@bors
Copy link
Collaborator

bors commented Jan 15, 2022

📌 Commit 3f3a10f has been approved by lcnr

@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 Jan 15, 2022
@bors
Copy link
Collaborator

bors commented Jan 16, 2022

⌛ Testing commit 3f3a10f with merge 7be8693...

@bors
Copy link
Collaborator

bors commented Jan 16, 2022

☀️ Test successful - checks-actions
Approved by: lcnr
Pushing 7be8693 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 16, 2022
@bors bors merged commit 7be8693 into rust-lang:master Jan 16, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 16, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7be8693): comparison url.

Summary: This change led to moderate relevant mixed results 🤷 in compiler performance.

  • Moderate improvement in instruction counts (up to -1.4% on full builds of deeply-nested-async)
  • Small regression in instruction counts (up to 0.9% on incr-unchanged builds of clap-rs)

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

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

@rustbot rustbot added the perf-regression Performance regression. label Jan 16, 2022
@lcnr
Copy link
Contributor

lcnr commented Jan 17, 2022

seems to mostly mirror the perf results from #87280 https://perf.rust-lang.org/compare.html?start=3b5df014390dcef66cc35f968fe51e9558e6ca13&end=22a1bd761de8b0ac85d9ecaae5f262d5798a4409

a bit surprised that the ctfe tests stayed about the same even though they regressed by about 4% in the original pr. it might make some sense to look a bit more into the impact of using `ty::Unevaluated' during type folding. Might get some more perf back in stress tests by adding some inlines there.

bors added a commit to rust-lang/rust-clippy that referenced this pull request Jan 27, 2022
partially revertish `lazily "compute" anon const default substs`

reverts #87280 except for some of the changes around `ty::Unevaluated` having a visitor and a generic for promoted
why revert: <rust-lang/rust#92805 (comment)>

r? `@lcnr`
dario23 added a commit to dario23/rust-semverver that referenced this pull request May 4, 2022
dario23 added a commit to dario23/rust-semverver that referenced this pull request May 6, 2022
Needed to adjust stdout for trait_impls, due to new allocator generic
parameter for `Vec` and `Box`, decided it wasn't worth a separate
commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-generics Area: const generics (parameters and arguments) merged-by-bors This PR was explicitly merged by bors. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants