-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Rollup of 5 pull requests #149818
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 5 pull requests #149818
Conversation
Build outline atomic symbols on all targets that have `outline-atomics` enabled, rather than only on Linux. Since this is no longer OS-specific, also rename the module.
Change the gating and link sections to enable this for any platforms that enable `outline-atomics`, rather than only Linux. Additionally, no longer run this if LSE is available, since in this case the outline versions will never be called.
Windows has a similar flag `/forceInterlockedFunctions`, which uses names such as `_InterlockedAdd64_rel`.
Per LLVM commit c5e7e64 ("[AArch64][Clang][Linux] Enable out-of-line atomics by default.") [1], Clang enables these on Android. Thus, do the same in Rust. [1]: llvm/llvm-project@c5e7e649d537067de
Clang has done this by default since LLVM commit 1a963d3 ("[Driver] Make -moutline-atomics default for aarch64-fuchsia targets"), [1], so do the same here. [1]: llvm/llvm-project@1a963d3
Clang has recently started doing this, as of LLVM commit 5d774ec8d183
("[Driver] Enable outline atomics for OpenBSD/aarch64") [1]. Thus, do
the same here.
[1]: llvm/llvm-project@5d774ec
```
error: expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found macro `concat`
--> $DIR/macro-in-attribute.rs:4:21
|
LL | #[deprecated(note = concat!("a", "b"))]
| ^^^^^^^^^^^^^^^^^ macros are not allowed here
```
…avidtwco Enable `outline-atomics` by default on more AArch64 platforms The baseline Armv8.0 ISA doesn't have atomics instructions, but in practice most hardware is at least Armv8.1-A (2014), which includes single-instruction atomics as part of the LSE feature. As a performance optimization for these cases, GCC and LLVM have the `-moutline-atomics` flag to turn atomic operations into calls to symbols like `__aarch64_cas1_acq`. These can do runtime feature detection and use the LSE instructions if available, falling back to more portable load-exclusive/store-exclusive loops. Since the recent 3b50253 ("compiler-builtins: plumb LSE support for aarch64 on linux") our builtins support this LSE optimization, and since 6936bb9 ("Dynamically enable LSE for aarch64 rust provided intrinsics"), std will set the flag as part of its startup code. The first commit in this PR configures this to work on all platforms built with `outline-atomics`, not just Linux. Thus, enable `outline-atomics` by default on Android, OpenBSD, Windows, and Fuchsia platforms that don't have LSE in the baseline. The feature is already enabled on Linux. Platform-specific details are included in each commit message. The current implementation can still be accessed by setting `-Ctarget-feature=-outline-atomics`. Setting `-Ctarget-feature=+lse` or a relevant CPU will use the single-instruction atomics without the call overhead. https://rust.godbolt.org/z/dsdrzszoe Link: https://learn.arm.com/learning-paths/servers-and-cloud-computing/lse/intro/ Original Clang outline-atomics benchmarks: https://reviews.llvm.org/D91157#2435844 try-job: aarch64-msvc-* try-job: arm-android try-job: dist-android try-job: dist-aarch64-llvm-mingw try-job: dist-aarch64-msvc try-job: dist-various-* try-job: test-various
Handle macro invocation in attribute during parse
```
error: expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found macro `concat`
--> $DIR/macro-in-attribute.rs:4:21
|
LL | #[deprecated(note = concat!("a", "b"))]
| ^^^^^^^^^^^^^^^^^ macros are not allowed here
```
Fix rust-lang#146325.
unstable proc_macro tracked::* rename/restructure Picking up what should be the uncontroversial part of rust-lang#87173 (closed due to inactivity over two years ago). Part of rust-lang#99515. - move `proc_macro::tracked_env::var` to `proc_macro::tracked::env_var` - move `proc_macro::tracked_path::path` to `proc_macro::tracked::path` - change the argument of `proc_macro::tracked::path` from `AsRef<str>` to `AsRef<Path>`.
…e-code, r=davidtwco attempt to fix unreachable code regression For some reason it works, it checks function output type and suppress warning if type is uninhabited ~~This double negations in code breaks my mind actually~~ I'd love to revisit this part in future and try to find a proper solution maybe, but for now I feel like it's enough before release to fix the issue? I really wonder what team does think, especially `@cjgillot` and other people who are more confident in this part of compiler than I do I tried a lot of things here, it's only approach that pass all tests included new regression one fixes rust-lang#149571 r? compiler
…oieni Mirror `ubuntu:24.04` on ghcr The miri job wants to use it (https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Adding.20a.20C.2B.2B.20dependency.20to.20Miri.3F/with/560654845), and sooner or later we will likely migrate our CI to it too. r? `@marcoieni`
|
@bors r+ rollup=never p=5 |
Rollup of 5 pull requests Successful merges: - #144938 (Enable `outline-atomics` by default on more AArch64 platforms) - #146579 (Handle macro invocation in attribute during parse) - #149400 (unstable proc_macro tracked::* rename/restructure) - #149664 (attempt to fix unreachable code regression ) - #149806 (Mirror `ubuntu:24.04` on ghcr) Failed merges: - #149789 (Cleanup in the attribute parsers) r? `@ghost` `@rustbot` modify labels: rollup
|
💔 Test failed - checks-actions |
|
@bors retry |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
☀️ Test successful - checks-actions |
|
📌 Perf builds for each rolled up PR:
previous master: c61a3a44d1 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
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 c61a3a4 (parent) -> 5f1173b (this PR) Test differencesShow 32 test diffsStage 1
Stage 2
Additionally, 26 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 5f1173bb2b0a7012640bd5383c61b433b16a452d --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (5f1173b): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (primary -2.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 471.772s -> 471.137s (-0.13%) |
Successful merges:
outline-atomicsby default on more AArch64 platforms #144938 (Enableoutline-atomicsby default on more AArch64 platforms)ubuntu:24.04on ghcr #149806 (Mirrorubuntu:24.04on ghcr)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup