[Git][ghc/ghc][wip/T24359] 13 commits: ghc-experimental: expose GHC.RTS.Flags, GHC.Stats
Simon Peyton Jones (@simonpj)
gitlab at gitlab.haskell.org
Sat Nov 30 23:02:52 UTC 2024
Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC
Commits:
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.
- - - - -
15ef6212 by Simon Peyton Jones at 2024-11-30T23:02:42+00:00
Specialising expresions -- at last
This MR addresses #24359, which implements the GHC proposal 493 on SPECIALISE pragmas.
* The old code path (using SpecSig and SpecPrag) still exists.
* The new code path (using SpecSigE and SpecPragE) runs alongside it.
* All SPECIALISE pragmas are routed through the new code path, except
if you give multiple type sigs, when the old code path is still used.
* Main documentation: Note [Handling new-form SPECIALISE pragmas] in
GHC.Tc.Gen.Sig`
The Big Thing is to introduce
{-# SPECIALISE forall x. f @Int x True #-}
where you can give type arguments and value argument to specialise; and
you can quantify them with forall, just as in Rules.
I thought it was going to be pretty simple, but it was a Long, Long Saga.
Highlights
* Overview Note [Handling new-form SPECIALISE pragmas] in GHC.Tc.Gen.Sig
- New data constructor `SpecSigE` in data type `L.H.S.Binds.Sig`
- New data construtor `SpecPragE` in data type `GHC.Hs.Binds.TcSpecPrag`
- Renamer: uses `checkSpecESigShape` to decide which function to assocate the
SPECIALISE pragma with
- Some of the action is in `GHC.Tc.Gen.Sig.tcSpecPrag`
- The rest is in `GHC.HsToCore.Binds.dsSpec`
* All of GHC.Tc.Gen.Rule is moved into GHC.Tc.Gen.Sig, because the code is
very closely related.
* The forall'd binders for SPECIALISE are the same as those for a RULE, so I
refactored, introducing data type `L.H.S.Binds.RuleBndrs`, with functions
to rename, zonk, typecheck it.
This is not quite settled yet, I think.
* On the LHS of RULES, or SPECIALISE, we want to disable the tricky mechanims
described in Note [Desugaring non-canonical evidence] in GHC.HsToCore.Expr.
Previously it wasn't fully disabled (just set to the empty set), and that
didn't quite work in the new regime.
* There are knock-on changes to Template Haskell.
* For the LHS of a RULE and a SPECIALISE expression, I wanted to simplify
it /without/ inlining the let-bindings for evidence variables. I added
a flag `so_inline` to the SimpleOpt optimiser to support this. The
entry point is `GHC.Core.SimpleOpt.simpleOptExprNoInline`
* Since forever we have had a hack for type variables on the LHS of
RULES. I took the opportunity to tidy this up. The main action is
in the zonker. See GHC.Tc.Zonk.Type Note [Free tyvars on rule LHS],
and especially data construtor `SkolemiseFlexi`
in data type `GHC.Tc.Zonk.Env.ZonkFlexi`
* Move `scopedSort` from GHC.Core.TyCo.FVs to GHC.Core.Predicate
Reason: it now works for Ids as well, and I wanted to use isEvVar,
which is defined in GHC.Core.Predicate
Avoiding module loops meant that instead of exporting GHC.Core.TyCo.Tidy
from GHC.Core.Type, modules now import the former directly.
I also took the opportunity to remove unused exports
from GHC.Core.Type.hs-boot
- - - - -
30 changed files:
- .gitlab-ci.yml
- .gitlab/ci.sh
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Names/TH.hs
- compiler/GHC/Builtin/PrimOps/Ids.hs
- compiler/GHC/Cmm/Opt.hs
- compiler/GHC/CmmToLlvm.hs
- compiler/GHC/Core/FamInstEnv.hs
- compiler/GHC/Core/InstEnv.hs
- compiler/GHC/Core/Make.hs
- compiler/GHC/Core/Opt/CSE.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Predicate.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/Tidy.hs
- compiler/GHC/Core/TyCo/FVs.hs
- compiler/GHC/Core/TyCo/Ppr.hs
- compiler/GHC/Core/TyCo/Tidy.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Core/Type.hs-boot
- compiler/GHC/Core/Unify.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/Driver/Config.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Hs/Binds.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Instances.hs
- compiler/GHC/Hs/Stats.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4ddcf5ef2fb5ff38ae7851675042a6fe24426c39...15ef6212f4ca218ccc10a5886ab2ef8a3aa8571c
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4ddcf5ef2fb5ff38ae7851675042a6fe24426c39...15ef6212f4ca218ccc10a5886ab2ef8a3aa8571c
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/20241130/8d1bf75f/attachment-0001.html>
More information about the ghc-commits
mailing list