[Git][ghc/ghc][wip/fendor/ghc-iface-sharing-avoid-reserialisation] 12 commits: Float/double unboxed literal support for HexFloatLiterals (fix #22155)

Hannes Siebenhandl (@fendor) gitlab at gitlab.haskell.org
Mon May 27 07:03:17 UTC 2024



Hannes Siebenhandl pushed to branch wip/fendor/ghc-iface-sharing-avoid-reserialisation at Glasgow Haskell Compiler / GHC


Commits:
43e8e4f3 by Sylvain Henry at 2024-05-24T12:16:43-04:00
Float/double unboxed literal support for HexFloatLiterals (fix #22155)

- - - - -
4a7f4713 by Fendor at 2024-05-24T12:17:19-04:00
Improve test labels for binary interface file size tests

Test labels for binary interface file sizes are hard to read and overly
verbose at the same time. Extend the name for the metric title, but
shorten it in the actual comparison table.

- - - - -
14e554cf by Zubin Duggal at 2024-05-24T12:17:55-04:00
Revert "Fix haskell/haddock#783 Don't show button if --quickjump not present"

This reverts commit 7776566531e72c415f66dd3b13da9041c52076aa.

- - - - -
f56838c3 by Ben Gamari at 2024-05-24T12:17:55-04:00
Fix default hyperlinked sources pattern

Previously this didn't include the `%M` token which manifested as broken
links to the hyperlinked sources of reexports of declarations defined
in other packages.

Fixes haddock#1628.

(cherry picked from commit 1432bcc943d41736eca491ecec4eb9a6304dab36)

- - - - -
42efa62c by Ben Gamari at 2024-05-24T12:17:55-04:00
Make DocPaths a proper data type

(cherry picked from commit 7f3a5c4da0023ae47b4c376c9b1ea2d706c94d8c)

- - - - -
53d9ceb3 by Ben Gamari at 2024-05-24T12:17:55-04:00
haddock: Bump version to 2.30

(cherry picked from commit 994989ed3d535177e57b778629726aeabe8c7602)

- - - - -
e4db1112 by Zubin Duggal at 2024-05-24T12:17:55-04:00
haddock-api: allow base 4.20 and ghc 9.11

- - - - -
e294f7a2 by PHO at 2024-05-24T12:17:55-04:00
Add a flag "threaded" for building haddock with the threaded RTS

GHC isn't guaranteed to have a threaded RTS. There should be a way to build
it with the vanilla one.

(cherry picked from commit 75a94e010fb5b0236c670d22b04f5472397dc15d)

- - - - -
51165bc9 by Andreas Klebinger at 2024-05-25T10:58:03-04:00
Update ticky counter event docs.

Add the info about the info table address and json fields.

Fixes #23200

- - - - -
98597ad5 by Sylvain Henry at 2024-05-25T10:58:45-04:00
Export extractPromotedList (#24866)

This can be useful in plugins.

- - - - -
c0cfd258 by Fendor at 2024-05-27T09:02:59+02:00
Improve sharing of duplicated values in `ModIface`

As a `ModIface` contains often duplicated values that are not
necessarily shared, we improve sharing by serialising the `ModIface`
to an in-memory byte array. Serialisation uses deduplication tables, and
deserialisation implicitly shares duplicated values.

This helps reducing the peak memory usage while compiling in
`--make` mode. The peak memory usage is especially reduced when
generating interface files with core expressions
(`-fwrite-if-simplified-core`).

On agda, this reduces the peak memory usage:

* `2.2 GB` to `1.9 GB` for a ghci session.

On `lib:Cabal`, we report:

* `570 MB` to `500 MB` for a ghci session
* `790 MB` to `667 MB` for compiling `lib:Cabal` with ghc

There is a small impact on execution time, around 2% on the agda code
base.

- - - - -
2c119265 by Fendor at 2024-05-27T09:02:59+02:00
Avoid unneccessarily re-serialising the `ModIface`

To reduce memory usage of `ModIface`, we serialise `ModIface` to an
in-memory byte array, which implicitly shares duplicated values.

This serailised byte array can be reused to avoid work when we actually
write the `ModIface` to disk.
We introduce a new field to `ModIface` which allows us to save the byte
array, and write it to disk if the `ModIface` wasn't changed after the
initial serialisation.

This requires us to change absolute offsets, for example to jump to the
deduplication table for `Name` or `FastString` with relative offsets, as
the deduplication byte array doesn't contain header information, such as
fingerprints.
To allow us to dump the binary blob to disk, we need to replace all
absolute offsets with relative ones.

This leads to new primitives for `ModIface`, which help to construct
relative offsets.

Bump Haddock submodule, to account for interface file changes.

-------------------------
Metric Decrease:
    MultiLayerModulesDefsGhcWithCore
Metric Increase:
    MultiComponentModules
    MultiLayerModules
    T10421
    T12234
    T12425
    T13035
    T13701
    T13719
    T14697
    T15703
    T16875
    T18730
    T9198
    mhu-perf
-------------------------
These metric increases may look bad, but they are all completely benign,
we simply allocate 1 MB per module for `shareIface`. As this allocation
is quite quick, it has a neglible impact on run-time performance.

- - - - -


28 changed files:

- compiler/GHC.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Iface/Binary.hs
- compiler/GHC/Iface/Ext/Binary.hs
- compiler/GHC/Iface/Ext/Fields.hs
- compiler/GHC/Iface/Load.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Recomp.hs
- compiler/GHC/Iface/Rename.hs
- compiler/GHC/Parser/Lexer.x
- compiler/GHC/Tc/Errors/Hole.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Tc/Utils/Backpack.hs
- compiler/GHC/Unit/Module/ModIface.hs
- compiler/GHC/Utils/Binary.hs
- docs/users_guide/9.12.1-notes.rst
- docs/users_guide/eventlog-formats.rst
- testsuite/driver/testutil.py
- testsuite/tests/iface/all.T
- + testsuite/tests/parser/should_compile/T22155.hs
- + testsuite/tests/parser/should_compile/T22155.stderr
- testsuite/tests/parser/should_compile/all.T
- testsuite/tests/plugins/simple-plugin/Simple/RemovePlugin.hs
- utils/haddock/haddock-api/haddock-api.cabal
- utils/haddock/haddock-api/resources/html/haddock-bundle.min.js
- utils/haddock/haddock-api/resources/html/js-src/quick-jump.tsx
- utils/haddock/haddock-api/resources/html/package-lock.json
- utils/haddock/haddock-api/resources/html/package.json


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3e6d242ebfd72012c32aa0e9df995002e445827f...2c119265c46b5cbe9e092bbf95e7b76311f82f5e

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3e6d242ebfd72012c32aa0e9df995002e445827f...2c119265c46b5cbe9e092bbf95e7b76311f82f5e
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/20240527/4b03fb4a/attachment.html>


More information about the ghc-commits mailing list