Skip to content

Stop backends from needing to support nullary intrinsics #142839

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

Merged
merged 4 commits into from
Jun 30, 2025

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jun 21, 2025

And then remove our infrastructure special casing them. Further improvements can now be done to them by avoiding the intermediate ConstValue step, but let's leave that to follow up work

r? @RalfJung

@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. labels Jun 21, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 21, 2025

Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter
gets adapted for the changes, if necessary.

cc @rust-lang/miri, @RalfJung, @oli-obk, @lcnr

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 21, 2025

@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 Jun 21, 2025
@bors
Copy link
Collaborator

bors commented Jun 21, 2025

⌛ Trying commit a44843e with merge a5e9784...

bors added a commit that referenced this pull request Jun 21, 2025
Stop backends from needing to support nullary intrinsics

And then remove our infrastructure special casing them. Further improvements can now be done to them by avoiding the intermediate ConstValue step, but let's leave that to follow up work

r? `@ghost` wanna see perf first
@rust-log-analyzer

This comment has been minimized.


match intrinsic_name {
sym::type_name => {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I see this is a code-move & fixup to work in here, but is it worth sorting these arms into the rest of the match? though I guess the other arms are also not sorted simply... it was mostly that needs_drop is between type_id & type_name that caught my eye hehe

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea, could do that, good point. didn't want to do it in the first commit to kinda make the diff line up

@bors
Copy link
Collaborator

bors commented Jun 21, 2025

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a5e9784): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
3.2% [2.8%, 3.5%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.3%, -0.3%] 1
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.2%] 2
All ❌✅ (primary) 2.0% [-0.3%, 3.5%] 3

Max RSS (memory usage)

Results (primary 3.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
3.7% [2.0%, 5.5%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.7% [2.0%, 5.5%] 2

Cycles

Results (primary 2.7%, secondary -6.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.7% [2.7%, 2.8%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-6.5% [-6.5%, -6.5%] 1
All ❌✅ (primary) 2.7% [2.7%, 2.8%] 2

Binary size

Results (primary 0.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.5% [0.0%, 1.1%] 9
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.1%, -0.0%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.4% [-0.1%, 1.1%] 11

Bootstrap: 691.091s -> 687.91s (-0.46%)
Artifact size: 371.86 MiB -> 371.89 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 Jun 22, 2025
@oli-obk oli-obk force-pushed the denullarification branch from a44843e to 1dd711a Compare June 23, 2025 08:35
@rust-log-analyzer

This comment has been minimized.

@oli-obk oli-obk force-pushed the denullarification branch from 1dd711a to 93129de Compare June 23, 2025 08:46
@rust-log-analyzer

This comment has been minimized.

@oli-obk oli-obk force-pushed the denullarification branch from 93129de to 5952269 Compare June 24, 2025 08:52
@rustbot
Copy link
Collaborator

rustbot commented Jun 24, 2025

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

@oli-obk oli-obk force-pushed the denullarification branch from 5952269 to 2082fe8 Compare June 24, 2025 08:55
@rust-log-analyzer

This comment has been minimized.

@oli-obk oli-obk force-pushed the denullarification branch from 2082fe8 to cdb3a21 Compare June 24, 2025 12:22
@rust-log-analyzer

This comment has been minimized.

@oli-obk oli-obk force-pushed the denullarification branch from cdb3a21 to 7c1059f Compare June 24, 2025 12:59
@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 27, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 27, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Jun 27, 2025

The Miri subtree was changed

cc @rust-lang/miri

@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 27, 2025

@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 Jun 27, 2025
@RalfJung
Copy link
Member

The core parts LGTM, but I have no idea how to review the stable MIR test changes.
Cc @celinval

@bors
Copy link
Collaborator

bors commented Jun 27, 2025

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

@celinval
Copy link
Contributor

The core parts LGTM, but I have no idea how to review the stable MIR test changes. Cc @celinval

The test changes make sense to me. Thanks for checking!

@RalfJung
Copy link
Member

Thanks! r=RalfJung,celinval after a rebase.

@oli-obk oli-obk force-pushed the denullarification branch from 4698db1 to d0bb9a7 Compare June 30, 2025 08:05
@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 30, 2025

@bors r=RalfJung,celinval rollup

@bors
Copy link
Collaborator

bors commented Jun 30, 2025

📌 Commit d0bb9a7 has been approved by RalfJung,celinval

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 30, 2025
@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 30, 2025

@bors rollup=never

@bors
Copy link
Collaborator

bors commented Jun 30, 2025

⌛ Testing commit d0bb9a7 with merge ad3b725...

@bors
Copy link
Collaborator

bors commented Jun 30, 2025

☀️ Test successful - checks-actions
Approved by: RalfJung,celinval
Pushing ad3b725 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 30, 2025
@bors bors merged commit ad3b725 into rust-lang:master Jun 30, 2025
11 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jun 30, 2025
Copy link
Contributor

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 f191420 (parent) -> ad3b725 (this PR)

Test differences

No test diffs found

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard ad3b7257615c28aaf8212a189ec032b8af75de51 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 3935.1s -> 5810.6s (47.7%)
  2. dist-apple-various: 5248.9s -> 6258.5s (19.2%)
  3. dist-ohos-aarch64: 4134.0s -> 4807.9s (16.3%)
  4. x86_64-rust-for-linux: 2968.4s -> 2636.5s (-11.2%)
  5. mingw-check-1: 1779.3s -> 1586.0s (-10.9%)
  6. dist-powerpc64le-linux-gnu: 5107.8s -> 5638.7s (10.4%)
  7. x86_64-gnu-llvm-20-1: 3713.1s -> 3328.6s (-10.4%)
  8. i686-gnu-1: 8126.1s -> 7307.7s (-10.1%)
  9. x86_64-apple-1: 6599.9s -> 7243.8s (9.8%)
  10. dist-loongarch64-linux: 5932.1s -> 6413.6s (8.1%)
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 (ad3b725): comparison URL.

Overall result: ❌✅ regressions and improvements - BENCHMARK(S) FAILED

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

❗ ❗ ❗ ❗ ❗
Warning ⚠️: The following benchmark(s) failed to build:

  • include-blob

❗ ❗ ❗ ❗ ❗

cc @rust-lang/wg-compiler-performance

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
2.7% [2.7%, 2.7%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.4%, -0.3%] 5
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [-0.4%, 2.7%] 6

Max RSS (memory usage)

Results (primary -0.9%, secondary -1.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
5.1% [5.0%, 5.1%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-4.8% [-7.8%, -1.1%] 3
Improvements ✅
(secondary)
-1.7% [-1.7%, -1.7%] 1
All ❌✅ (primary) -0.9% [-7.8%, 5.1%] 5

Cycles

Results (primary 2.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.4% [2.4%, 2.4%] 1

Binary size

Results (primary 0.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.3% [0.0%, 1.1%] 8
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.0% [-0.1%, -0.0%] 5
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [-0.1%, 1.1%] 13

Bootstrap: 695.172s -> 694.099s (-0.15%)
Artifact size: 372.16 MiB -> 372.14 MiB (-0.00%)

@Kobzol
Copy link
Contributor

Kobzol commented Jun 30, 2025

You can ignore the failure, it's a (temporary) bug in the benchmark suite.

EDIT: fixed now

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