summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-11-15 15:47:54 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-12-16 16:12:45 -0500
commit82c62074cdf5077efcc31128695eca4e4b9da75b (patch)
tree55050631ec9e609604fb98c43a8df7a89caeefa9 /compiler
parent3d2a7e08aee0c00f0c0b7d6fefcb827ef9a86595 (diff)
downloadhaskell-82c62074cdf5077efcc31128695eca4e4b9da75b.tar.gz
compiler: Use release store in eager blackholing
Diffstat (limited to 'compiler')
-rw-r--r--compiler/GHC/StgToCmm/Bind.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/StgToCmm/Bind.hs b/compiler/GHC/StgToCmm/Bind.hs
index 3e9f5a52d5..abe42d90d8 100644
--- a/compiler/GHC/StgToCmm/Bind.hs
+++ b/compiler/GHC/StgToCmm/Bind.hs
@@ -703,8 +703,8 @@ emitBlackHoleCode node = do
whenUpdRemSetEnabled $ emitUpdRemSetPushThunk node
emitStore (cmmOffsetW platform node (fixedHdrSizeW profile)) currentTSOExpr
-- See Note [Heap memory barriers] in SMP.h.
- emitPrimCall [] MO_WriteBarrier []
- emitStore node (CmmReg (CmmGlobal EagerBlackholeInfo))
+ let w = wordWidth platform
+ emitPrimCall [] (MO_AtomicWrite w MemOrderRelease) [node, CmmReg (CmmGlobal EagerBlackholeInfo)]
setupUpdate :: ClosureInfo -> LocalReg -> FCode () -> FCode ()
-- Nota Bene: this function does not change Node (even if it's a CAF),