-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-atomicArea: Atomics, barriers, and sync primitivesArea: Atomics, barriers, and sync primitivesC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language teamT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Expose LLVM's "element wise atomic memory intrinsics". In particular:
- Expose
llvm.memcpy.element.unordered.atomic
asatomic_element_unordered_copy_memory_nonoverlapping
- Expose
llvm.memmove.element.unordered.atomic
asatomic_element_unordered_copy_memory
- Expose
llvm.memset.element.unordered.atomic
asatomic_element_unordered_set_memory
Expose these through functions in the std::ptr
module. Each function is implemented by the equivalent intrinsic or by a loop of relaxed atomic operations if the intrinsic is not available on the target platform (TODO: Given this platform-specific behavior, can this also be exposed in core::ptr
?)
copy_nonoverlapping_atomic_unordered
, backed byatomic_element_unordered_copy_memory_nonoverlapping
copy_atomic_unordered
, backed byatomic_element_unordered_copy_memory
write_atomic_unordered
, backed byatomic_element_unordered_set_memory
Previously discussed on the internals forum here.
Folks with the authority to approve this: Let me know if this is OK to move forward; I'd like to post it to This Week in Rust's CFP.
mtak-, tarcieri, mjbshaw and htfy96
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-atomicArea: Atomics, barriers, and sync primitivesArea: Atomics, barriers, and sync primitivesC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language teamT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.