[Git][ghc/ghc][wip/andreask/prof_docs] 34 commits: driver: Always link against "base" package when one shot linking

Andreas Klebinger (@AndreasK) gitlab at gitlab.haskell.org
Thu Dec 5 14:23:02 UTC 2024



Andreas Klebinger pushed to branch wip/andreask/prof_docs at Glasgow Haskell Compiler / GHC


Commits:
7536181d by Matthew Pickering at 2024-11-25T14:00:07-05:00
driver: Always link against "base" package when one shot linking

The default value for base-unit-id is stored in the settings file.

At install time, this can be set by using the BASE_UNIT_ID environment
variable.

At runtime, the value can be set by `-base-unit-id` flag.

For whether all this is a good idea, see #25382

Fixes #25382

- - - - -
7f90f319 by Andreas Klebinger at 2024-11-25T14:00:44-05:00
Compacting GC: Handle black holes in large objects.

As #14497 showed black holes can appear inside large objects when
we capture a computation and later blackhole it like we do for AP_STACK
closures.

Fixes #24791

- - - - -
291388e1 by Cheng Shao at 2024-11-25T14:01:19-05:00
ci: minor nix-in-docker improvements

This patch makes some minor improvements re nix-in-docker logic in the
ci configuration:

- Update `nixos/nix` to the latest version
- Apply $CPUS to `cores`/`max-jobs` to avoid oversubscribing while
  allowing a reasonable degree of parallelism
- Remove redundant `--extra-experimental-features nix-command` in
  later `nix shell` invocations, it's already configured in
  `/etc/nix/nix.conf`

- - - - -
e684c406 by Cheng Shao at 2024-11-25T14:01:57-05:00
ci: avoid depending on stack job for test-bootstrap jobs

This patch makes test-bootstrap related ci jobs only depend on
hadrian-ghc-in-ghci job to finish, consistent with other jobs in the
full-build stage generated by gen_ci.hs. This allows the jobs to be
spawned earlier and improve overall pipeline parallelism.

- - - - -
caaf5388 by Simon Hengel at 2024-11-25T14:02:41-05:00
Refactoring: Remove `pSupportedExts` from `ParserOpts`

This is never used for lexing / parsing.  It is only used by
`GHC.Parser.Header.getOptions`.

- - - - -
41f8365c by Arnaud Spiwack at 2024-11-25T14:03:23-05:00
Add test for #25515

- - - - -
9279619f by Arnaud Spiwack at 2024-11-25T14:03:23-05:00
Desugar record notation with correct multiplicities

Simply uses the multiplicity as stored in the field. As I'm writing
this commit, the only possible multiplicity is 1, but !13525 is
changing this. It's actually easier to take !13525 into account.

Fixes #25515.

- - - - -
fcc3ae6e by Andreas Klebinger at 2024-11-26T08:24:58-05:00
Clarify INLINE unfolding optimization docs.

Fixes #24660

- - - - -
88c4fe1d by Cheng Shao at 2024-11-26T08:25:34-05:00
rts: remove -Wl,-U,___darwin_check_fd_set_overflow hack

This patch bumps macOS minimum SDK version to 11.0 for x86_64-darwin
to align it with aarch64-darwin. This allows us to get rid of the
horrible -Wl,-U,___darwin_check_fd_set_overflow hack, which is causing
linker warnings and testsuite failures on macOS 15. Fixes #25504.

- - - - -
53f978c0 by doyougnu at 2024-11-26T16:07:26-05:00
ghc-experimental: expose GHC.RTS.Flags, GHC.Stats

See this CLC proposal:

- https://github.com/haskell/core-libraries-committee/issues/289

and this CLC proposal for background:

- https://github.com/haskell/core-libraries-committee/issues/288

Metric Decrease:
    MultiLayerModulesTH_OneShot

- - - - -
e70d4140 by Wang Xin at 2024-11-26T16:08:10-05:00
Add -mcmodel=medium moduleflag to generated LLVM IR on LoongArch platform

With the Medium code model, the jump range of the generated jump
instruction is larger than that of the Small code model. It's a
temporary fix of the problem descriped in https://gitlab.haskell
.org/ghc/ghc/-/issues/25495. This commit requires that the LLVM
used contains the code of commit 9dd1d451d9719aa91b3bdd59c0c6679
83e1baf05, i.e., version 8.0 and later. Actually we should not
rely on LLVM, so the only way to solve this problem is to implement
the LoongArch backend.

Add new type for codemodel

- - - - -
df42ba16 by Andreas Klebinger at 2024-11-27T11:40:49-05:00
Cmm constant folding: Narrow results to operations bitwidth.

When constant folding ensure the result is still within bounds
for the given type by explicitly narrowing the results.

Not doing so results in a lot of spurious assembler warnings
especially when testing primops.

- - - - -
bf3db97e by Ben Gamari at 2024-11-27T11:41:26-05:00
ghc-toolchain: Introduce basic flag validation

We verify that required flags (currently `--output` and `--triple`) are
provided. The implementation is truly awful, but so is getopt.

Begins to address #25500.

- - - - -
a104508d by Ben Gamari at 2024-11-27T11:42:03-05:00
rts: Allow ExecPage to allocate anywhere in address space

Currently the ExecPage facility has two users:

 * GHCi, for constructing info tables, and
 * the adjustor allocation path

Despite neither of these have any spatial locality constraints ExecPage
was using the linker's `mmapAnonForLinker`, which tries hard to ensure
that mappings end up nearby the executable image. This makes adjustor
allocation needlessly subject to fragmentation concerns.

We now instead return less constrained mappings, improving the
robustness of the mechanism.

Addresses #25503.

- - - - -
c3fc9b86 by Ben Gamari at 2024-11-27T11:42:39-05:00
base: Fix incorrect mentions of GHC.Internal.Numeric

These were incorrectly changed by the automated refactoring of the
`ghc-internal` migration.

Fixes #25521.

- - - - -
a362b943 by sheaf at 2024-11-27T23:44:28-05:00
Add checkExact to toolTargets

This change means that the Hadrian multi target will include exactprint.
In particular, this means that HLS will work on exactprint inside the GHC tree.
- - - - -
e6c957e4 by Arnaud Spiwack at 2024-11-27T23:45:09-05:00
Add test for #25428

- - - - -
52d97f4e by Arnaud Spiwack at 2024-11-27T23:45:09-05:00
Don't bypass MonoLocalBind in empty patterns

Fixes #25428

- - - - -
7890f2d8 by Ben Gamari at 2024-11-28T10:26:46-05:00
hadrian: Bump directory bound to >=1.3.9

Earlier versions of `directory` are racy on Windows due to #24382.

Also includes necessary Hadrian bootstrap plan bump.

Fixes #24382.

- - - - -
0fd43ea6 by Adam Sandberg Ericsson at 2024-11-28T10:27:22-05:00
mention -Iw in +RTS -?
- - - - -
6cf579b9 by Ben Gamari at 2024-11-28T10:27:59-05:00
gitlab-ci: Set GIT_SUBMODULE_FORCE_HTTPS

GitLab recommends using `https://` to clone submodules and provides the
`GIT_SUBMODULE_FORCE_HTTPS` variable to force this.

Fixes #25528.

- - - - -
5b4774f9 by sheaf at 2024-12-03T15:22:07+01:00
Remove TcRnDeprecatedInvisTyArgInConPat mechanism

The combination of ScopedTypeVariables + TypeApplications now no longer
enables the use of type applications in constructor patterns, as per
GHC proposal #448.

This completes the deprecation that begun with GHC 9.8.

We also remove the -Wdeprecated-type-abstractions flag, which was
introduced in GHC 9.10.

- - - - -
f813c8d7 by sheaf at 2024-12-03T17:10:15-05:00
Hadrian: use / when making filepaths absolute

In Hadrian, we are careful to use -/- rather than </>, in order to use
/ instead of \ in filepaths. However, this gets ruined by the use of
makeAbsolute from System.Directory, which, on Windows, changes back
forward slashes to backslashes.

- - - - -
292ed74e by Ben Gamari at 2024-12-03T17:10:52-05:00
rts/linker: Fix out-of-bounds mapping logic

Previously the structure of `mmapInRegion` concealed a subtle bug
concerning handling of `mmap` returning mappings below the beginning of
the desired region. Specifically, we would reset `p = result + bytes`
and then again reset `p = region->start` before looping around for
another iteration. This resulted in an infinite loop on FreeBSD.

Fixes #25492.

- - - - -
20912f5b by Ben Gamari at 2024-12-03T17:10:52-05:00
rts/linker: Clarify debug output

- - - - -
f98b3ac0 by Simon Hengel at 2024-12-03T17:11:30-05:00
SysTools: Avoid race conditions when processing output (fixes #16450)

- - - - -
03851b64 by Rodrigo Mesquita at 2024-12-03T17:12:06-05:00
mg: Drop unnecessary HasCallStack

This HasCallStack was a debugging artifact from a previous commit.

- - - - -
01d213b5 by Rodrigo Mesquita at 2024-12-03T17:12:06-05:00
Improve haddock of graphReachabilityCyclic

- - - - -
f7cbffe2 by Rodrigo Mesquita at 2024-12-03T17:12:06-05:00
Refactor ModuleGraph interface

The 'ModuleGraph' abstraction represents the relationship and strucutre
of the modules being compiled. This structure is meant to be constructed
once at the start of compilation, and never changed again.

However, it's exposed interface was confusing and exposed too many
footguns which led to inneficient usages of the ModuleGraph. This commit
improves significantly the exported interface of ModuleGraph, taking
into consideration the recent improvements around reachability queries.

Since the ModuleGraph graphs and related structures (HPT, EPS) are
performance critical in the sense that somewhat simple mistakes can
cause bad leaks and non-linear memory usage, we want to have proper APIs
that guide efficient usage. This is a good step in that direction.

- - - - -
b69a7f3c by David Binder at 2024-12-04T18:37:42-05:00
Use consistent capitalization for "GHC Proposal" in user guide

- - - - -
18d9500d by David Binder at 2024-12-04T18:37:42-05:00
Fix reference to GHC proposal 193 in user guide

- - - - -
dd959406 by Ben Gamari at 2024-12-04T18:38:18-05:00
Revert "rts/Interpreter: Assert that TEST*_P discriminators are valid"

This assertion was based on the misconception that `GET_TAG` was
returning the pointer tag whereas it is actually returning the
constructor tag.

This reverts commit 9bf3663b9970851e7b5701d68147450272823197.

Fixes #25527.

- - - - -
cad6fede by Ben Gamari at 2024-12-04T18:38:54-05:00
rts/IOManager: Drop dead code

This assignment is dead code as it occurs after all branches have
returned. Moreover, it can't possibly be relevant since the "available"
branch already sets `flag`.

Potentially fixes #25542.

- - - - -
ac2e26e2 by Andreas Klebinger at 2024-12-05T15:03:20+01:00
Document `-prof` and non `-prof` code being incompatible.

Fixes #25518.

- - - - -


30 changed files:

- .gitlab-ci.yml
- .gitlab/ci.sh
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/hello.hs
- .gitlab/jobs.yaml
- compiler/GHC.hs
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Cmm/Opt.hs
- compiler/GHC/CmmToLlvm.hs
- compiler/GHC/Data/Graph/Directed/Reachability.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/Config/Parser.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Env.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Parser/HaddockLex.x
- compiler/GHC/Parser/Header.hs
- compiler/GHC/Parser/Lexer.x
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/Settings.hs
- compiler/GHC/Settings/IO.hs
- compiler/GHC/SysTools/Process.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Bind.hs
- compiler/GHC/Tc/Gen/Expr.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/45e900bee822f258001c24dbcd67b486fdeb964f...ac2e26e278ddffbbc8a08d7274dcfd0a40a30be5

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/45e900bee822f258001c24dbcd67b486fdeb964f...ac2e26e278ddffbbc8a08d7274dcfd0a40a30be5
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/20241205/f19b507d/attachment-0001.html>


More information about the ghc-commits mailing list