Adding atomic primops

John Lato jwlato at gmail.com
Sun May 4 22:32:44 UTC 2014


Hello,

IMHO I think the desire to include these features is leading to a slightly
cavalier attitude towards reordering concerns.  Even assuming that the Cmm
code generator doesn't reorder reads/writes around `CallishMachOp`, I don't
see why this behavior should always be true, leading to possible future
pain.  Also, it's possible that LLVM may decide to reorder memory accesses
AIUI because the underlying LLVM variables won't be synchronized.

In a nutshell, even though everything may work now I suspect it'll become
an ill-specified mess in a few years time.  I don't have a ton of
experience implementing these sorts of features in compilers though, so
probably only worth a half cent.

John L.
On May 4, 2014 3:10 AM, "Johan Tibell" <johan.tibell at gmail.com> wrote:

> Hi,
>
> I found myself needing atomic operations on basic, mutable numeric values.
> I wrote a short design doc that I'd like feedback on:
>
> https://ghc.haskell.org/trac/ghc/wiki/AtomicPrimops
>
> I will try to implement these for 7.10.
>
> -- Johan
>
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20140504/37acf24c/attachment.html>


More information about the ghc-devs mailing list