-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
<atomic>
: Consider using __atomic_load_n
/__atomic_store_n
for Clang
#3659
Comments
@barcharcraz says "not now / not yet" for using such intrinsics for Clang, as they would need to match MSVC's atomics ABI, and we need to fully understand any ABI compatibility issues that could arise from use of the Clang intrinsics. We don't want to break ABI by accident. It would be possible to accept such changes if any ABI impact were thoroughly reviewed (as it was when we changed to the |
Can I work on this? |
In clang 16 and newer, clang builtins should be compatible with the sequences MSVC emits, at least for sizes 1/2/4/8. (We did recently fix an ABI issue; see https://reviews.llvm.org/D141748 .) |
@bharsaklemukesh975 - go ahead, AFAIK nobody else is. |
Thanks, @StephanTLavavej ! Can you please also suggest steps to fix this issue, this is my first issue, Thanks! |
Ah, this is a pretty advanced issue, involving compiler intrinsics. I definitely wouldn't have labeled it as "good first issue". Most of our issues aren't simple to resolve, or they would have been done already. |
In llvm/llvm-project#62103 (comment) , @efriedma-quic asked us to consider an alternative to the ARM64
__load_acquire
/__stlr
intrinsics we've started using for MSVC (see #3399 and #3651):On the one hand, this would mean maintaining dedicated codepaths for Clang. On the other hand, getting compilers to do our work for us is awesome.
The text was updated successfully, but these errors were encountered: