[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 15 commits: Fix CRLF in multiline strings (#25375)

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Fri Nov 22 21:52:08 UTC 2024



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


Commits:
7bd407a6 by Brandon Chinn at 2024-11-21T14:08:15-05:00
Fix CRLF in multiline strings (#25375)

- - - - -
7575709b by Rodrigo Mesquita at 2024-11-21T14:08:52-05:00
Improve reachability queries on ModuleGraph

Introduces `ReachabilityIndex`, an index constructed from a
`GHC.Data.Graph.Directed` `Graph` that supports fast reachability
queries (in $O(1)$). This abstract data structure is exposed from
`GHC.Data.Graph.Directed.Reachability`.

This index is constructed from the module graph nodes and cached in
`ModuleGraph`, enabling efficient reachability queries on the module
graph. Previously, we'd construct a Map of Set of ModuleGraph nodes
which used a lot of memory (`O(n^2)` in the number of nodes) and cache
that in the `ModuleGraph`. By using the reachability index we get rid of
this space leak in the module graph -- even though the index is still
quadratic in the number of modules, it is much, much more space
efficient due to its representation using an IntMap of IntSet as opposed
to the transitive closure we previously cached.

In a memory profile of MultiLayerModules with 100x100 modules, memory
usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB
are caused by a second space leak related to ModuleGraph. On the same
program, it brings compile time from 7.5s to 5.5s.

Note how we simplify `checkHomeUnitsClosed` in terms of
`isReachableMany` and by avoiding constructing a second graph with the
full transitive closure -- it suffices to answer the reachability query
on the full graph without collapsing the transitive closure completely
into nodes.

Unfortunately, solving this leak means we have to do a little bit more
work since we can no longer cache the result of turning vertex indices
into nodes. This results in a slight regression in MultiLayerModulesTH_Make,
but results in large performance and memory wins when compiling large
amounts of modules.

-------------------------
Metric Decrease:
    mhu-perf
Metric Increase:
    MultiLayerModulesTH_Make
-------------------------

- - - - -
bcbcdaaf by Cheng Shao at 2024-11-21T14:09:28-05:00
driver: fix hpc undefined symbol issue in TH with -fprefer-byte-code

This commit fixes an undefined symbol error in RTS linker when
attempting to compile home modules with -fhpc and
-fbyte-code-and-object-code/-fprefer-byte-code, see #25510 for
detailed description and analysis of the bug.

Also adds T25510/T25510c regression tests to test make mode/oneshot
mode of the bug.

- - - - -
2fe56dbe by Ben Gamari at 2024-11-22T16:51:48-05:00
gitlab-ci: Bump ci-images

For introduction of Alpine/i386 image.

Thanks to Julian for the base image.

Co-Authored-By: Julian Ospald <hasufell at hasufell.de>

- - - - -
7dfb17ca by Ben Gamari at 2024-11-22T16:51:48-05:00
gitlab-ci: Add release job for i386/Alpine

As requested by Mikolaj and started by Julian.

Co-Authored-By: Julian Ospald <hasufell at hasufell.de>

- - - - -
a972735f by Ben Gamari at 2024-11-22T16:51:48-05:00
rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_

- - - - -
8297a2e7 by Ben Gamari at 2024-11-22T16:51:48-05:00
gitlab-ci: Mark i386 Alpine test breakages

Marks the following tests as broken on i386/Alpine:

 * T22033 due to #25497
 * simd009, T25062_V16, T25169, T22187_run due to #25498

- - - - -
e048e087 by Cheng Shao at 2024-11-22T16:51:48-05:00
compiler: remove unused GHC.Linker.Loader.loadExpr

This patch removes the unused `GHC.Linker.Loader.loadExpr` function.
It was moved from `GHC.Runtime.Linker.linkExpr` in `ghc-9.0` to
`GHC.Linker.Loader.loadExpr` in `ghc-9.2`, and remain completely
unused and untested ever since. There's also no third party user of
this function to my best knowledge, so let's remove this. Anyone who
wants to write their own GHC API function to load bytecode can consult
the source code in older release branches.

- - - - -
107310ce by Drew Fenwick at 2024-11-22T16:51:53-05:00
Fix a non-compiling example in the type abstractions docs

This patch adds a missing Show constraint to a code example in the User Guide's type abstractions docs to fix issue #25422.
- - - - -
35532039 by Rodrigo Mesquita at 2024-11-22T16:51:53-05:00
Re-introduce ErrorCallWithLocation with a deprecation pragma

With the removal of the duplicate backtrace, part of CLC proposal #285,
the constructor `ErrorCallWithLocation` was removed from base.

This commit re-introduces it with a deprecation.

- - - - -
8a69f763 by Ben Gamari at 2024-11-22T16:51:54-05:00
testsuite: Skip tests requiring Hadrian deps in out-of-tree testsuite runs

Some testsuite tests require specific tools (e.g. `check-ppr` and
`check-exact`) beyond those shipped in the binary distribution. Skip
these tests.

Fixes #13897.

- - - - -
3d27c501 by Ben Gamari at 2024-11-22T16:51:54-05:00
testsuite: Declare exactprint tests' dependency on check-exact

- - - - -
b672f876 by Ben Gamari at 2024-11-22T16:51:54-05:00
ghc-internal: Fix a few cases of missing Haddock markup

- - - - -
560600e6 by Ben Gamari at 2024-11-22T16:51:55-05:00
testsuite/GHCiPrimCall : Add missing Makefile includes

- - - - -
3a4d58e2 by Ben Gamari at 2024-11-22T16:51:55-05:00
testsuite/IpeStats: Use Make rather than shell interpolation

- - - - -


30 changed files:

- .gitattributes
- .gitlab-ci.yml
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/GHC/Data/Graph/Directed.hs
- + compiler/GHC/Data/Graph/Directed/Internal.hs
- + compiler/GHC/Data/Graph/Directed/Reachability.hs
- compiler/GHC/Driver/Config/StgToCmm.hs
- compiler/GHC/Driver/Hooks.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/HsToCore/Coverage.hs
- compiler/GHC/Iface/Tidy.hs
- compiler/GHC/Linker/Deps.hs
- compiler/GHC/Linker/Loader.hs
- compiler/GHC/Parser/String.hs
- compiler/GHC/StgToCmm.hs
- compiler/GHC/StgToCmm/Config.hs
- compiler/GHC/StgToCmm/Hpc.hs
- compiler/GHC/Unit/Module/Graph.hs
- compiler/GHC/Unit/Module/ModGuts.hs
- compiler/ghc.cabal.in
- docs/users_guide/exts/multiline_strings.rst
- docs/users_guide/exts/type_abstractions.rst
- libraries/ghc-internal/src/GHC/Internal/Exception.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle/FD.hs
- rts/Linker.c
- testsuite/driver/testlib.py
- + testsuite/tests/bytecode/T25510/Makefile
- + testsuite/tests/bytecode/T25510/T25510A.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e25afd6e05a0fd4ade7f6223cf790b53878dbfb2...3a4d58e25cb1fd0c33f6c7dab7235b7a715a9492

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e25afd6e05a0fd4ade7f6223cf790b53878dbfb2...3a4d58e25cb1fd0c33f6c7dab7235b7a715a9492
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/20241122/9c054237/attachment.html>


More information about the ghc-commits mailing list