LLVM: Implement atomic operations in terms of LLVM primitives
authorBen Gamari <bgamari.foss@gmail.com>
Fri, 2 Oct 2015 13:48:55 +0000 (15:48 +0200)
committerBen Gamari <ben@smart-cactus.org>
Fri, 2 Oct 2015 13:51:09 +0000 (15:51 +0200)
commitbd41eb2ad9507d3f408e25c8dece61f389f11a2a
treee5477baad577afef9f8a357837fe00c3b222aba3
parentb29f20edb1ca7f1763ceb001e2bb2d5f2f11bec3
LLVM: Implement atomic operations in terms of LLVM primitives

This fixes Trac #7883.

This adds proper support for,
  * `MO_AtomicRMW`
  * `MO_AtomicWrite`
  * `MO_CmpXChg`

Test Plan: Validate

Reviewers: rrnewton, austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1282

GHC Trac Issues: #7883
compiler/llvmGen/Llvm.hs
compiler/llvmGen/Llvm/AbsSyn.hs
compiler/llvmGen/Llvm/PpLlvm.hs
compiler/llvmGen/Llvm/Types.hs
compiler/llvmGen/LlvmCodeGen/CodeGen.hs