Skip to content

compiler: add SEQ_CST fence support

Cheng Shao requested to merge type-dance/ghc:seq_cst_fence into master

compiler: add SEQ_CST fence support

In addition to existing Acquire/Release fences, this commit adds SEQ_CST fence support to GHC, allowing Cmm code to explicitly emit a fence that enforces total memory ordering. The following logic is added:

  • The MO_SeqCstFence callish MachOp
  • The %prim fence_seq_cst() Cmm syntax and the SEQ_CST_FENCE macro in Cmm.h
  • MO_SeqCstFence lowering logic in every single GHC codegen backend

Merge request reports