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

Rollup of 9 pull requests #105378

Merged
merged 25 commits into from
Dec 6, 2022
Merged

Rollup of 9 pull requests #105378

merged 25 commits into from
Dec 6, 2022

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

oli-obk and others added 25 commits November 30, 2022 12:11
fmt

add a comment
This code uses a special `hideme` class anyway, so just style that.
Replaces using `ResumeTy` / `get_context` in favor of using `&'static mut Context<'_>`.

Usage of the `'static` lifetime here is technically "cheating", and replaces
the raw pointer in `ResumeTy` and the `get_context` fn that pulls the
correct lifetimes out of thin air.
…sleywiser

Put all cached values into a central struct instead of just the stable hash

cc `@nnethercote`

this allows re-use of the type for Predicate without duplicating all the logic for the non-hash cached fields
Fix `emit_unused_delims_expr` ICE

Fixes rust-lang#104897

This is also related to rust-lang#104433.
…d, r=eholk

Suggest removing struct field from destructive binding only in shorthand scenario

Fixes rust-lang#105028
Replace usage of `ResumeTy` in async lowering with `Context`

Replaces using `ResumeTy` / `get_context` in favor of using `&'static mut Context<'_>`.

Usage of the `'static` lifetime here is technically "cheating", and replaces the raw pointer in `ResumeTy` and the `get_context` fn that pulls the correct lifetimes out of thin air.

fixes rust-lang#104828 and rust-lang#104321 (comment)

r? `@oli-obk`
…verage, r=cjgillot

Add -Z maximal-hir-to-mir-coverage flag

This PR adds a new unstable flag `-Z maximal-hir-to-mir-coverage` that changes the behavior of `maybe_lint_level_root_bounded`, pursuant to [a discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Mapping.20MIR.20to.20HIR). When enabled, this function will not search upwards for a lint root, but rather immediately return the provided HIR node ID. This change increases the granularity of the mapping between MIR locations and HIR nodes inside the `SourceScopeLocalData` data structures. This increase in granularity is useful for rustc consumers like [Flowistry](https://github.com/willcrichton/flowistry) that rely on getting source-mapping information about the MIR CFG that is as precise as possible.

A test `maximal_mir_to_hir_coverage.rs` has been added to verify that this flag does not break anything.

r? `@cjgillot`

cc `@gavinleroy`
…-hideme-2, r=GuillaumeGomez

rustdoc: simplify CSS selectors on top-doc and non-exhaustive toggles

This code uses a special `hideme` class anyway, so just style that.
…fn-ptr-arg, r=cjgillot

Point at args in associated const fn pointers

Tiny follow-up to rust-lang#105201, not so sure it's worth it but 🤷

The UI test example is a bit more compelling when it's `GlUniformScalar::FACTORY`

r? `@cjgillot`
Cleanup macro-expanded code in `rustc_type_ir`

We could of course just leave this as-is, but every time I go-to-def to this file it's painful to see all this `(&A(ref __self_1_0),)` stuff.
Remove outdated syntax from trait alias pretty printing

Given the following program:
```rust
#![feature(trait_alias)]
trait A = ?Sized;

fn main() {}
```
Old output of `rustc +nightly ./t.rs -Zunpretty=normal`:
```rust
#![feature(trait_alias)]
trait A for ? Sized ;

fn main() {}
```
New output of `rustc +a ./t.rs -Zunpretty=normal`:
```rust
#![feature(trait_alias)]
trait A = ?Sized;

fn main() {}
```

cc `@durka` (you've written the `FIXME` in rust-lang#45047, see rust-lang#45047 (comment))
@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. T-libs Relevant to the library 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. rollup A PR which is a rollup labels Dec 6, 2022
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=1 (moving behind #104449 )

@bors
Copy link
Contributor

bors commented Dec 6, 2022

📌 Commit 97008a2 has been approved by matthiaskrgr

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 Dec 6, 2022
@matthiaskrgr
Copy link
Member Author

@bors p=9

@bors
Copy link
Contributor

bors commented Dec 6, 2022

⌛ Testing commit 97008a2 with merge b28d30e...

@bors
Copy link
Contributor

bors commented Dec 6, 2022

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing b28d30e to master...

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

Finished benchmarking commit (b28d30e): comparison URL.

Overall result: ❌ regressions - 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)
1.9% [0.2%, 4.4%] 12
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.8% [-0.8%, -0.8%] 1
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)
- - 0
Improvements ✅
(primary)
-1.2% [-1.3%, -1.2%] 2
Improvements ✅
(secondary)
-2.0% [-2.4%, -1.3%] 4
All ❌✅ (primary) -1.2% [-1.3%, -1.2%] 2

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)
1.1% [0.7%, 1.5%] 7
Regressions ❌
(secondary)
2.8% [1.0%, 5.3%] 26
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.1% [0.7%, 1.5%] 7

@rustbot rustbot added the perf-regression Performance regression. label Dec 7, 2022
@Swatinem
Copy link
Contributor

Swatinem commented Dec 7, 2022

NOTE to whoever might triage this regression:

The changes to deeply-nested-multi, issue-88862 and await-call-tree seem to be the effect of #105250 and revert some earlier wins from #104321.

This is a bit surprising to me though, I would have expected this to rather further improve things if anything, as it removes a fn call in favor of a more complex but also more correct type.

@rylev
Copy link
Member

rylev commented Dec 13, 2022

@rust-timer build 19a19284681762447cbed6f2543fd83583612d19

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (19a19284681762447cbed6f2543fd83583612d19): comparison URL.

Overall result: ❌ regressions - 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-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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.1% [0.2%, 4.7%] 12
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.8% [-0.8%, -0.8%] 1
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)
7.9% [7.9%, 7.9%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.7%, -1.4%] 4
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)
1.6% [1.5%, 1.8%] 2
Regressions ❌
(secondary)
2.6% [1.8%, 4.9%] 10
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.6% [1.5%, 1.8%] 2

@rylev
Copy link
Member

rylev commented Dec 13, 2022

It does seem that #105250 is the culprit. It's still small enough that I don't think we necessarily need to do anything about it.

cc @Swatinem @oli-obk

@Swatinem
Copy link
Contributor

I’m working on #105668 currently, which fixes a regression from #105250. That might as well win these perf regressions back as it avoids carrying around that more complex type altogether.

@matthiaskrgr matthiaskrgr deleted the rollup-fjeorw5 branch December 22, 2022 10:46
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. rollup A PR which is a rollup 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-libs Relevant to the library 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.