Repository navigation
Rollup of 11 pull requests - #163970
Rollup of 11 pull requests#163970
Conversation
This prevents nonsensical combinations like unsized+on_stack and forces all users to explicitly handle the difference between sized and unsized arguments. In a couple of places unsized arguments were handled incorrectly if they would ever manage to reach that code.
This will make it easier to move them in a subsequent commit, since `UnrollAttr` implements `PartialEq`. If, in the future, we add more kinds of loop hints, this can become a small enum wrapping only those attr types.
We should not disable the pattern in MatchBranchSimplification. The two forms exhaustive match and cast are equivalent, but the cast is better represented in MIR: no branches, only one statement. AFAIK, LLVM does not handle multiple disjoint intervals well. As an workaround, the patch emits `assume(ctpop(val) == 1)` to tell LLVM that the discriminant is a power of two.
Only the `Goto` variant uses `loop_hint_attrs`, so other variants shouldn't pay the cost. This shrinks `Terminator` and thus `BasicBlockData` by 8 bytes, and also simplifies many users of `Terminator`. Every byte saved from `BasicBlockData` makes a big difference in max-rss. For aws-sdk-ec2 full check, this saves 34.1 MiB (~0.62% of its peak RSS) Add a `TerminatorKind::goto` helper function for convenient construction with a target and no hints. With that helper available, most of this commit is simple, straightforward, mechanical translations of construction or pattern matching. The only notable changes are: - `compiler/rustc_codegen_ssa/src/mir/block.rs` actually uses the moved hints. - `compiler/rustc_middle/src/mir/mod.rs` updates the size assertions. - `compiler/rustc_mir_build/src/builder/cfg.rs` adds/updates helpers. - `compiler/rustc_mir_build/src/builder/expr/into.rs` has the one place that creates a `Goto` with non-empty hints.
… r=saethlin codegen: tell LLVM that the discriminant is a power of two Fixes rust-lang#162513. We should not disable the pattern in MatchBranchSimplification. The two forms exhaustive match and cast are equivalent, but the cast is better represented in MIR: no branches, only one statement. AFAIK, LLVM does not handle multiple disjoint intervals well. As an workaround, the patch emits `assume(ctpop(val) == 1)` to tell LLVM that the discriminant is a power of two. LLM disclosure: search the codebase and fix grammer.
… r=beetrees Split PassMode::IndirectUnsized out of PassMode::Indirect This prevents nonsensical combinations like unsized+on_stack and forces all users to explicitly handle the difference between sized and unsized arguments. In a couple of places unsized arguments were handled incorrectly if they would ever manage to reach that code.
…n-goto, r=saethlin Move `loop_hint_attrs` from `Terminator` into `TerminatorKind::Goto` Only the `Goto` variant uses `loop_hint_attrs`, so other variants shouldn't pay the cost. This shrinks `Terminator` and thus `BasicBlockData` by 8 bytes, and also simplifies many users of `Terminator`. Every byte saved from `BasicBlockData` makes a big difference in max-rss. For aws-sdk-ec2 full check, this saves 34.1 MiB (~0.62% of its peak RSS) Add a `TerminatorKind::goto` helper function for convenient construction with a target and no hints. With that helper available, most of this commit is simple, straightforward, mechanical translations of construction or pattern matching. The only notable changes are: - `compiler/rustc_codegen_ssa/src/mir/block.rs` actually uses the moved hints. - `compiler/rustc_middle/src/mir/mod.rs` updates the size assertions. - `compiler/rustc_mir_build/src/builder/cfg.rs` adds/updates helpers. - `compiler/rustc_mir_build/src/builder/expr/into.rs` has the one place that creates a `Goto` with non-empty hints. --- I have several more potential improvements to basic block sizes, but this one was an easy starting point.
…useZ4 autodiff: fix sysroot candidates in libEnzyme not found error fix: rust-lang#160335 (comment) Before ```shell RUSTFLAGS="-Zautodiff=Enable" cargo +enzyme run info: `cargo` is unavailable for the active toolchain info: falling back to "/home/gh-sgasho/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo" error: failed to run `rustc` to learn about target-specific information Caused by: process didn't exit successfully: `/home/gh-sgasho/.rustup/toolchains/enzyme/bin/rustc - --crate-name ___ --print=file-names -Zautodiff=Enable --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=split-debuginfo --print=crate-name --print=cfg -Wwarnings` (exit status: 1) --- stderr error: autodiff backend not found in the sysroot: failed to find a `libEnzyme-23` folder in the sysroot candidates: * /home/gh-sgasho/rust-worktrees/enzyme-wrapper-cleanup/build/x86_64-unknown-linux-gnu/stage1/lib | = note: it will be distributed via rustup in the future ``` After: points out the right candidate dir ```shell RUSTFLAGS="-Zautodiff=Enable" cargo +enzyme run --release info: `cargo` is unavailable for the active toolchain info: falling back to "/home/gh-sgasho/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo" error: failed to run `rustc` to learn about target-specific information Caused by: process didn't exit successfully: `/home/gh-sgasho/.rustup/toolchains/enzyme/bin/rustc - --crate-name ___ --print=file-names -Zautodiff=Enable --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=split-debuginfo --print=crate-name --print=cfg -Wwarnings` (exit status: 1) --- stderr error: autodiff backend not found in the sysroot: failed to find a `libEnzyme-23.so` in the sysroot candidates: * /home/gh-sgasho/rust-worktrees/enzyme-wrapper-cleanup/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib | = note: it will be distributed via rustup in the future ``` I also verified that sample autodiff code ran successfully using local build, without breaking anything. r? @ZuseZ4
…r=BoxyUwU,bit-aloo abby DSL: sanity checks on forall where clauses fixes rust-lang/project-assumptions-on-binders#43 took the opportunity to clean up a bit too, so the diff is a bit bigger than it strictly needs to be this PR enforces that the LHS of forall where clauses must be a placeholder (or toplevel param), an alias, or a lifetime also, after review, this PR now enforces that all implied bounds in where clauses are also explicitly present as well, enforcing that there's no sneaky bounds going on r? @BoxyUwU
…Urgau [rustdoc] Fix more `incoherent_impl` linking Hopefully last fix for rust-lang#162808. We force the correct crate to be linked when generating the external location based on the `DefId` crate. I'm actually surprised it wasn't an issue before. Oh well. r? @Urgau
Use BasicBlock::start_location and Location::START Construct special MIR locations concisely.
…wesleywiser relax_elf_relocations is x86-only The flag ends up here https://github.com/rust-lang/rust/blob/8d1a76430406c877b35d0b627e7f796dcf0dfeca/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp#L393 The LLVM name for this, `X86RelaxRelocations`, makes me believe that this is x86-only. So let's at least document that on our side as well. Cc @bjorn3 @nikic
Remove needs-triage label from relnotes issues Context: [#t-release > &rust-lang#96;relnotes-needs-review&rust-lang#96; tag?](https://rust-lang.zulipchat.com/#narrow/channel/241545-t-release/topic/.60relnotes-needs-review.60.20tag.3F/with/627107555) r? jieyouxu
This comment has been minimized.
This comment has been minimized.
Rollup of 11 pull requests try-job: dist-various-1 try-job: test-various try-job: test-x86_64-gnu-aux 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 try-job: test-x86_64-gnu-llvm-22-3
This comment has been minimized.
This comment has been minimized.
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
💔 Test for 4ca31b8 failed: CI. Failed job:
|
|
The job Click to see the possible cause of the failure (guessed by this bot) |
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 42cfc04 (parent) -> fc2324d (this PR) Test differencesShow 85 test diffsStage 1
Stage 2
Additionally, 78 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 fc2324d0546aa6782c45b76247266a0c37db0b8a --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 (fc2324d): comparison URL. Overall result: ❌ regressions - 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)Results (primary 0.3%, secondary -2.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 2.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (secondary -0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 489.959s -> 484.956s (-1.02%) |
|
📌 Perf builds for each rolled up PR:
parent commit: 42cfc04dea In the case of a perf regression, run the following command with the SHAs of each PR you suspect might be the cause: |
Successful merges:
loop_hint_attrsfromTerminatorintoTerminatorKind::Goto#163931 (Moveloop_hint_attrsfromTerminatorintoTerminatorKind::Goto)incoherent_impllinking #163841 ([rustdoc] Fix moreincoherent_impllinking)r? @ghost
Create a similar rollup