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

Enable outline-atomics by default and provide cfg to disable it #57

Merged
merged 1 commit into from
Dec 25, 2022

Conversation

taiki-e
Copy link
Owner

@taiki-e taiki-e commented Dec 20, 2022

This enables outline-atomics feature by default and provides portable_atomic_no_outline_atomics cfg to disable it.

(outline-atomics enables several optimizations on x86_64 and aarch64. See this list for details.)

It has previously been pointed out that due to the nature of the cargo feature, controlling this based on the cargo feature does not work well. Since this release, outline-atomics feature has been no-op, and outline-atomics is enabled by default.

Note: outline-atomics in portable-atomics is currently for 128-bit atomics. outline-atomics for atomics with other sizes is controlled by LLVM's outline-atomics target feature.

Closes #25

@taiki-e taiki-e added O-x86 Target: x86/x64 processors O-arm Target: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state labels Dec 20, 2022
@taiki-e taiki-e force-pushed the no-outline-atomics branch 3 times, most recently from 6ab6363 to 44f5d48 Compare December 25, 2022 05:44
@taiki-e taiki-e marked this pull request as ready for review December 25, 2022 05:44
@taiki-e taiki-e force-pushed the no-outline-atomics branch 2 times, most recently from 8bc7d54 to f604799 Compare December 25, 2022 06:29
@taiki-e
Copy link
Owner Author

taiki-e commented Dec 25, 2022

The use of getauxval in aarch64-linux-musl has caused problems in the past, but as of rust 1.61 that we use outline-atomics in aarch64, it has already been fixed and should not cause similar problems (rust-lang/rust@9a04ae4).

EDIT: The implementation of std_detect uses dlsym by default, so it is not affected anyway.

bors r+

bors bot added a commit that referenced this pull request Dec 25, 2022
57: Enable outline-atomics by default and provide cfg to disable it r=taiki-e a=taiki-e

This enables `outline-atomics` feature by default and provides `portable_atomic_no_outline_atomics` cfg to disable it.

(outline-atomics enables several optimizations on x86_64 and aarch64. See [this list](#10 (comment)) for details.)

It has previously been pointed out that due to the nature of the cargo feature, controlling this based on the cargo feature does not work well. Since this release, `outline-atomics` feature has been no-op, and outline-atomics is enabled by default.

Note: outline-atomics in portable-atomics is currently for 128-bit atomics. outline-atomics for atomics with other sizes is controlled by LLVM's `outline-atomics` target feature.

Closes #25

Co-authored-by: Taiki Endo <[email protected]>
@taiki-e
Copy link
Owner Author

taiki-e commented Dec 25, 2022

bors r-

@bors
Copy link
Contributor

bors bot commented Dec 25, 2022

Canceled.

@taiki-e
Copy link
Owner Author

taiki-e commented Dec 25, 2022

bors r+

bors bot added a commit that referenced this pull request Dec 25, 2022
57: Enable outline-atomics by default and provide cfg to disable it r=taiki-e a=taiki-e

This enables `outline-atomics` feature by default and provides `portable_atomic_no_outline_atomics` cfg to disable it.

(outline-atomics enables several optimizations on x86_64 and aarch64. See [this list](#10 (comment)) for details.)

It has previously been pointed out that due to the nature of the cargo feature, controlling this based on the cargo feature does not work well. Since this release, `outline-atomics` feature has been no-op, and outline-atomics is enabled by default.

Note: outline-atomics in portable-atomics is currently for 128-bit atomics. outline-atomics for atomics with other sizes is controlled by LLVM's `outline-atomics` target feature.

Closes #25

Co-authored-by: Taiki Endo <[email protected]>
@bors
Copy link
Contributor

bors bot commented Dec 25, 2022

Canceled.

@taiki-e
Copy link
Owner Author

taiki-e commented Dec 25, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Dec 25, 2022

@bors bors bot merged commit 78d9ef1 into main Dec 25, 2022
@bors bors bot deleted the no-outline-atomics branch December 25, 2022 09:32
@taiki-e taiki-e added O-aarch64 Target: Armv8-A, Armv8-R, or later processors in AArch64 mode and removed O-arm Target: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state labels Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-aarch64 Target: Armv8-A, Armv8-R, or later processors in AArch64 mode O-x86 Target: x86/x64 processors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable outline-atomics by default and provide a cfg to disable it
1 participant