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 6 pull requests #127014

Merged
merged 17 commits into from
Jun 27, 2024
Merged

Rollup of 6 pull requests #127014

merged 17 commits into from
Jun 27, 2024

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Jun 27, 2024

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

nnethercote and others added 17 commits June 24, 2024 09:44
To involve `macro_rules!` macros, and also a mix of fragment specifiers,
some of which feature the forwaring limitation and some of which don't.
Just some extra sanity checking, making explicit some values not
possible in code working with token trees -- we shouldn't be seeing
explicit delimiter tokens, because they should be represented as
`TokenTree::Delimited`.
This was added (with a different name) to improve an error message. It
is no longer needed -- removing it changes the error message, but overall
I think the new message is no worse:
- the mention of `#` in the first line is a little worse,
- but the extra context makes it very clear what the problem is, perhaps
  even clearer than the old message,
- and the removal of the note about the `expr` fragment (an internal
  detail of `__rust_force_expr`) is an improvement.

Overall I think the error is quite clear and still far better than the
old message that prompted rust-lang#61933, which didn't even mention patterns.

The motivation for this is rust-lang#124141, which will cause pasted
metavariables to be tokenized and reparsed instead of the AST node being
cached. This change in behaviour occasionally has a non-zero perf cost,
and `__rust_force_expr` causes the tokenize/reparse step to occur twice.
Removing `__rust_force_expr` greatly reduces the extra overhead for the
`deep-vector` benchmark.
And remove the `NtPath` and `NtBlock` cases in
`parse_literal_maybe_minus`, because they are unnecessary.
These attributes apply to all enclosed functions/methods/closures, unless
explicitly overridden by another coverage attribute.
…2, r=petrochenkov

Less `maybe_whole_expr`, take 2

I first tried this in rust-lang#107550. I now think it's worth doing again, as a precursor to rust-lang#124141.

r? ```@petrochenkov```
coverage: Make `#[coverage(..)]` apply recursively to nested functions

This PR makes the (currently-unstable) `#[coverage(off)]` and `#[coverage(on)]` attributes apply recursively to all nested functions/closures, instead of just the function they are directly attached to.

Those attributes can now also be applied to modules and to impl/impl-trait blocks, where they have no direct effect, but will be inherited by all enclosed functions/closures/methods that don't override the inherited value.

---

Fixes rust-lang#126625.
Some `Nonterminal` removal precursors

Small things to prepare for rust-lang#124141, more or less.

r? ```@oli-obk```
…r=oli-obk

Remove `__rust_force_expr`.

This was added (with a different name) to improve an error message. It is no longer needed -- removing it changes the error message, but overall I think the new message is no worse:
- the mention of `#` in the first line is a little worse,
- but the extra context makes it very clear what the problem is, perhaps even clearer than the old message,
- and the removal of the note about the `expr` fragment (an internal detail of `__rust_force_expr`) is an improvement.

Overall I think the error is quite clear and still far better than the old message that prompted rust-lang#61933, which didn't even mention patterns.

The motivation for this is rust-lang#124141, which will cause pasted metavariables to be tokenized and reparsed instead of the AST node being cached. This change in behaviour occasionally has a non-zero perf cost, and `__rust_force_expr` causes the tokenize/reparse step to occur twice. Removing `__rust_force_expr` greatly reduces the extra overhead for the `deep-vector` benchmark.

r? ```@oli-obk```
… r=workingjubilee

set self.is_known_utf8 to false in extend_from_slice

try-job: x86_64-msvc

closes rust-lang#126977
Related to rust-lang#126885, rust-lang#126333, and [this conversation](<rust-lang@aa46a33#r143539097>)
Remove `f16` and `f128` ICE paths from smir

Just chasing down some possible ICE paths. ```@compiler-errors``` mentioned in rust-lang#121728 (comment) that it is okay not to support these in smir, but this change seems pretty trivial?

r? ```@celinval``` since you reviewed rust-lang#114607 (review)
@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. rollup A PR which is a rollup labels Jun 27, 2024
@jhpratt
Copy link
Member Author

jhpratt commented Jun 27, 2024

@bors r+ rollup=never p=6

@bors
Copy link
Contributor

bors commented Jun 27, 2024

📌 Commit 73016dc has been approved by jhpratt

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 Jun 27, 2024
@bors
Copy link
Contributor

bors commented Jun 27, 2024

⌛ Testing commit 73016dc with merge 127fa22...

@bors
Copy link
Contributor

bors commented Jun 27, 2024

☀️ Test successful - checks-actions
Approved by: jhpratt
Pushing 127fa22 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 27, 2024
@bors bors merged commit 127fa22 into rust-lang:master Jun 27, 2024
7 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jun 27, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#126571 Less maybe_whole_expr, take 2 1c32639c2e5e90029cdf7196d4c30c7b42bb580f (link)
#126721 coverage: Make #[coverage(..)] apply recursively to neste… a19a997f25ecdc8ca19dc0546a51f1fab9cd8b2e (link)
#126928 Some Nonterminal removal precursors 2a0c63b440cc40b82af4939d8fab9cf3097a3b58 (link)
#126929 Remove __rust_force_expr. 9badee643e427553a10457a7851de0ac83238167 (link)
#126980 set self.is_known_utf8 to false in extend_from_slice 38bef07c56e1606490f6e207a899e0fedc971607 (link)
#126983 Remove f16 and f128 ICE paths from smir 0c901306f6d5c0bb0bbc0c4a6b50adc415b53dfb (link)

previous master: 536235f07e

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (127fa22): 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)
8.2% [8.2%, 8.2%] 1
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 1
Improvements ✅
(secondary)
-2.2% [-5.0%, -0.2%] 13
All ❌✅ (primary) -0.2% [-0.2%, -0.2%] 1

Max RSS (memory usage)

Results (secondary -3.4%)

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)
3.0% [3.0%, 3.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.5% [-8.2%, -4.0%] 3
All ❌✅ (primary) - - 0

Cycles

Results (primary 0.7%, secondary -3.9%)

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.7% [0.7%, 0.7%] 1
Regressions ❌
(secondary)
2.5% [2.5%, 2.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-6.0% [-6.6%, -5.5%] 3
All ❌✅ (primary) 0.7% [0.7%, 0.7%] 1

Binary size

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

Bootstrap: 694.809s -> 695.971s (0.17%)
Artifact size: 326.69 MiB -> 326.67 MiB (-0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Jun 27, 2024
@lqd
Copy link
Member

lqd commented Jun 27, 2024

The deep-vector regression is noise, and went away in the following merge

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Jun 27, 2024
@jhpratt jhpratt deleted the rollup-45ic8f5 branch July 13, 2024 08:31
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. perf-regression-triaged The performance regression has been triaged. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants