Skip to content

Rollup of 11 pull requests #141739

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 34 commits into from
May 30, 2025
Merged

Rollup of 11 pull requests #141739

merged 34 commits into from
May 30, 2025

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented May 29, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Kobzol and others added 30 commits May 22, 2025 11:21
There is an LLVM bug with lowering of basic `f16` operations that mean a
round trip via `__extendhfsf2` and `__truncsfhf2` may happen for simple
`abs` calls or bitcasts [1]. This is problematic because the round trip
quiets signaling NaNs. For most operations this is acceptable, but it is
causing `total_cmp` tests to fail unless optimizations are enabled.

Disable `total_cmp` tests involving signaling NaNs until this issue is
resolved.

Fixes: rust-lang/rustc_codegen_cranelift#1578
Fixes: rust-lang#141503

[1]: llvm/llvm-project#104915
It is only relevant when using cg_ssa for driving compilation.
There is no safety contract and I don't think any of them can actually
cause UB in more ways than passing malicious source code to rustc can.
While LtoModuleCodegen::optimize says that the returned ModuleCodegen
points into the LTO module, the LTO module has already been dropped by
the time this function returns, so if the returned ModuleCodegen indeed
points into the LTO module, we would have seen crashes on every LTO
compilation, which we don't. As such the comment is outdated.
This patch enables the optimized implementation of `f32::midpoint` for
`loongarch64` targets that support the `d`feature. Targets with reliable
64-bit float support can safely use the faster and more accurate computation
via `f64`, avoiding the fallback branchy version.
Leaving stage0 target-libdir resolution to rustc. This should also fix the issue with
hard-coding `$sysroot/lib` which fails on systems that use `$sysroot/lib64` or `$sysroot/lib32`.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
The float modules in `std` are currently top-level but for `core`, they
are nested within the `num` directory and referenced by `#[path = ...]`.
For consistency, adjust `std` to use the same structure as `core`.

Also change the `f16` and `f128` gates from outer attributes to inner
attributes like `core` has.
… r=workingjubilee

Make `std/src/num` mirror `core/src/num`

The float modules in `std` are currently top-level but for `core`, they are nested within the `num` directory and referenced by `#[path = ...]`. For consistency, adjust `std` to use the same structure as `core`.

Also change the `f16` and `f128` gates from outer attributes to inner attributes like `core` has.
…ouxu

Enable review queue tracking

This PR enables the new review queue tracking assignment logic implemented in triagebot. It is documented in rust-lang/rust-forge#853.
…Lapkin

A variety of improvements to the codegen backends

Some are just general improvements to cg_ssa or cg_llvm, while others will make it slightly easier to use cg_ssa in cg_clif in the future.
…x, r=petrochenkov

avoid some usages of `&mut P<T>` in AST visitors

It's a double indirection, and is also complicating our efforts at rust-lang#127615.

r? `@ghost`
…workingjubilee

float: Disable `total_cmp` sNaN tests for `f16`

There is an LLVM bug with lowering of basic `f16` operations that mean a round trip via `__extendhfsf2` and `__truncsfhf2` may happen for simple `abs` calls or bitcasts [1]. This is problematic because the round trip quiets signaling NaNs. For most operations this is acceptable, but it is causing `total_cmp` tests to fail unless optimizations are enabled.

Disable `total_cmp` tests involving signaling NaNs until this issue is resolved.

Fixes: rust-lang/rustc_codegen_cranelift#1578
Fixes: rust-lang#141503

[1]: llvm/llvm-project#104915
Add eslint as part of `tidy` run

Rustdoc uses `eslint` to run lints on the JS files. Currently you need to run it by hand since it's not part of any `x.py` command. This PR makes it part of `test tidy`. However, to prevent having all rust developers to install `npm` and `eslint`, I made it optional: if `eslint` is not installed, then the check is simply skipped (but will tell that it is being skipped).

The second commit removes the manual checks from the docker file since `eslint` is run as part of tidy.

cc `@lolbinarycat,` [#t-rustdoc > eslint seems to only be run in CI](https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/eslint.20seems.20to.20only.20be.20run.20in.20CI/with/520761477)
…8472

Add `loongarch64` with `d` feature to `f32::midpoint` fast path

This patch enables the optimized implementation of `f32::midpoint` for `loongarch64` targets that support the `d`feature. Targets with reliable 64-bit float support can safely use the faster and more accurate computation via `f64`, avoiding the fallback branchy version.
@bors
Copy link
Collaborator

bors commented May 29, 2025

📌 Commit 18646a8 has been approved by GuillaumeGomez

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 May 29, 2025
@bors
Copy link
Collaborator

bors commented May 29, 2025

⌛ Testing commit 18646a8 with merge de6db15...

bors added a commit that referenced this pull request May 29, 2025
Rollup of 11 pull requests

Successful merges:

 - #137574 (Make `std/src/num` mirror `core/src/num`)
 - #141384 (Enable review queue tracking)
 - #141448 (A variety of improvements to the codegen backends)
 - #141636 (avoid some usages of `&mut P<T>` in AST visitors)
 - #141676 (float: Disable `total_cmp` sNaN tests for `f16`)
 - #141705 (Add eslint as part of `tidy` run)
 - #141715 (Add `loongarch64` with `d` feature to `f32::midpoint` fast path)
 - #141723 (Provide secrets to try builds with new bors)
 - #141728 (Fix false documentation of FnCtxt::diverges)
 - #141729 (resolve target-libdir directly from rustc)
 - #141732 (creader: Remove extraenous String::clone)

r? `@ghost`
`@rustbot` modify labels: rollup
@Kobzol
Copy link
Contributor

Kobzol commented May 29, 2025

@bors ping

@bors
Copy link
Collaborator

bors commented May 29, 2025

😪 I'm awake I'm awake

@Kobzol
Copy link
Contributor

Kobzol commented May 29, 2025

@bors r-

@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 May 29, 2025
@Kobzol
Copy link
Contributor

Kobzol commented May 29, 2025

Looks like bors forgot to merge this PR. Now it at least started testing another one. Reapproving.

@bors r=GuillaumeGomez

@bors
Copy link
Collaborator

bors commented May 29, 2025

📌 Commit 18646a8 has been approved by GuillaumeGomez

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 May 29, 2025
@bors
Copy link
Collaborator

bors commented May 29, 2025

⌛ Testing commit 18646a8 with merge 1ac1950...

@bors
Copy link
Collaborator

bors commented May 30, 2025

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 1ac1950 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 30, 2025
@bors bors merged commit 1ac1950 into rust-lang:master May 30, 2025
10 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 30, 2025
Copy link

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 1bbd62e (parent) -> 1ac1950 (this PR)

Test differences

Show 744 test diffs

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

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 1ac1950c337039add1a83113ed6d1bd64bcb1142 --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: 5131.0s -> 6373.4s (24.2%)
  2. dist-apple-various: 6106.8s -> 7396.2s (21.1%)
  3. dist-aarch64-linux: 6553.9s -> 5413.8s (-17.4%)
  4. aarch64-gnu: 8338.7s -> 6889.5s (-17.4%)
  5. dist-x86_64-apple: 9516.4s -> 8151.3s (-14.3%)
  6. x86_64-gnu-llvm-19-2: 6193.9s -> 6906.7s (11.5%)
  7. aarch64-apple: 5657.1s -> 5092.4s (-10.0%)
  8. dist-aarch64-apple: 5353.8s -> 5880.6s (9.8%)
  9. dist-x86_64-netbsd: 5333.1s -> 4932.9s (-7.5%)
  10. dist-riscv64-linux: 5434.2s -> 5057.8s (-6.9%)
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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#137574 Make std/src/num mirror core/src/num c7aa99712f9f4c4332dba6e9d0fb90b126505179 (link)
#141384 Enable review queue tracking 95bd96a18fb218363c6c9e056bdf77cc1b536b15 (link)
#141448 A variety of improvements to the codegen backends 6816a1766be0c53ffb72a08e4f70b779723b48f9 (link)
#141636 avoid some usages of &mut P<T> in AST visitors 30c3979ac213ffccc30fa2213965c471c87b7f32 (link)
#141676 float: Disable total_cmp sNaN tests for f16 59d217e5cd704147c96946d6d612d1f9d88b5d33 (link)
#141705 Add eslint as part of tidy run 7a6e778394eb9c57998c8ed28330b74e9ed074e9 (link)
#141715 Add loongarch64 with d feature to f32::midpoint fast … 6b13d836a552899718d48306136f6a9f058b0b6f (link)
#141723 Provide secrets to try builds with new bors e55c7efbdaee0f09cd293645212bd13b71fad821 (link)
#141728 Fix false documentation of FnCtxt::diverges 27aa7e4a6113bfdb5eb486eff7808155e74c68ce (link)
#141729 resolve target-libdir directly from rustc b955083d54fe26a1d61f74cdda9d8bd0b925dc5b (link)
#141732 creader: Remove extraenous String::clone 717757832a0c1b3ab34d5df7be596e5ecfaa74df (link)

previous master: 1bbd62e547

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 (1ac1950): 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:

  • rustc

❗ ❗ ❗ ❗ ❗

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.1% [0.1%, 0.1%] 4
Regressions ❌
(secondary)
0.5% [0.4%, 0.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.4% [-0.5%, -0.4%] 2
All ❌✅ (primary) 0.1% [0.1%, 0.1%] 4

Max RSS (memory usage)

Results (primary 1.3%, secondary 1.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)
2.0% [1.3%, 3.1%] 3
Regressions ❌
(secondary)
1.9% [0.4%, 4.7%] 24
Improvements ✅
(primary)
-0.9% [-0.9%, -0.9%] 1
Improvements ✅
(secondary)
-1.7% [-2.9%, -0.5%] 4
All ❌✅ (primary) 1.3% [-0.9%, 3.1%] 4

Cycles

Results (secondary 0.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)
1.2% [0.4%, 2.6%] 11
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.0% [-2.5%, -0.5%] 6
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: missing data
Artifact size: 370.31 MiB -> 370.32 MiB (0.00%)

@rustbot rustbot added the perf-regression Performance regression. label May 30, 2025
@matthiaskrgr
Copy link
Member

looks like #141729 broke benchmarking cc @onur-ozkan

@onur-ozkan
Copy link
Member

Could you post the build log?

@GuillaumeGomez GuillaumeGomez deleted the rollup-ivboqwd branch May 30, 2025 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool 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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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.