Rollup of 10 pull requests#158419
Conversation
fentry is essentially a simpler version of mcount where the counting function is called before any other function prologue actions happen. fentry is still used by the linux x86-64 kernel. It's unclear if or when patchable-function-entry will replace it. It is also used by clang for some x86-64 mingw toolchains. This is only supported on some x86, x86-64, and s390x targets.
Signed-off-by: HNO3Miracle <xiangao.or@isrc.iscas.ac.cn>
…lign-157750, r=cuviper Update LLVM for Mach-O __LINKEDIT alignment fix. Update LLVM submodule to pull in changes from rust-lang/llvm-project#198. Fixes rust-lang#157750. This backport has been discussed in: [#t-compiler > Backport LLVM change to Rust for macOS 27 support?](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Backport.20LLVM.20change.20to.20Rust.20for.20macOS.2027.20support.3F/with/605925959).
…avidtwco,RalfJung cmse: clear padding when crossing the secure boundary tracking issue: rust-lang#81391 tracking issue: rust-lang#75835 RFC: rust-lang/rfcs#3884 related: rust-lang#147697 quick context: cmse creates a distinction between code running in secure mode and non-secure mode (think kernel space versus user space). Secure mode has access to data (e.g. encryption keys) that must not leak to non-secure mode. They use a special calling convention that clears unused registers, but padding in arguments/return values can contain stale secure data. This PR clears the padding bytes (and similar, e.g. space not used in any variant of a union/enum) when values are passed over the secure boundary. Separately we'll have a lint to warn on enums and unions being passed across the boundary: for them we can't statically know whether the variant that is passed contains padding. This is conceptually modeled after a similar feature in `clang` ([implementation](https://github.com/llvm/llvm-project/blob/065a39b9f7f06fca0926394096ee1c1fac41d446/clang/lib/CodeGen/CGCall.cpp#L4041-L4087)). cc @Jules-Bertholet r? @davidtwco
Add -Zinstrument-mcount=fentry to -Zinstrument-mcount fentry is essentially a simpler version of mcount where the counting function is called before any other function prologue actions happen. fentry is still used by the linux x86-64 kernel. It's unclear if or when patchable-function-entry will replace it. It is also used by clang for some x86-64 mingw toolchains. This is only supported on some x86, x86-64, and s390x targets.
…ase, r=petrochenkov fix(tests): allow either branch direction in ilog_known_base Fixes rust-lang#158339. `tests/codegen-llvm/ilog_known_base.rs` checks that `checked_ilog` with a known power-of-two base is lowered through the faster `llvm.ctlz` path. On `riscv64gc-unknown-linux-gnu`, LLVM emits the zero check with the opposite branch direction (`icmp eq i32 %val, 0`) from what the test currently expects (`icmp ne i32 %val, 0`). Both forms still guard the same `llvm.ctlz` fast path, so this relaxes the FileCheck pattern to accept either comparison direction. This also fixes the `checked_ilog16` FileCheck variable to use the `DIV4` result it just matched. Tested: ```sh ./x test --stage 2 tests/codegen-llvm/ilog_known_base.rs ```
LLVM 23: Adapt codegen test to moved assume I wasn't completely sure what the important part of this test is - based on the "Make sure we don't create `br` or `select` instructions" comment I assume it's that the `load` is followed ~immediately by the `ret`, and that the presence or absence of the `assume` doesn't really matter (it's been moved up a few lines to before the `load`): ```ll ; Function Attrs define noundef i32 @foo(ptr noalias nofree noundef align 8 captures(none) dereferenceable(16) %x) unnamed_addr #0 { start %_6 = load ptr, ptr %x, align 8, !nonnull !4, !noundef !4 %0 = getelementptr inbounds nuw i8, ptr %x, i64 8 %_7 = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 %_8 = icmp ne ptr %_6, %_7 tail call void @llvm.assume(i1 %_8) %_14 = getelementptr inbounds nuw i8, ptr %_6, i64 4 store ptr %_14, ptr %x, align 8 %_4 = load i32, ptr %_6, align 4, !noundef !4 ret i32 %_4 } ``` @rustbot label llvm-main [original CI failure](https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/46608/list?sid=019ed950-c81f-466d-a3bc-2064e6a26719&tab=output)
… r=mejrs Move part of the target checking for `#[may_dangle]` to the parser Work towards removing the ALL_TARGETS list. Only one remaining after this! r? @mejrs
…henkov Fix invalid E0609 raw pointer deref suggestion inside macros Fixes rust-lang#158158 `suggest_first_deref_field` blindly applied span math (`shrink_to_lo()`, `between()`) to generate a dereference suggestion for E0609. When the base expression and field access originate from different macro expansions, the `SyntaxContext` mismatch caused the span combinations to fail. This resulted in the compiler falling back to incorrect source locations and generating malformed replacement strings like `&mut (*).`. * Added a `span.from_expansion()` guard at the top of `suggest_first_deref_field` to check both `base.span` and `field.span`. * Suppressed the multipart suggestion entirely when inside macro expansions to prevent emitting broken syntax, bypassing complex and unreliable cross-macro span traversals. * Added a new UI test to ensure the standard E0609 error is emitted cleanly without the garbled `help:` label.
…enerics-2, r=petrochenkov delegation: add tests for defaults and infers in generics This PR adds tests for interaction of default generic params and infers in delegation. Moreover, it groups delegation's pretty tests into a single folder and adds one test for generics. Comments in tests explain the behavior. Part of rust-lang#118212. r? @petrochenkov
…trochenkov Generate synthetic generic args only for delegation's child segment Fixes rust-lang#158152 by generating synthetic generic args only for delegation's child segment. r? @petrochenkov cc @fmease
|
@bors r+ rollup=never p=5 |
This comment has been minimized.
This comment has been minimized.
|
This run seems to be going well and contains everything remaining that can be rolled up. I'll be keeping an eye on the queue for a bit to ensure that remains the case. @bors treeclosed- |
|
Tree is now open for merging. |
|
📌 Perf builds for each rolled up PR:
previous master: bd08c9e718 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 bd08c9e (parent) -> 40557f6 (this PR) Test differencesShow 84 test diffsStage 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 40557f6225e337d68c8d4f086557ce54135f5dd9 --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 (40557f6): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (secondary -2.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 0.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. Bootstrap: 484.801s -> 482.935s (-0.38%) |
Successful merges:
#[may_dangle]to the parser #158261 (Move part of the target checking for#[may_dangle]to the parser)r? @ghost
Create a similar rollup