-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 7 pull requests #128768
Rollup of 7 pull requests #128768
Conversation
Since LLVM <https://reviews.llvm.org/D99439> (4c7f820, "Update @llvm.powi to handle different int sizes for the exponent"), the size of the integer can be specified for the `powi` intrinsic. Make use of this so it is more obvious that integer size is consistent across all float types. This feature is available since LLVM 13 (October 2021). Based on bootstrap we currently support >= 17.0, so there should be no support problems.
These already exist in the compiler. Expose them in core so we can add their library functions.
This adds missing functions for math operations on the new float types. Platform support is pretty spotty at this point, since even platforms with generally good support can be missing math functions. `std/build.rs` is updated to reflect this.
`min`, `max`, and similar functions require external math routines. Add these under the same gates as `std` math functions (`reliable_f16_math` and `reliable_f128_math`).
Clarify what makes some operations not safe, and correct comment in the default branch ("not safe" -> "safe").
Due to a LLVM bug, `f128` math functions link successfully but LLVM chooses the wrong symbols (`long double` symbols rather than those for binary128). Since this is a notable problem that may surprise a number of users, add a note about it. Link: llvm/llvm-project#44744
> `const` items looks remarkably similar to `static` items, [...] Either this should be written as > A `const` items looks remarkably similar to a `static` item, or "looks" should be changed to "look". I have selected the smaller diff.
…ouxu Migrate `raw-dylib-alt-calling-convention`, `raw-dylib-c` and `redundant-libs` `run-make` tests to rmake Part of rust-lang#121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). Please try: // try-job: x86_64-msvc // try-job: x86_64-mingw // try-job: i686-msvc try-job: x86_64-gnu-llvm-17 try-job: aarch64-apple
…isibility, r=bjorn3 add test for symbol visibility of `#[naked]` functions tracking issue: rust-lang#90957 This test is extracted from rust-lang#128004 That PR attempts to generated naked functions as an extern function declaration, combined with a global asm block that provides the implementation for that declaration. In order to link declaration and definition together, some flavor of external linking must be used: LLVM will error for other linkage types. Specifically the allowed options are `#[linkage = "external"]` and `#[linkage = "extern_weak"]`. That is kind of an implementation detail though: to the user, a naked function should just behave like a normal function. Hence it should be visible to the linker under the same circumstances as a normal, vanilla function and have the same attributes (Weak, External). Getting this behavior right will require some care, so I think it's a good idea to lock it in now, before making any changes, to make sure we don't regress. Are there any interesting cases that I missed here? E.g. is checking on different architectures worth it? I don't think the other binary types (rlib etc) are relevant here, but may be missing something. r? ``@bjorn3``
Add `f16` and `f128` math functions This adds intrinsics and math functions for `f16` and `f128` floating point types. Support is quite limited and some things are broken so tests don't run on many platforms, but this provides a starting point.
run-make: enable msvc for `link-dedup` This is just a case of differing style of linker arguments. I also cleaned up a bit where we were running the same command three times in a row. Instead I reused the output. One thing that confused me is why we were testing for the same lib three times in a row but not two. After figuring that out I added a note to hopefully save future readers some confusion. try-job: x86_64-msvc try-job: i686-msvc
…youxu Enable msvc for link-args-order I could not see any reason in rust-lang#70665 why this test needs to specifically use `ld`. Maybe to provide a consistent linker input line? In any case, the test does work for the MSVC linker. try-job: i686-msvc try-job: x86_64-msvc
run-make: Enable msvc for `no-duplicate-libs` and `zero-extend-abi-param-passing` The common thing between these two tests is to use `#[link(..., kind="static")]` so that it doesn't try to do a DLL import. `zero-extend-abi-param-passing` also needs to have an optimized static library but there's only helper function for a non-optimized version. Rather than copy/pasting the code (and adding the optimization flag) I reused the same code so that it more easily be kept in sync. try-job: i686-msvc try-job: x86_64-msvc
Trivial grammar fix in const keyword docs This PR makes a trivial fix to the wording of a sentence in the `const` keyword docs. > `const` items looks remarkably similar to `static` items, [...] Either this should be written as > A `const` items looks remarkably similar to a `static` item, [...] or "looks" should be changed to "look". I have selected the smaller diff.
@bors r+ rollup=never p=7 |
Looks like there are some networking issues |
@bors r+ rollup=never p=7 |
💡 This pull request was already approved, no need to approve it again.
|
Rollup of 7 pull requests Successful merges: - rust-lang#128107 (Migrate `raw-dylib-alt-calling-convention`, `raw-dylib-c` and `redundant-libs` `run-make` tests to rmake) - rust-lang#128362 (add test for symbol visibility of `#[naked]` functions) - rust-lang#128417 (Add `f16` and `f128` math functions) - rust-lang#128638 (run-make: enable msvc for `link-dedup`) - rust-lang#128647 (Enable msvc for link-args-order) - rust-lang#128649 (run-make: Enable msvc for `no-duplicate-libs` and `zero-extend-abi-param-passing`) - rust-lang#128766 (Trivial grammar fix in const keyword docs) r? `@ghost` `@rustbot` modify labels: rollup
💔 Test failed - checks-actions |
Networking again @bors retry |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 2f3dc46465 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (6a2cd0d): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary -0.9%, secondary -2.8%)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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 761.877s -> 762.326s (0.06%) |
Trying #128417, probably just a small doc regression caused by larger documentation of stdlib. |
Yes, it was indeed caused by that PR. @rustbot label: +perf-regression-triaged |
Successful merges:
raw-dylib-alt-calling-convention
,raw-dylib-c
andredundant-libs
run-make
tests to rmake #128107 (Migrateraw-dylib-alt-calling-convention
,raw-dylib-c
andredundant-libs
run-make
tests to rmake)#[naked]
functions #128362 (add test for symbol visibility of#[naked]
functions)f16
andf128
math functions #128417 (Addf16
andf128
math functions)link-dedup
#128638 (run-make: enable msvc forlink-dedup
)no-duplicate-libs
andzero-extend-abi-param-passing
#128649 (run-make: Enable msvc forno-duplicate-libs
andzero-extend-abi-param-passing
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup