[PATCH] D40545: [sanitizer] add msvc atomic_compare_exchange_strong for sint32_t

Dmitry Vyukov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 05:50:32 PST 2017


dvyukov added a comment.

In https://reviews.llvm.org/D40545#938979, @comicfans44 wrote:

> this is used in x-ray runtime , in xray_fdr_logging.cc  ,such as  line 56:
>
>   if (!__sanitizer::atomic_compare_exchange_strong(
>            &LogFlushStatus, &Result, XRayLogFlushStatus::XRAY_LOG_FLUSHING,
>            __sanitizer::memory_order_release))
>   
>
> currently x-ray didn't compile on windows,but this is a little step to make it build. I'm trying to build xray runtime on windows, some talks here:
>  http://lists.llvm.org/pipermail/llvm-dev/2017-November/119218.html


That's the one I referred to as "which should actually use atomic_uint32_t".
Please switch xray to uint32. I don't think we want to support all of 10 atomic operations X 6 memory orderings X 20 different types, that's more than 1000 combinations.
One day we should finally switch to C++ atomics, but until then it does not make sense to grow set of atomic operations infinitely.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D40545





More information about the llvm-commits mailing list