diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-10-06 17:53:06 +0300 |
---|---|---|
committer | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-10-06 17:54:15 +0300 |
commit | 8be27c0371d53e051d59ba20dd65103bbb8d32d3 (patch) | |
tree | de1f5bf43badd233ac994425550ad786331c97ff | |
parent | 228725747c3e493c36d6b6ad1034ca56581cb758 (diff) | |
download | haskell-8be27c0371d53e051d59ba20dd65103bbb8d32d3.tar.gz |
Add a missing write barrier to small array writes
Write barriers for large array writes were added in D2525, as a part of #12469.
However it seems we forgot about small arrays. This patch adds the same write
barrier to small array writes.
Reviewers: simonmar, bgamari
Reviewed By: simonmar
Subscribers: rwbarton, carter
GHC Trac Issues: #12469
Differential Revision: https://phabricator.haskell.org/D5209
-rw-r--r-- | compiler/codeGen/StgCmmPrim.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/codeGen/StgCmmPrim.hs b/compiler/codeGen/StgCmmPrim.hs index 266ab3a0f6..f5437c0c3b 100644 --- a/compiler/codeGen/StgCmmPrim.hs +++ b/compiler/codeGen/StgCmmPrim.hs @@ -2295,6 +2295,7 @@ doWriteSmallPtrArrayOp :: CmmExpr doWriteSmallPtrArrayOp addr idx val = do dflags <- getDynFlags let ty = cmmExprType dflags val + emitPrimCall [] MO_WriteBarrier [] -- #12469 mkBasicIndexedWrite (smallArrPtrsHdrSize dflags) Nothing addr ty idx val emit (setInfo addr (CmmLit (CmmLabel mkSMAP_DIRTY_infoLabel))) |