Rollup of 11 pull requests#151627
Closed
JonathanBrouwer wants to merge 33 commits intorust-lang:mainfrom
Closed
Conversation
… duration under Win7 Fixes rust-lang#149935. See the added comment for more details. Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
The links are correct, but text typoed `as_array_mut`.
This fixes stage1 builds when the proc-macro bridge api changed. The rustc_proc_macro crate is identical to the proc_macro that would end up in the sysroot of the rustc compiler rustc_proc_macro is linked into.
They break whenever the proc macro ABI changes due to it building a proc macro against the bootstrap sysroot.
It is a singleton which doesn't actually need to be passed through over the bridge.
And rename FreeFunctions struct to Methods.
Use explicit SSE2 intrinsics to avoid LLVM's broken AVX-512 auto-vectorization which generates ~31 kshiftrd instructions. Performance - AVX-512: 34-48x faster - SSE2: 1.5-2x faster Improves on earlier pr
…ulacrum Add codegen test for removing trailing zeroes from `NonZero` Closes rust-lang#138497
ptr_aligment_type: add more APIs As per rust-lang#102070 (comment) Tracking issue: rust-lang#102070 Mostly duplicating methods that previously worked with `usize`-represented alignments. Naming follows a convention of `align: usize`, `alignment: Alignment`.
std: avoid tearing `dbg!` prints Fixes rust-lang#136703. This is an alternative to rust-lang#149859. Instead of formatting everything into a string, this PR makes multi-expression `dbg!` expand into multiple nested matches, with the final match containing a single `eprint!`. By using macro recursion and relying on hygiene, this allows naming every bound value in that `eprint!`. CC @orlp r? libs
…, r=Mark-Simulacrum add CSE optimization tests for iterating over slice This PR is regression test for issue rust-lang#119573. This PR introduces a new regression test to verify a critical optimization known as Common Subexpression Elimination (CSE) is correctly applied during various slice iteration patterns.
…r=Mark-Simulacrum Fix(lib/win/thread): Ensure `Sleep`'s usage passes over the requested duration under Win7 Fixes rust-lang#149935. See the added comment for more details. This makes the concerned test now reproducibly pass, for us at least. Also, testing this separately revealed successful: see the issue. @rustbot label C-bug I-flaky-test O-windows-7 T-libs A-time A-thread
…rochenkov,Kobzol Various refactors to the proc_macro bridge This reduces the amount of types, traits and other abstractions that are involved with the bridge, which should make it easier to understand and modify. This should also help a bit with getting rid of the type marking hack, which is complicating the code a fair bit. Fixes: rust-lang#139810
…ark-Simulacrum relnotes: fix 1.93's `as_mut_array` methods The links are correct, but text typoed `as_array_mut`.
…erformance, r=folkertdev Improve is_ascii performance on x86_64 with explicit SSE2 intrinsics # Summary Improves `slice::is_ascii` performance for SSE2 target roughly 1.5-2x on larger inputs. AVX-512 keeps similiar performance characteristics. This is building on the work already merged in rust-lang#151259. In particular this PR improves the default SSE2 performance, I don't consider this a temporary fix anymore. Thanks to @folkertdev for pointing me to consider `as_chunk` again. # The implementation: - Uses 64-byte chunks with 4x 16-byte SSE2 loads OR'd together - Extracts the MSB mask with a single `pmovmskb` instruction - Falls back to usize-at-a-time SWAR for inputs < 64 bytes # Performance impact (vs before rust-lang#151259): - AVX-512: 34-48x faster - SSE2: 1.5-2x faster <details> <summary>Benchmark Results (click to expand)</summary> Benchmarked on AMD Ryzen 9 9950X (AVX-512 capable). Values show relative performance (1.00 = fastest). Tops out at 139GB/s for large inputs. ### early_non_ascii | Input Size | new_avx512 | new_sse2 | old_avx512 | old_sse2 | |------------|------------|----------|------------|----------| | 64 | 1.01 | **1.00** | 13.45 | 1.13 | | 1024 | 1.01 | **1.00** | 13.53 | 1.14 | | 65536 | 1.01 | **1.00** | 13.99 | 1.12 | | 1048576 | 1.02 | **1.00** | 13.29 | 1.12 | ### late_non_ascii | Input Size | new_avx512 | new_sse2 | old_avx512 | old_sse2 | |------------|------------|----------|------------|----------| | 64 | **1.00** | 1.01 | 13.37 | 1.13 | | 1024 | 1.10 | **1.00** | 42.42 | 1.95 | | 65536 | **1.00** | 1.06 | 42.22 | 1.73 | | 1048576 | **1.00** | 1.03 | 34.73 | 1.46 | ### pure_ascii | Input Size | new_avx512 | new_sse2 | old_avx512 | old_sse2 | |------------|------------|----------|------------|----------| | 4 | 1.03 | **1.00** | 1.75 | 1.32 | | 8 | **1.00** | 1.14 | 3.89 | 2.06 | | 16 | **1.00** | 1.04 | 1.13 | 1.62 | | 32 | 1.07 | 1.19 | 5.11 | **1.00** | | 64 | **1.00** | 1.13 | 13.32 | 1.57 | | 128 | **1.00** | 1.01 | 19.97 | 1.55 | | 256 | **1.00** | 1.02 | 27.77 | 1.61 | | 1024 | **1.00** | 1.02 | 41.34 | 1.84 | | 4096 | 1.02 | **1.00** | 45.61 | 1.98 | | 16384 | 1.01 | **1.00** | 48.67 | 2.04 | | 65536 | **1.00** | 1.03 | 43.86 | 1.77 | | 262144 | **1.00** | 1.06 | 41.44 | 1.79 | | 1048576 | 1.02 | **1.00** | 35.36 | 1.44 | </details> Adds assembly test to verify: - `kshiftrd`/`kshiftrq` are NOT generated - `pmovmskb`/`vpor` ARE generated ## Reproduction / Test Projects Standalone validation tools: https://github.com/bonega/is-ascii-fix-validation - `bench/` - Criterion benchmarks for SSE2 vs AVX-512 comparison - `fuzz/` - Compares old/new implementations with libfuzzer Relates to: llvm/llvm-project#176906
…jubilee x86 soft-float feature: mark it as forbidden rather than unstable I am not sure why I made it "unstable" in rust-lang@f755f4c; I think at the time "forbidden" did not work for some reason. Making it "forbidden" instead has no significant effect on `-Ctarget-feature` use, it just changes the warning. It *does* have the effect that one cannot query this using `cfg(target_feature)` on nightly any more, but that seems fine to me. It only ever worked as an accidental side-effect of f755f4c anyway. r? @workingjubilee
Rename `DepKindStruct` to `DepKindVTable` This type is used by dependency-tracking code in the query system, for looking up function pointers and other metadata associated with a particular `DepKind`. Calling it “struct” is not particularly helpful, whereas calling it a “vtable” at least gives some basic intuition for what it is and how it is used. Some associated identifiers have also drifted a bit over time, and this PR adjusts those as well. There should be no change to compiler behaviour. r? nnethercote (or compiler)
… r=joboet Fix 'the the' typo in library/core/src/array/iter.rs This PR fixes a small grammatical error in a safety comment within `library/core/src/array/iter.rs` where the word "the" was duplicated. No functional changes.
Contributor
Author
|
@bors r+ rollup=never p=5 |
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors bot
pushed a commit
that referenced
this pull request
Jan 25, 2026
…uwer Rollup of 11 pull requests Successful merges: - #145393 (Add codegen test for removing trailing zeroes from `NonZero`) - #148764 (ptr_aligment_type: add more APIs) - #149869 (std: avoid tearing `dbg!` prints) - #150065 (add CSE optimization tests for iterating over slice) - #150842 (Fix(lib/win/thread): Ensure `Sleep`'s usage passes over the requested duration under Win7) - #151505 (Various refactors to the proc_macro bridge) - #151560 (relnotes: fix 1.93's `as_mut_array` methods) - #151611 (Improve is_ascii performance on x86_64 with explicit SSE2 intrinsics) - #151317 (x86 soft-float feature: mark it as forbidden rather than unstable) - #151577 (Rename `DepKindStruct` to `DepKindVTable`) - #151620 (Fix 'the the' typo in library/core/src/array/iter.rs)
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for 69acb85 failed: CI. Failed job:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
NonZero#145393 (Add codegen test for removing trailing zeroes fromNonZero)dbg!prints #149869 (std: avoid tearingdbg!prints)Sleep's usage passes over the requested duration under Win7 #150842 (Fix(lib/win/thread): EnsureSleep's usage passes over the requested duration under Win7)as_mut_arraymethods #151560 (relnotes: fix 1.93'sas_mut_arraymethods)DepKindStructtoDepKindVTable#151577 (RenameDepKindStructtoDepKindVTable)r? @ghost
Create a similar rollup