Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 8 pull requests #133059

Merged
merged 19 commits into from
Nov 15, 2024
Merged

Rollup of 8 pull requests #133059

merged 19 commits into from
Nov 15, 2024

Conversation

workingjubilee
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

aDotInTheVoid and others added 19 commits November 9, 2024 18:52
Co-authored-by: Mike Pedersen <mike@mikepedersen.dk>
Co-authored-by: Nathan West <Lucretiel@gmail.com>
pipe2 allows the newly-created pipe to atomically be CLOEXEC.

pipe2 was added to illumos a long time ago:
illumos/illumos-gate@5dbfd19.
I've verified that this change passes all tests.
PR 130999 added the file_lock feature, but libc does not define
flock() for the Solaris platform leading to a compilation error.

Additionally, I went through all the Tier 2 platforms and read through
their documentation to see whether flock was implemented. This turned up
5 more Unix platforms where flock is not supported, even though it may
exist in the libc crate.
... that do not have SSE2 support (e.g. i586)
These types are currently passed by reference, which does not avoid the
backend crashes. Change these back to being passed by value, which makes
the types easier to detect for automatic inlining.
There are a handful of tier 2 and tier 3 targets that cause a LLVM crash
or linker error when generating code that contains `f16` or `f128`. The
cranelift backend also does not support these types. To work around
this, every function in `std` or `core` that contains these types must
be marked `#[inline]` in order to avoid sending any code to the backend
unless specifically requested.

However, this is inconvenient and easy to forget. Introduce a check for
these types in the frontend that automatically inlines any function
signatures that take or return `f16` or `f128`.

Note that this is not a perfect fix because it does not account for the
types being passed by reference or as members of aggregate types, but
this is sufficient for what is currently needed in the standard library.

Fixes: rust-lang#133035
Closes: rust-lang#133037
... to do more comprehensive type checking
…s-again, r=cuviper

Add as_slice/into_slice for IoSlice/IoSliceMut.

ACP: rust-lang/libs-team#93

Tracking issue: rust-lang#132818

Based on a623c52 (CC `@mpdn)` and rust-lang#111277 (CC `@Lucretiel).`

Closes: rust-lang#124659

Tracking Issue: TODO

try-job: test-various
try-job: dist-various-1
try-job: dist-various-2

r? libs
[AIX] Add crate "unwind" to link with libunwind

The Rust on IBM AIX uses LLVM's `libunwind`. Since crate `unwind` is a dependency of crate `std` and `#![no_std]` is specified in the test case, `libunwind` is not included in the link command by default. As a result, the test case fails to link with the error "Undefined symbol: ._Unwind_Resume" on AIX. This PR explicitly adds crate `unwind` for AIX, along with feature `panic_unwind`, which is required to include the `unwind` crate.
Fix compilation error on Solaris due to flock usage

PR 130999 added the file_lock feature, but libc does not define flock() for the Solaris platform leading to a compilation error.

Additionally, I went through all the Tier 2 platforms and read through their documentation to see whether flock was implemented. This turned up 5 more Unix platforms where flock is not supported, even though it may exist in the libc crate.

Fixes rust-lang#132921

Related to rust-lang#130999
[illumos] use pipe2 to create anonymous pipes

pipe2 allows the newly-created pipe to atomically be CLOEXEC.

pipe2 was added to illumos a long time ago:
illumos/illumos-gate@5dbfd19. I've verified that this change passes all of std's tests on illumos.
…-colon, r=tgross35

docs: Fix missing period and colon in methods for primitive types

Closes rust-lang#133018
use `&raw` in `{read, write}_unaligned` documentation

Fixes rust-lang#133024 by using `&raw const` and `&raw mut` instead of `addr_of!` and `addr_of_mut!`.
Always inline functions signatures containing `f16` or `f128`

There are a handful of tier 2 and tier 3 targets that cause a LLVM crash or linker error when generating code that contains `f16` or `f128`. The cranelift backend also does not support these types. To work around this, every function in `std` or `core` that contains these types must be marked `#[inline]` in order to avoid sending any code to the backend unless specifically requested.

However, this is inconvenient and easy to forget. Introduce a check for these types in the frontend that automatically inlines any function signatures that take or return `f16` or `f128`.

Note that this is not a perfect fix because it does not account for the types being passed by reference or as members of aggregate types, but this is sufficient for what is currently needed in the standard library.

Fixes: rust-lang#133035
Closes: rust-lang#133037
…x, r=workingjubilee

tests: Fix the SIMD FFI tests with certain x86 configuration

This pull request fixes the SIMD FFI tests with certain x86 configurations by gating the SSE2 intrinsic behind the `sse2` feature gate. A generic LLVM intrinsic that is easy to un-fuse on those platforms is added to compensate for those platforms.
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs O-hermit Operating System: Hermit O-solid Operating System: SOLID O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Nov 15, 2024
@workingjubilee
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Nov 15, 2024

📌 Commit efe2c44 has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 15, 2024
@bors
Copy link
Contributor

bors commented Nov 15, 2024

⌛ Testing commit efe2c44 with merge 251dc8a...

@bors
Copy link
Contributor

bors commented Nov 15, 2024

☀️ Test successful - checks-actions
Approved by: workingjubilee
Pushing 251dc8a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 15, 2024
@bors bors merged commit 251dc8a into rust-lang:master Nov 15, 2024
7 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 15, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#132790 Add as_slice/into_slice for IoSlice/IoSliceMut. 67528b37bdd59a212edea2c75f031e9b807fa071 (link)
#132905 [AIX] Add crate "unwind" to link with libunwind cfc257d0c7957de4b7d7f8662699646e69a710ee (link)
#132977 Fix compilation error on Solaris due to flock usage 3635d056e08c5f4b9ec6f72485b1effcbbcca784 (link)
#132984 [illumos] use pipe2 to create anonymous pipes 55c6e31192cf69d57effefe2e4b218f03ba3b1b3 (link)
#133019 docs: Fix missing period and colon in methods for primitive… 37b89342e79821a158bf4db97b97d95b369942b7 (link)
#133048 use &raw in {read, write}_unaligned documentation d22f1757d8e7a650815b272caff8f92f5983a127 (link)
#133050 Always inline functions signatures containing f16 or `f12… 474030185849f211a768e1142394581ad6735013 (link)
#133053 tests: Fix the SIMD FFI tests with certain x86 configuration 9596bf32007ec1c97911f21c08e66e8b9c2912f1 (link)

previous master: 3bc6916f4c

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (251dc8a): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 1.1%, secondary -1.3%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.1% [1.1%, 1.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.3% [-2.9%, -0.8%] 4
All ❌✅ (primary) 1.1% [1.1%, 1.1%] 1

Cycles

Results (secondary -2.5%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.5% [-3.0%, -2.1%] 5
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 787.326s -> 786.178s (-0.15%)
Artifact size: 335.29 MiB -> 335.36 MiB (0.02%)

@workingjubilee workingjubilee deleted the rollup-rc5kvr1 branch November 15, 2024 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs merged-by-bors This PR was explicitly merged by bors. O-hermit Operating System: Hermit O-solid Operating System: SOLID O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-windows Operating system: Windows rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.