Repository navigation
Rollup of 15 pull requests - #165493
Rollup of 15 pull requests#165493
Conversation
Windows has a similar flag `/forceInterlockedFunctions`, which uses names such as `_InterlockedAdd64_rel`. This is a re-land of 1ed1b6e ("Enable `outline-atomics` by default on AArch64 Windows platforms").
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. This is a re-land of c455903 ("Enable `outline-atomics` by default on AArch64 Android"). [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. This is a re-land of 21525f8 ("Enable `outline-atomics` by default on AArch64 Fuchsia"). [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.
This is a re-land of 66c150c ("Enable `outline-atomics` by default
on AArch64 OpenBSD").
[1]: llvm/llvm-project@5d774ec
Many aarch64 targets without LSE in the baseline enable the `outline-atomics` feature, which uses runtime detection of LSE for its faster atomic ops. This provides nontrivial performance improvements on most hardware from the past decade, at a small cost to anything pre-LSE. This matches what Clang does [1]. This is a re-land of 383053e ("Enable `outline-atomics` by default on AArch64 FreeBSD"). [1]: llvm/llvm-project@e24f901
```
note: method defined here, with 0 generic parameters
--> $DIR/ufcs-qpath-missing-params.rs:4:8
|
LL | pub trait IntoCow<'a, B: ?Sized> where B: ToOwned {
LL | fn into_cow(self) -> Cow<'a, B>;
| ^^^^^^^^
```
Since L4Re currently has no openat support, the dir module used in the metadata function is not available to use.
…te-mir * add next-solver regression test for recursive opaque ices under validate-mir * move compile-flags to the top of the test and note that it used to ice
* add next-solver regression tests for two fixed ices * move compile-flags to the top of the tests and note that they used to ice
…=ShoyuVanilla Fancy paramenv accessors that communicate the access pattern better. r? @lcnr or @rust-lang/initiative-trait-system-refactor This is a single commit, to precede the future change of "compressed trait clauses". It adds a lot of the infrastructure, without making any real changes that may affect performance. As such it forms a separately reviewable step. Even though this isn't on its own such a useful change, it mostly refactors things, it does still make for a nicer API surface. Importantly, with compressed trait clauses (i.e. encoding some common traits as `where self_ty : <bitset of common traits>`), it becomes very important to be careful with how we iterate over caller bounds. I've tried other methods, but the typestate API (as proposed in this PR) is the only one I've found that's both ergonomic, and still allows for implementing compressed trait clauses performantly. > [!NOTE] > I've not used an LLM for any part of this PR, or any other PR I make. This includes any related work like research.
…res, r=davidtwco turn ABI-controlling target features into a target modifier This makes it so that we can mark "internal" target features (which we track as target features in the compiler but do not expose as such to the user) as target modifiers, to be *really* sure that they are set consistently across all targets. For instance, if there was a value for `-Ctarget-cpu` that affected ABI-relevant target features, we'd catch mismatches in the value of that target feature. For now, this just complements the ABI check logic in `abi_required_features`, but I think long-term it might even be able to fully replace that logic. This would, for example, let us check consistency of the SPARC ABI (rust-lang#160562) without introducing a new variant for `RustcAbi`. OTOH having the ABI represented explicitly is often useful elsewhere in the compiler (e.g. for inline asm) so we may also want to keep both `abi_required_features` and this new concept of "target features that must be consistent across all crates". We could also eventually turn the target modifier into a safety net: if `abi_required_features` violations are a hard error and `-Ctarget-feature` is locked down to reject non-Rust target features, it should be impossible to ever violate the new target modifier check. Cc @Darksonn @workingjubilee
offload: pass the linked device image to the host pass Closes rust-lang#164057 Follow-up to: rust-lang#164455 The host pass now takes the linked device output (`<crate>.ptx` for NVPTX, `<crate>.elf` for AMDGPU) instead of the device bitcode. The device crate must now be built as a cdylib. rustc only passes --export-symbol to llvm-bitcode-linker for cdylibs, so a bin would lose its kernels to internalization. I had to add [lib] in Cargo.toml ```toml [lib] name = "sample_offload" path = "src/main.rs" crate-type = ["cdylib"] ``` Without it, the runtime fails at startup ``` PluginInterface error: Failure to init kernel: "requested object was not found in the binary image" error in cuModuleGetFunction('_RNvC14sample_offload6kernel'): named symbol not found omptarget error: Failed to load kernel _RNvC14sample_offload6kernel ``` I’m not sure whether bin device crates should export their kernels too, so I left the linker untouched for now. The second commit fixes another runtime error without `--emit=llvm-bc`/`llvm-ir`. (my understanding is that we should not have to set these after this PR, because no device.bc anymore) The “already wrapped” check in handle_offload relied on a value name, which LLVM drops unless --emit=llvm-bc/llvm-ir is given, so the kernel got wrapped twice. I verified on UofT nvidia gpunode (amdgpunodes was not available for my account). r? ZuseZ4
…umeGomez,antoyo,bjorn3 Remove return type from `BuilderMethods::store` The return type is an artefact of how LLVM's API works and is unused, so this PR removes it. r? @antoyo
…gjubilee Re-enable outline-atomics by default on more AArch64 platforms These originally landed in rust-lang#144938 and rust-lang#149633, then were reverted in rust-lang#151896 due to rust-lang#151486. As that issue has been resolved, re-enable them here. There is a lot of additional context at the original PR (rust-lang#144938) and the Zulip discussion leading up to it [#t-compiler > outline-atomics on non-Linux targets](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/outline-atomics.20on.20non-Linux.20targets/with/537964562).
|
@bors r+ p=5 force |
This comment has been minimized.
This comment has been minimized.
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 70424d8 (parent) -> 712e1d3 (this PR) Test differencesShow 617 test diffsStage 1
Stage 2
Additionally, 582 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 712e1d350f1de77c931b354a24beeb0bb0fce559 --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 (712e1d3): comparison URL. Overall result: ❌ regressions - please read:Our 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)Results (primary -3.0%, secondary -5.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 482.473s -> 499.109s (3.45%) |
|
📌 Perf builds for each rolled up PR:
parent commit: 70424d844b In the case of a perf regression, run the following command with the SHAs of each PR you suspect might be the cause: |
|
@rust-timer triage all |
Running triage with 3 benchmarksTriage only executes the benchmarks on rollup members, that were changed significantly on the rollup.
#163477 68cd6ad Fancy paramenv accessors that communicate the access pattern better.Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This perf run didn't have 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 perf run didn't have relevant results for this metric. #160593 48f7235 turn ABI-controlling target features into a target modifierThis perf run didn't have relevant results for the `instruction count` metric.Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)This perf run didn't have relevant results for this metric. CyclesThis perf run didn't have relevant results for this metric. Binary sizeThis perf run didn't have relevant results for this metric. #164896 fac1e9e offload: pass the linked device image to the host passThis perf run didn't have relevant results for the `instruction count` metric.Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)This perf run didn't have relevant results for this metric. CyclesResults (primary 2.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. #165468 1315239 Remove return type from
|
Successful merges:
BuilderMethods::store#165468 (Remove return type fromBuilderMethods::store)vec::from_elem#164653 (Deprecate internal functionvec::from_elem)-Zcrate-attredition and position #165429 (Add tests for-Zcrate-attredition and position)panicon teeos #165466 (Don't "exit" usingpanicon teeos)r? @ghost
Create a similar rollup