[m-rev.] for review: use __sync_synchronize() as a fallback memory barrier with clang

Peter Wang novalazy at gmail.com
Tue Apr 13 11:02:31 AEST 2021


On Tue, 13 Apr 2021 00:46:48 +1000 Julien Fischer <jfischer at opturion.com> wrote:
> 
> For review by anyone.
> 
> This should be enough get the hlc.par.gc grade working on M1 based Macs.
> A better solution would be to use the ARM specific barrier instructions,
> but that's a separate change.
> 
> ------------------
> 
> Use __sync_synchronize() as a fallback memory barrier with clang.
> 
> runtime/mercury_atomic_ops.h:
>      clang provides the GCC builtin function __sync_synchronize; use that
>      as a fallback memory barrier.
> 
>      Avoid unreadable #error directive output from clang.
> 
>      Add an XXX about C11 atomic ops.

That's fine.

Peter


More information about the reviews mailing list