[PATCH] D118024: [sanitizer_common] Use atomic builtin in sanitizer_atomic_clang.h
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 24 15:20:29 PST 2022
efriedma added inline comments.
================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang.h:78
+ return __atomic_compare_exchange(&a->val_dont_use, cmp, &xchg, false, mo,
+ __ATOMIC_RELAXED);
}
----------------
Please don't change the memory ordering in this patch. (__sync_* is sequentially consistent.) If you really want to change it, please post as a separate patch with an appropriate title.
================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang.h:94
// proceed the template definitions above.
#if defined(_MIPS_SIM) && defined(_ABIO32)
#include "sanitizer_atomic_clang_mips.h"
----------------
Have you looked at extending this code to SPARC? I'm a little concerned that the dependency on libatomic might cause issues (however we write it).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118024/new/
https://reviews.llvm.org/D118024
More information about the llvm-commits
mailing list