Skip to content

Rollup of 5 pull requests #141243

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 12 commits into from
May 19, 2025
Merged

Rollup of 5 pull requests #141243

merged 12 commits into from
May 19, 2025

Conversation

Zalathar
Copy link
Contributor

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Zalathar and others added 12 commits May 10, 2025 00:24
This allows us to assume that coverage spans will only be discarded during
codegen in very unusual situations.
Having this helper function in the loop was confusing, because it doesn't rely
on anything that changes between loop iterations.
This case can't actually happen yet (other than via a testing flag), because
currently all of a function's spans must belong to the same file and expansion.
But this will be an important edge case when adding expansion region support.
…rget

this is more in line with the x86 parse error tests. The cross-platform tests were more complete anyway
…rowLii

coverage: Detect unused local file IDs to avoid an LLVM assertion

Each function's coverage metadata contains a *local file table* that maps local file IDs (used by the function's mapping regions) to global file IDs (shared by all functions in the same CGU).

LLVM requires all local file IDs to have at least one mapping region, and has an assertion that will fail if it detects a local file ID with no regions. To make sure that assertion doesn't fire, we need to detect and skip functions whose metadata would trigger it.

(This can't actually happen yet, because currently all of a function's spans must belong to the same file and expansion. But this will be an important edge case when adding expansion region support.)
opt-dist: fix deprecated BOLT -icf=1 option

Replaced deprecated `-icf=1` BOLT option.

Spotted in recent CI run (https://github.com/rust-lang-ci/rust/actions/runs/15080898417/job/42397253162):
```
BOLT-WARNING: specifying numeric value "1" for option -icf is deprecated
```

Change was added in llvm/llvm-project#116275

Btw, now there also exist new option `-icf=safe`, will be nice to try it too.
…mpiler-errors

more ice tests

try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: x86_64-gnu
try-job: dist-i586-gnu-i586-i686-musl
try-job: test-various
dladdr cannot leave dli_fname to be null

There are two places in the repo calling `dladdr`, and they are inconsistent wrt their assumption of whether the `dli_fname` field can be null. Let's make them consistent. I see nothing in the docs that allows it to be null, but just to be on the safe side let's make this an assertion so hopefully we get a report if that ever happens.
…s, r=Amanieu

in `tests/ui/asm/aarch64/parse-error.rs`, only test cases specific to that target

this is more in line with the x86 parse error tests at https://github.com/rust-lang/rust/blob/master/tests/ui/asm/x86_64/x86_64_parse_error.rs. We could at this point use minicore so that these tests run no matter the host target?

`tests/ui/asm/aarch64/parse-error.rs` was mostly a copy of https://github.com/rust-lang/rust/blob/master/tests/ui/asm/parse-error.rs, though a bit out of date. The only aarch64-specific tests are those that talk about register names. Here is a diff between those two files:

```diff
--- <unnamed>
+++ <unnamed>
`@@` -1,4 +1,4 `@@`
-//@ needs-asm-support
+//@ only-aarch64

 use std::arch::{asm, global_asm};

`@@` -36,36 +36,12 `@@`
         //~^ ERROR expected one of
         asm!("{}", options(), const foo);
         //~^ ERROR attempt to use a non-constant value in a constant
-
-        // test that asm!'s clobber_abi doesn't accept non-string literals
-        // see also rust-lang#112635
-        asm!("", clobber_abi());
-        //~^ ERROR at least one abi must be provided
         asm!("", clobber_abi(foo));
         //~^ ERROR expected string literal
         asm!("", clobber_abi("C" foo));
         //~^ ERROR expected one of `)` or `,`, found `foo`
         asm!("", clobber_abi("C", foo));
         //~^ ERROR expected string literal
-        asm!("", clobber_abi(1));
-        //~^ ERROR expected string literal
-        asm!("", clobber_abi(()));
-        //~^ ERROR expected string literal
-        asm!("", clobber_abi(uwu));
-        //~^ ERROR expected string literal
-        asm!("", clobber_abi({}));
-        //~^ ERROR expected string literal
-        asm!("", clobber_abi(loop {}));
-        //~^ ERROR expected string literal
-        asm!("", clobber_abi(if));
-        //~^ ERROR expected string literal
-        asm!("", clobber_abi(do));
-        //~^ ERROR expected string literal
-        asm!("", clobber_abi(<));
-        //~^ ERROR expected string literal
-        asm!("", clobber_abi(.));
-        //~^ ERROR expected string literal
-
         asm!("{}", clobber_abi("C"), const foo);
         //~^ ERROR attempt to use a non-constant value in a constant
         asm!("", options(), clobber_abi("C"));
`@@` -76,7 +52,15 `@@`
         //~^^ ERROR argument never used
         //~^^^ ERROR attempt to use a non-constant value in a constant
         //~^^^^ ERROR attempt to use a non-constant value in a constant
-
+        asm!("", a = in("x0") foo);
+        //~^ ERROR explicit register arguments cannot have names
+        asm!("{a}", in("x0") foo, a = const bar);
+        //~^ ERROR attempt to use a non-constant value in a constant
+        asm!("{a}", in("x0") foo, a = const bar);
+        //~^ ERROR attempt to use a non-constant value in a constant
+        asm!("{1}", in("x0") foo, const bar);
+        //~^ ERROR positional arguments cannot follow named arguments or explicit register arguments
+        //~^^ ERROR attempt to use a non-constant value in a constant
         asm!("", options(), "");
         //~^ ERROR expected one of
         asm!("{}", in(reg) foo, "{}", out(reg) foo);
`@@` -109,13 +93,11 `@@`
 global_asm!("{}", const(reg) FOO);
 //~^ ERROR expected one of
 global_asm!("", options(FOO));
-//~^ ERROR expected one of `)`, `att_syntax`, or `raw`, found `FOO`
-global_asm!("", options(FOO,));
-//~^ ERROR expected one of `)`, `att_syntax`, or `raw`, found `FOO`
+//~^ ERROR expected one of
 global_asm!("", options(nomem FOO));
-//~^ ERROR expected one of `)` or `,`, found `FOO`
+//~^ ERROR expected one of
 global_asm!("", options(nomem, FOO));
-//~^ ERROR expected one of `)`, `att_syntax`, or `raw`, found `FOO`
+//~^ ERROR expected one of
 global_asm!("{}", options(), const FOO);
 global_asm!("", clobber_abi(FOO));
 //~^ ERROR expected string literal
`@@` -129,8 +111,6 `@@`
 //~^ ERROR `clobber_abi` cannot be used with `global_asm!`
 global_asm!("{}", options(), clobber_abi("C"), const FOO);
 //~^ ERROR `clobber_abi` cannot be used with `global_asm!`
-global_asm!("", clobber_abi("C"), clobber_abi("C"));
-//~^ ERROR `clobber_abi` cannot be used with `global_asm!`
 global_asm!("{a}", a = const FOO, a = const BAR);
 //~^ ERROR duplicate argument named `a`
 //~^^ ERROR argument never used
`@@` -142,16 +122,3 `@@`
 //~^ ERROR asm template must be a string literal
 global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR);
 //~^ ERROR asm template must be a string literal
-
-global_asm!("{}", in(reg));
-//~^ ERROR the `in` operand cannot be used with `global_asm!`
-global_asm!("{}", out(reg));
-//~^ ERROR the `out` operand cannot be used with `global_asm!`
-global_asm!("{}", lateout(reg));
-//~^ ERROR the `lateout` operand cannot be used with `global_asm!`
-global_asm!("{}", inout(reg));
-//~^ ERROR the `inout` operand cannot be used with `global_asm!`
-global_asm!("{}", inlateout(reg));
-//~^ ERROR the `inlateout` operand cannot be used with `global_asm!`
-global_asm!("{}", label(reg));
-//~^ ERROR the `label` operand cannot be used with `global_asm!`
```
@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. rollup A PR which is a rollup labels May 19, 2025
@Zalathar
Copy link
Contributor Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented May 19, 2025

📌 Commit 315874c has been approved by Zalathar

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

bors commented May 19, 2025

⌛ Testing commit 315874c with merge e5a2a6a...

@bors
Copy link
Collaborator

bors commented May 19, 2025

☀️ Test successful - checks-actions
Approved by: Zalathar
Pushing e5a2a6a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 19, 2025
@bors bors merged commit e5a2a6a into rust-lang:master May 19, 2025
7 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 19, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#140847 coverage: Detect unused local file IDs to avoid an LLVM ass… 0bb7e5c253cf451fa490efabf93e956ad7400e82 (link)
#141117 opt-dist: fix deprecated BOLT -icf=1 option 6e93d2ba103447a8370c966c1867d3ef76957d9b (link)
#141225 more ice tests b3fd5cc1cfc9f23ab6fbd5cb035592a6d27b4d4d (link)
#141239 dladdr cannot leave dli_fname to be null 04434289c3dceb39f594ea89120189667aee4105 (link)
#141242 in tests/ui/asm/aarch64/parse-error.rs, only test cases s… 4345f9fa9cf7c61f10a6e50e4584c1a92a4b606e (link)

previous master: 7068c8bd81

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

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 7068c8b (parent) -> e5a2a6a (this PR)

Test differences

Show 81 test diffs

Stage 1

  • [coverage-map] tests/coverage/unused-local-file.rs: [missing] -> pass (J1)
  • [coverage-run] tests/coverage/unused-local-file.rs: [missing] -> ignore (ignored when the profiler runtime is not available) (J1)
  • [crashes] tests/crashes/139905.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140011.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140099.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140100.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140123-2.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140123-3.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140123-4.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140123.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140255.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140275.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140281.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140303.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140333.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140365.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140381.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140429.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140479.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140484.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140500.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140530.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140531.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140571.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140577.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140609.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140642.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140683.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140729.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140823.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140850.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140860.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140884.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140891.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140974.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/140975.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/141124.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/141143.rs: [missing] -> pass (J1)

Stage 2

  • [coverage-map] tests/coverage/unused-local-file.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/139905.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140011.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140099.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140100.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140123-2.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140123-3.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140123-4.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140123.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140255.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140275.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140281.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140303.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140333.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140365.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140381.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140429.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140479.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140484.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140500.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140530.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140531.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140571.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140577.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140609.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140642.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140683.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140729.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140823.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140850.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140860.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140891.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140974.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/140975.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/141124.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/141143.rs: [missing] -> pass (J0)
  • [coverage-run] tests/coverage/unused-local-file.rs: [missing] -> ignore (ignored when cross-compiling) (J2)
  • [crashes] tests/crashes/140884.rs: [missing] -> pass (J3)
  • [crashes] tests/crashes/140884.rs: [missing] -> ignore (ignored if rustc wasn't built with debug assertions) (J4)
  • [coverage-run] tests/coverage/unused-local-file.rs: [missing] -> ignore (ignored when the profiler runtime is not available) (J5)
  • [coverage-run] tests/coverage/unused-local-file.rs: [missing] -> pass (J6)

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

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard e5a2a6a15d05a4d4aad43f399dbe4242e0b2226d --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. dist-apple-various: 6818.3s -> 8779.0s (28.8%)
  2. dist-x86_64-apple: 8904.6s -> 11081.9s (24.5%)
  3. x86_64-apple-1: 9070.2s -> 10782.7s (18.9%)
  4. dist-aarch64-apple: 5623.5s -> 6609.0s (17.5%)
  5. aarch64-apple: 4384.6s -> 4970.1s (13.4%)
  6. x86_64-apple-2: 4641.7s -> 5080.5s (9.5%)
  7. dist-loongarch64-musl: 5688.7s -> 5196.8s (-8.6%)
  8. dist-various-1: 4842.1s -> 4542.0s (-6.2%)
  9. dist-ohos-x86_64: 4742.0s -> 4468.6s (-5.8%)
  10. i686-gnu-nopt-2: 6602.0s -> 6924.3s (4.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

Finished benchmarking commit (e5a2a6a): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -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
Regressions ❌
(secondary)
0.5% [0.5%, 0.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary 2.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)
- - 0
Regressions ❌
(secondary)
4.6% [0.7%, 7.4%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.4%] 3
All ❌✅ (primary) - - 0

Cycles

Results (secondary -0.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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.9% [-1.3%, -0.5%] 8
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 774.989s -> 774.641s (-0.04%)
Artifact size: 365.51 MiB -> 365.52 MiB (0.00%)

@Zalathar Zalathar deleted the rollup-x5xt80l branch May 19, 2025 23:36
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. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants