[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 23 commits: cmm: Introduce MO_RelaxedRead

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu Feb 1 14:01:33 UTC 2024



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
12639b18 by Ben Gamari at 2024-02-01T09:01:18-05:00
cmm: Introduce MO_RelaxedRead

In hand-written Cmm it can sometimes be necessary to atomically load
from memory deep within an expression (e.g. see the `CHECK_GC` macro).
This MachOp provides a convenient way to do so without breaking the
expression into multiple statements.

- - - - -
38d74a3f by Ben Gamari at 2024-02-01T09:01:18-05:00
codeGen: Use relaxed accesses in ticky bumping

- - - - -
73f5c8ff by Ben Gamari at 2024-02-01T09:01:18-05:00
base: use atomic write when updating timer manager

- - - - -
9cdad4ba by Ben Gamari at 2024-02-01T09:01:18-05:00
Use relaxed atomics to manipulate TSO status fields

- - - - -
727af8ad by Ben Gamari at 2024-02-01T09:01:18-05:00
rts: Add necessary barriers when manipulating TSO owner

- - - - -
6f41f894 by Ben Gamari at 2024-02-01T09:01:18-05:00
rts: Use `switch` to branch on why_blocked

This is a semantics-preserving refactoring.

- - - - -
0ddc4632 by Ben Gamari at 2024-02-01T09:01:18-05:00
rts: Fix synchronization on thread blocking state

We now use a release barrier whenever we update a thread's blocking
state. This required widening StgTSO.why_blocked as AArch64 does not
support atomic writes on 16-bit values.

- - - - -
5a7ce400 by Ben Gamari at 2024-02-01T09:01:18-05:00
rts: Fix data race in threadPaused

This only affects an assertion in the debug RTS and only needs relaxed
ordering.

- - - - -
8d6e9805 by Ben Gamari at 2024-02-01T09:01:18-05:00
rts: Fix data race in threadStatus#

- - - - -
2b4a6ecf by Ben Gamari at 2024-02-01T09:01:18-05:00
rts: Fix data race in Interpreter's preemption check

- - - - -
03735c3d by Ben Gamari at 2024-02-01T09:01:18-05:00
rts/Messages: Fix data race

- - - - -
24aac350 by Ben Gamari at 2024-02-01T09:01:18-05:00
rts/Prof: Fix data race

- - - - -
2cf25783 by Ben Gamari at 2024-02-01T09:01:18-05:00
rts: Use relaxed ordering on dirty/clean info tables updates

When changing the dirty/clean state of a mutable object we needn't have
any particular ordering.

- - - - -
5fe52ca4 by Ben Gamari at 2024-02-01T09:01:18-05:00
codeGen: Use relaxed-read in closureInfoPtr

- - - - -
52bb91b2 by Ben Gamari at 2024-02-01T09:01:18-05:00
STM: Use acquire loads when possible

Full sequential consistency is not needed here.

- - - - -
84be463e by Ben Gamari at 2024-02-01T09:01:18-05:00
rts: Use fence rather than redundant load

Previously we would use an atomic load to ensure acquire ordering.
However, we now have `ACQUIRE_FENCE_ON`, which allows us to express this
more directly.

- - - - -
9340021b by Ben Gamari at 2024-02-01T09:01:18-05:00
rts: Fix data races in profiling timer

- - - - -
7aaf922a by Ben Gamari at 2024-02-01T09:01:18-05:00
Add Note [C11 memory model]

- - - - -
87b4e48c by Cheng Shao at 2024-02-01T09:01:21-05:00
compiler: move generic cmm optimization logic in NCG to a standalone module

This commit moves GHC.CmmToAsm.cmmToCmm to a standalone module,
GHC.Cmm.GenericOpt. The main motivation is enabling this logic to be
run in the wasm backend NCG code, which is defined in other modules
that's imported by GHC.CmmToAsm, causing a cyclic dependency issue.

- - - - -
d4e89f35 by Cheng Shao at 2024-02-01T09:01:21-05:00
compiler: explicitly disable PIC in wasm32 NCG

This commit explicitly disables the ncgPIC flag for the wasm32 target.
The wasm backend doesn't support PIC for the time being.

- - - - -
d3980393 by Cheng Shao at 2024-02-01T09:01:21-05:00
compiler: enable generic cmm optimizations in wasm backend NCG

This commit enables the generic cmm optimizations in other NCGs to be
run in the wasm backend as well, followed by a late cmm control-flow
optimization pass. The added optimizations do catch some corner cases
not handled by the pre-NCG cmm pipeline and are useful in generating
smaller CFGs.

- - - - -
716b5e4d by Andrei Borzenkov at 2024-02-01T09:01:22-05:00
Namespacing for WARNING/DEPRECATED pragmas (#24396)

New syntax for WARNING and DEPRECATED pragmas was added,
namely namespace specifierss:

  namespace_spec ::= 'type' | 'data' | {- empty -}

  warning ::= warning_category namespace_spec namelist strings

  deprecation ::= namespace_spec namelist strings

A new data type was introduced to represent these namespace specifiers:

  data NamespaceSpecifier =
    NoSpecifier |
    TypeNamespaceSpecifier (EpToken "type") |
    DataNamespaceSpecifier (EpToken "data")

Extension field XWarning now contains this NamespaceSpecifier.

lookupBindGroupOcc function was changed: it now takes NamespaceSpecifier
and checks that the namespace of the found names matches the passed flag.
With this change {-# WARNING data D "..." #-} pragma will only affect value
namespace and {-# WARNING type D "..." #-} will only affect type
namespace. The same logic is applicable to DEPRECATED pragmas.

Finding duplicated warnings inside rnSrcWarnDecls now takes into
consideration NamespaceSpecifier flag to allow warnings with the
same names that refer to different namespaces.

- - - - -
f835c1b5 by Bryan Richter at 2024-02-01T09:01:22-05:00
CI: Disable the test-cabal-reinstall job

Fixes #24363

- - - - -


30 changed files:

- .gitlab-ci.yml
- compiler/GHC/Cmm/Expr.hs
- + compiler/GHC/Cmm/GenericOpt.hs
- compiler/GHC/Cmm/Info.hs
- compiler/GHC/Cmm/MachOp.hs
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/Cmm/ThreadSanitizer.hs
- compiler/GHC/CmmToAsm.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/PPC/CodeGen.hs
- compiler/GHC/CmmToAsm/Wasm.hs
- compiler/GHC/CmmToAsm/Wasm/FromCmm.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/CmmToC.hs
- compiler/GHC/CmmToLlvm/CodeGen.hs
- compiler/GHC/Driver/Config/CmmToAsm.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Parser.y
- compiler/GHC/Rename/Bind.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/StgToCmm/Ticky.hs
- compiler/GHC/StgToCmm/Utils.hs
- compiler/ghc.cabal.in
- docs/users_guide/9.10.1-notes.rst
- docs/users_guide/exts/pragmas.rst
- libraries/base/src/GHC/Event/Thread.hs
- libraries/ghc-prim/GHC/Tuple.hs
- rts/Exception.cmm
- rts/HeapStackCheck.cmm


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/94f757e9d84e119427f4c5cf6a7461a4df84bfd9...f835c1b5bc7ada80ed7fd933514dbc893a78ab74

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/94f757e9d84e119427f4c5cf6a7461a4df84bfd9...f835c1b5bc7ada80ed7fd933514dbc893a78ab74
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240201/35d01516/attachment-0001.html>


More information about the ghc-commits mailing list