Rollup of 10 pull requests - #162920
Rollup of 10 pull requests#162920
Conversation
LLVM 24 has moved from TargetOptions::ThreadModel to specifying thread-model as a module flag. This catches us up.
This copy will retain and is specialized for blocking operations.
Incr comp only uses the non-blocking variant.
This lock registry allows emulating fd based locks (like flock()) on top of the fcntl(F_SETLK) process based locks, thereby ensuring that concurrent rustc instances inside the same process don't break the incr comp locking scheme.
Borrow checking produces some weird, spanless help messages about fixing lifetime errors. If there are multiple, they are grouped under a header like this: ``` help: the following changes may resolve your lifetime errors ``` There are three forms of these. One of the forms is this: ``` = help: add bound `'a: 'b` ``` This form is redundant, because there is always an earlier help note (on a proper error message with a span) like this: ``` = help: consider adding the following bound: `'b: 'a` ``` This commit removes these redundant messages.
…ostic It's currently a spanless top-level help diagnostic. This commit changes it to an error (with one or more help subdiagnostics), gives it a span, and changes the wording. Note that giving it a span means that deduplication will no longer erroneously hide diagnostics with identical wording from different functions! Because of this, several "duplicate diagnostic" mentions are removed from the expected outputs. It's still a weird diagnostic (and now counts towards the error count) but it's better than before. This also removes the one use of buffered non-error diagnostics. So `BufferedDiag` is also removed.
And remove `struct_help`, to discourage use of `Level::Help`. (`Sublevel::Help` is fine.)
If `fmaf16` is exported, the existing version hits errors like:
error: `compiler_builtins` cannot call functions through upstream monomorphizations; encountered invalid call from `core::fmt::num::<impl core::fmt::Debug for u64>::fmt` to `core::fmt::num::imp::<impl core::fmt::Display for u64>::fmt`
--> library/core/src/fmt/num.rs:85:17
|
79 | / macro_rules! impl_Debug {
80 | | ($($T:ident)*) => {
81 | | $(
82 | | #[stable(feature = "rust1", since = "1.0.0")]
... |
85 | | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
... |
96 | | };
97 | | }
| |_- in this expansion of `impl_Debug!`
...
595 | / impl_Debug! {
596 | | i8 i16 i32 i64 i128 isize
597 | | u8 u16 u32 u64 u128 usize
598 | | }
| |_- in this macro invocation
Presumably this comes from the call to `panicking::assert_failed!` that
needs to be monomorphized. Avoid any formatting by using a plain
`debug_assert!` if we are building the crate as compiler-builtins.
LLVM doesn't currently emit this but probably should, and this is valuable as a fallback in any case.
…etrees fix `is_single_fp_element` for `s390x` and `x86` In rust-lang#161950 (comment) we discovered that the old `is_single_fp_element` is incorrect in a number of ways. - it did not consider `f16` or `f128` - it did not consider transparent wrappers - on x86, it incorrectly accepted over-aligned types - on s390x, it incorrectly accepted single-element unions and arrays So, in practice each target does something slightly different here, and I've split the function into two. cc @beetrees
…or, r=bjorn3 Replace hard linked `metadata.rmeta` with a copy when finalizing the incremental compilation session dir fails Fixes rust-lang#151181. Since 1.90.0, on ReFS (Windows Dev Drive) volumes finalizing the incremental compilation session directory would fail with `Access is denied. (os error 5)`. The issue was caused by rust-lang#114669, which meant that `metadata.rmeta` inside the session dir was a hard link to a file that was potentially being used by several other processes and ReFS seemingly refuses to rename such directories. As a fallback, we try to replace the hard linked metadata file with a copy instead, so that the rename can succeed. I don't think adding a test for this is possible due to the lack of a ReFS runner but I added a unit test for the `replace_hard_link_with_copy` helper. r? @bjorn3
…beetrees RISC-V: Add Zmmul target feature Zmmul is a ratified subset of the M extension that only supports multiplication, but not division ([spec](https://docs.riscv.org/reference/isa/v20260120/unpriv/m-st-ext.html#11-1-3-zmmul-extension-version-1-0)). LLVM already supports the extension under the same name, so until rust-lang#162235 I'd just been using it directly. There are two things I would particularly appreciate input on: - Should M imply Zmmul? - From the [Machine-Level ISA spec](https://docs.riscv.org/reference/isa/v20260120/priv/machine.html) and [this discussion](riscv/riscv-isa-manual#869) in the RISC-V ISA Manual repo, it seems that Zmmul means all multiplication instructions are always supported, whereas M means they're only supported if the M bit is set in the `misa` register. - On the other hand, LLVM has M imply Zmmul ([RISCVFeatures.td](https://github.com/llvm/llvm-project/blob/f6f71edb4346d586bb97485116175efd9a696ee8/llvm/lib/Target/RISCV/RISCVFeatures.td#L214-L229)), so it feels nice to match that. - How might I go about stabilizing this? - Can it be done right away? - Should it wait a few releases? - Is it better to batch it with the stabilization of other RISC-V target features, similarly to how it was done in rust-lang#145948? No LLMs were used in the making of this PR, and all mistakes are those of a first-time rustc contributor.
…-obk Ensure concurrent rustc instances in the same process correctly lock the session dir This introduces a global lock registry for the `fcntl` lock fallback to allow emulating fd based locks (like `flock()`) on top of the `fcntl(F_SETLK)` process based locks, thereby ensuring that concurrent rustc instances inside the same process don't break the incr comp locking scheme. Based on rust-lang#162584
Remove one remaining use of `Level::Help` Unfortunately we can't yet get rid of `Level::Help` entirely because of `proc_macro::Help`. Details in individual commits. r? @estebank
Rollup of 10 pull requests try-job: dist-various-1 try-job: test-various try-job: test-x86_64-gnu-aux try-job: test-x86_64-gnu-llvm-21-3 try-job: test-x86_64-msvc-1 try-job: test-aarch64-apple-1 try-job: test-aarch64-apple-2 try-job: test-x86_64-mingw-1 try-job: test-i686-msvc try-job: test-armhf-gnu
This comment has been minimized.
This comment has been minimized.
|
@bors p=1 |
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 ed30c2c (parent) -> 50d5409 (this PR) Test differencesShow 37 test diffsStage 0
Stage 1
Stage 2
Additionally, 2 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 50d54098ec9e61b3e2e72daa6368fd98e7f91e83 --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 |
|
📌 Perf builds for each rolled up PR:
parent commit: ed30c2ce5e In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
|
Finished benchmarking commit (50d5409): comparison URL. Overall result: ✅ improvements - no action needed@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 perf run didn't have relevant results for this metric. CyclesResults (primary 2.3%, secondary -6.0%)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: 497.461s -> 498.048s (0.12%) |
Successful merges:
is_single_fp_elementfors390xandx86#161987 (fixis_single_fp_elementfors390xandx86)metadata.rmetawith a copy when finalizing the incremental compilation session dir fails #162366 (Replace hard linkedmetadata.rmetawith a copy when finalizing the incremental compilation session dir fails)Level::Help#162885 (Remove one remaining use ofLevel::Help)fmaf16now that we have an implementation #162606 (c-b: Exportfmaf16now that we have an implementation)cfi_encodingattribute. #162899 (Error on invalid placements of thecfi_encodingattribute.)r? @ghost
Create a similar rollup