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

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 8 01:35:43 PST 2024


dvyukov wrote:

Hi Alexander,

Thanks for working on this.

Please double-check that codegen for the following tsan functions in release builds don't change: __tsan_read1/2/4/8, __tsan_write1/2/4/8, __tsan_func_entry/exit. Please post diff of asm for these functions, if any.

If we are refacatoring this, can we simplify code more today? I guess Vistual Studio does not support these buitlins, so we can't just switch to them. But perhaps we could switch to std::atomic? If yes, I would assume we still keep the atomic operation wrapper functions to minimize the diff.

Also clang-format CI check complains, please re-format the code.

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


More information about the llvm-commits mailing list