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

Remove NtExpr and NtLiteral #138478

Merged
merged 4 commits into from
Apr 2, 2025
Merged

Conversation

nnethercote
Copy link
Contributor

@nnethercote nnethercote commented Mar 14, 2025

The next part of #124141.

r? @petrochenkov

@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. labels Mar 14, 2025
@rust-log-analyzer

This comment has been minimized.

@petrochenkov petrochenkov self-assigned this Mar 14, 2025
@petrochenkov petrochenkov 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-review Status: Awaiting review from the assignee but also interested parties. labels Mar 14, 2025
@nnethercote nnethercote force-pushed the rm-NtExpr-NtLiteral branch from 1b55759 to 7f6b06c Compare March 24, 2025 03:38
@nnethercote nnethercote marked this pull request as ready for review March 24, 2025 06:38
@rustbot
Copy link
Collaborator

rustbot commented Mar 24, 2025

Could not assign reviewer from: petrochenkov.
User(s) petrochenkov are either the PR author, already assigned, or on vacation. Please use r? to specify someone else to assign.

@nnethercote
Copy link
Contributor Author

@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 Mar 24, 2025
@bors
Copy link
Collaborator

bors commented Mar 24, 2025

⌛ Trying commit 7f6b06c with merge 2f5db75...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 24, 2025
…try>

Remove `NtExpr` and `NtLiteral`

The next part of rust-lang#124141.

r? `@petrochenkov`
@nnethercote
Copy link
Contributor Author

@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 Mar 24, 2025
@bors
Copy link
Collaborator

bors commented Mar 24, 2025

☀️ Try build successful - checks-actions
Build commit: 2f5db75 (2f5db751163ab3fb82ba7631bd9a6e6d96c870fa)

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2f5db75): 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.5% [0.1%, 2.1%] 52
Regressions ❌
(secondary)
4.5% [0.2%, 23.0%] 35
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.4%, -0.2%] 9
All ❌✅ (primary) 0.5% [0.1%, 2.1%] 52

Max RSS (memory usage)

Results (primary 1.6%, secondary -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)
1.6% [1.6%, 1.6%] 1
Regressions ❌
(secondary)
2.4% [2.4%, 2.4%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.3% [-12.0%, -1.5%] 13
All ❌✅ (primary) 1.6% [1.6%, 1.6%] 1

Cycles

Results (primary 1.7%, secondary 8.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.7% [1.6%, 1.9%] 4
Regressions ❌
(secondary)
8.5% [1.0%, 23.5%] 18
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.7% [1.6%, 1.9%] 4

Binary size

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

Bootstrap: missing data
Artifact size: 365.48 MiB -> 365.51 MiB (0.01%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Mar 24, 2025
@nnethercote
Copy link
Contributor Author

The perf regressions have been seen previously in #124141, with the NtExpr/NtLiteral changes being the most impactful. Hard to avoid, unfortunately, and deep-vector is a pathological case for this PR. The last two commits in #124141 will gain back some performance.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Mar 25, 2025
@petrochenkov petrochenkov 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-review Status: Awaiting review from the assignee but also interested parties. labels Mar 25, 2025
@nnethercote nnethercote force-pushed the rm-NtExpr-NtLiteral branch from 7f6b06c to 37af248 Compare March 26, 2025 05:48
@nnethercote
Copy link
Contributor Author

Thanks for the review. I have added two new commits addressing the comments.

@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 Mar 26, 2025
@petrochenkov petrochenkov 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 Mar 31, 2025
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 31, 2025

📌 Commit 59f6ba4 has been approved by petrochenkov

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 Mar 31, 2025
@bors
Copy link
Collaborator

bors commented Apr 1, 2025

☔ The latest upstream changes (presumably #138740) 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 Apr 1, 2025
Notes about tests:
- tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.rs: some messages are
  now duplicated due to repeated parsing.

- tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.rs: ditto.

- `tests/ui/proc-macro/macro-rules-derive-cfg.rs`: the diff looks large
  but the only difference is the insertion of a single
  invisible-delimited group around a metavar.

- `tests/ui/attributes/nonterminal-expansion.rs`: a slight span
  degradation, somehow related to the recent massive attr parsing
  rewrite (rust-lang#135726). I couldn't work out exactly what is going wrong,
  but I don't think it's worth holding things up for a single slightly
  suboptimal error message.
In favour of the similar method on `Parser`, which works on things
other than identifiers and lifetimes.
This makes the expression re-parsing more like how it's originally done
in `parse_nonterminal`.
@nnethercote nnethercote force-pushed the rm-NtExpr-NtLiteral branch from 59f6ba4 to 592d113 Compare April 1, 2025 19:42
@nnethercote
Copy link
Contributor Author

I rebased.

@bors r=petrochenkov

@bors
Copy link
Collaborator

bors commented Apr 1, 2025

📌 Commit 592d113 has been approved by petrochenkov

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 Apr 1, 2025
@bors
Copy link
Collaborator

bors commented Apr 2, 2025

⌛ Testing commit 592d113 with merge 70dab5a...

@bors
Copy link
Collaborator

bors commented Apr 2, 2025

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 70dab5a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 2, 2025
@bors bors merged commit 70dab5a into rust-lang:master Apr 2, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 2, 2025
Copy link

github-actions bot commented Apr 2, 2025

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 9b7d5ac (parent) -> 70dab5a (this PR)

Test differences

Show 6 test diffs

Stage 1

  • [ui] tests/ui/attributes/dont-dup-expr-attrs.rs: [missing] -> pass (J0)
  • [ui] tests/ui/attributes/inner-attr-metavar.rs: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/attributes/dont-dup-expr-attrs.rs: [missing] -> pass (J1)
  • [ui] tests/ui/attributes/inner-attr-metavar.rs: [missing] -> pass (J1)

Additionally, 2 doctest diffs were found. These are ignored, as they are noisy.

Job group index

  • J0: x86_64-gnu-llvm-18-3, x86_64-gnu-llvm-19-3
  • J1: aarch64-apple, aarch64-gnu, arm-android, armhf-gnu, dist-i586-gnu-i586-i686-musl, i686-gnu-1, i686-gnu-nopt-1, i686-msvc-1, test-various, x86_64-apple-2, x86_64-gnu, x86_64-gnu-llvm-18-1, x86_64-gnu-llvm-18-2, x86_64-gnu-llvm-19-1, x86_64-gnu-llvm-19-2, x86_64-gnu-nopt, x86_64-gnu-stable, x86_64-mingw-1, x86_64-msvc-1

Job duration changes

  1. x86_64-apple-1: 7599.0s -> 9710.7s (27.8%)
  2. x86_64-msvc-2: 6618.7s -> 7135.1s (7.8%)
  3. dist-x86_64-freebsd: 5023.9s -> 5349.4s (6.5%)
  4. dist-i686-mingw: 8154.0s -> 8671.7s (6.3%)
  5. dist-i686-linux: 6037.2s -> 6409.6s (6.2%)
  6. dist-aarch64-linux: 7408.3s -> 7687.7s (3.8%)
  7. dist-various-2: 3327.4s -> 3426.4s (3.0%)
  8. i686-gnu-nopt-1: 8462.2s -> 8697.0s (2.8%)
  9. dist-x86_64-netbsd: 4966.0s -> 5100.4s (2.7%)
  10. dist-x86_64-linux-alt: 7231.2s -> 7420.3s (2.6%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (70dab5a): comparison URL.

Overall result: ❌✅ regressions and improvements - 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.5% [0.1%, 2.6%] 80
Regressions ❌
(secondary)
6.8% [0.2%, 38.2%] 41
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.3%, -0.2%] 9
All ❌✅ (primary) 0.5% [0.1%, 2.6%] 80

Max RSS (memory usage)

Results (primary 1.0%, secondary 0.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)
1.0% [1.0%, 1.0%] 2
Regressions ❌
(secondary)
7.7% [2.4%, 18.0%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.6% [-8.0%, -2.7%] 8
All ❌✅ (primary) 1.0% [1.0%, 1.0%] 2

Cycles

Results (primary 1.6%, secondary 14.8%)

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.4%, 2.0%] 6
Regressions ❌
(secondary)
15.9% [9.9%, 42.2%] 16
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.6% [-3.6%, -3.6%] 1
All ❌✅ (primary) 1.6% [1.4%, 2.0%] 6

Binary size

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

Bootstrap: 774.901s -> 774.398s (-0.06%)
Artifact size: 365.95 MiB -> 365.94 MiB (-0.00%)

@nnethercote
Copy link
Contributor Author

Regressions were expected, alas. deep-vector is a worst-case scenario for this change.

@rustbot label: +perf-regression-triaged

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. 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.

6 participants