[compiler-rt] [compiler-rt] Use __atomic builtins whenever possible (PR #84439)

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 13:51:27 PDT 2024


jyknight wrote:

To use the __atomic builtins and rely on libatomic for non-native atomics, you must do so consistently. You can't correctly mix-and-match RMW and load/store, or they might not be atomic with regards to each-other.

That means:
- delete sanitizer_atomic_clang_x86.h (preserve the architecture-specific definition of `proc_yield`, though it's unrelated to atomics)
- delete sanitizer_atomic_clang_mips.h
- delete sanitizer_atomic_clang_other.h, moving the functions into into sanitizer_atomic_clang.h and change `atomic_load`/`atomic_store` to call `__atomic_load`/`__atomic_store` instead of its custom impl.

https://github.com/llvm/llvm-project/pull/84439


More information about the llvm-commits mailing list