[Git][ghc/ghc][wip/or-pats] 10 commits: nativeGen: Disable asm-shortcutting on Darwin

David (@knothed) gitlab at gitlab.haskell.org
Mon Jan 30 11:39:16 UTC 2023



David pushed to branch wip/or-pats at Glasgow Haskell Compiler / GHC


Commits:
8bed166b by Ben Gamari at 2023-01-30T05:06:26-05:00
nativeGen: Disable asm-shortcutting on Darwin

Asm-shortcutting may produce relative references to symbols defined in
other compilation units. This is not something that MachO relocations
support (see #21972). For this reason we disable the optimisation on
Darwin. We do so without a warning since this flag is enabled by `-O2`.

Another way to address this issue would be to rather implement a
PLT-relocatable jump-table strategy. However, this would only benefit
Darwin and does not seem worth the effort.

Closes #21972.

- - - - -
da468391 by Cheng Shao at 2023-01-30T05:07:03-05:00
compiler: fix data section alignment in the wasm NCG

Previously we tried to lower the alignment requirement as far as
possible, based on the section kind inferred from the CLabel. For info
tables, .p2align 1 was applied given the GC should only need the
lowest bit to tag forwarding pointers. But this would lead to
unaligned loads/stores, which has a performance penalty even if the
wasm spec permits it. Furthermore, the test suite has shown memory
corruption in a few cases when compacting gc is used.

This patch takes a more conservative approach: all data sections
except C strings align to word size.

- - - - -
c01eb745 by David Knothe at 2023-01-30T11:30:11+01:00
Add Or Patterns (proposal 0522)

- - - - -
f789e490 by David Knothe at 2023-01-30T11:30:12+01:00
Update submodule haddock & linting stuff

- - - - -
48591421 by David Knothe at 2023-01-30T11:30:12+01:00
Write user guide entry

- - - - -
558d0292 by David Knothe at 2023-01-30T11:30:12+01:00
Add EPAs

- - - - -
da9b84e9 by David Knothe at 2023-01-30T11:30:12+01:00
Update submodule haddock

- - - - -
d52709cd by David Knothe at 2023-01-30T11:30:12+01:00
Add EPA test

- - - - -
6fb17247 by Sebastian Graf at 2023-01-30T11:30:12+01:00
Adjust the pattern-match checker for Or patterns

Previously, any pattern match or guard could be desugared into a vector of
elementary `PmGrd`s (called `GrdVec`) that must all match conjunctively.

But with Or patterns, that is bound to change, quite drastically so:
Or patterns imply disjunctive matching, and because they may occur
nestedly inside other patterns, we need to widen our `GrdVec` type
to accomodate both conjunctive/sequential as well as disjunctive/alternative
composition.

This leads to a rather modest generalisation of the guard tree formalism,
yielding guard *directed acyclic graphs*. These DAGs are *series-parallel*,
that is to say a *very* benign kind of DAG that is nearly a tree, and which
can be defined easily as an inductive data type, `GrdDag`.

Beyond adjustments to use the new graph constructors, the rest is just routine
re-use of the existing `topToBottom` combinator in `GHC.HsToCore.Pmc.Check`.

Nice!

- - - - -
e74e829f by David Knothe at 2023-01-30T11:30:12+01:00
Minor things

- - - - -


30 changed files:

- compiler/GHC/CmmToAsm.hs
- compiler/GHC/CmmToAsm/Wasm/FromCmm.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Syn/Type.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Match.hs
- compiler/GHC/HsToCore/Pmc/Check.hs
- compiler/GHC/HsToCore/Pmc/Desugar.hs
- compiler/GHC/HsToCore/Pmc/Types.hs
- compiler/GHC/HsToCore/Utils.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/Errors/Ppr.hs
- compiler/GHC/Parser/Errors/Types.hs
- compiler/GHC/Parser/Lexer.x
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/Bind.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs
- compiler/GHC/Tc/Utils/Zonk.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/Language/Haskell/Syntax/Extension.hs
- compiler/Language/Haskell/Syntax/Pat.hs
- + docs/users_guide/exts/or_patterns.rst


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b802d5c73965e6596eb2f4e4fd6536eecdc8f58c...e74e829fd53f7f15bfc064fe6614028c1d2bf0df

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b802d5c73965e6596eb2f4e4fd6536eecdc8f58c...e74e829fd53f7f15bfc064fe6614028c1d2bf0df
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/20230130/637a6bb9/attachment.html>


More information about the ghc-commits mailing list