[Git][ghc/ghc][wip/T23070-dicts] 28 commits: rts: Ensure non-moving gc is not running when pausing

Simon Peyton Jones (@simonpj) gitlab at gitlab.haskell.org
Sat May 13 23:21:09 UTC 2023



Simon Peyton Jones pushed to branch wip/T23070-dicts at Glasgow Haskell Compiler / GHC


Commits:
aa84cff4 by Teo Camarasu at 2023-05-12T19:27:23-04:00
rts: Ensure non-moving gc is not running when pausing

- - - - -
5ad776ab by Teo Camarasu at 2023-05-12T19:27:23-04:00
rts: Teach listAllBlocks about nonmoving heap

List all blocks on the non-moving heap.

Resolves #22627

- - - - -
d683b2e5 by Krzysztof Gogolewski at 2023-05-12T19:28:00-04:00
Fix coercion optimisation for SelCo (#23362)

setNominalRole_maybe is supposed to output a nominal coercion.
In the SelCo case, it was not updating the stored role to Nominal,
causing #23362.

- - - - -
59aa4676 by Alexis King at 2023-05-12T19:28:47-04:00
hadrian: Fix linker script flag for MergeObjects builder

This fixes what appears to have been a typo in !9530. The `-t` flag just
enables tracing on all versions of `ld` I’ve looked at, while `-T` is
used to specify a linker script. It seems that this worked anyway for
some reason on some `ld` implementations (perhaps because they
automatically detect linker scripts), but the missing `-T` argument
causes `gold` to complain.

- - - - -
4bf9fa0f by Adam Gundry at 2023-05-12T23:49:49-04:00
Less coercion optimization for non-newtype axioms

See Note [Push transitivity inside newtype axioms only] for an explanation
of the change here.  This change substantially improves the performance of
coercion optimization for programs involving transitive type family reductions.

-------------------------
Metric Decrease:
    CoOpt_Singletons
    LargeRecord
    T12227
    T12545
    T13386
    T15703
    T5030
    T8095
-------------------------

- - - - -
dc0c9574 by Adam Gundry at 2023-05-12T23:49:49-04:00
Move checkAxInstCo to GHC.Core.Lint

A consequence of the previous change is that checkAxInstCo is no longer
called during coercion optimization, so it can be moved back where it belongs.

Also includes some edits to Note [Conflict checking with AxiomInstCo] as
suggested by @simonpj.

- - - - -
8b9b7dbc by Simon Peyton Jones at 2023-05-12T23:50:25-04:00
Use the eager unifier in the constraint solver

This patch continues the refactoring of the constraint solver
described in #23070.

The Big Deal in this patch is to call the regular, eager unifier from the
constraint solver, when we want to create new equalities. This
replaces the existing, unifyWanted which amounted to
yet-another-unifier, so it reduces duplication of a rather subtle
piece of technology. See

  * Note [The eager unifier] in GHC.Tc.Utils.Unify
  * GHC.Tc.Solver.Monad.wrapUnifierTcS

I did lots of other refactoring along the way

* I simplified the treatment of right hand sides that contain CoercionHoles.
  Now, a constraint that contains a hetero-kind CoercionHole is non-canonical,
  and cannot be used for rewriting or unification alike.  This required me
  to add the ch_hertero_kind flag to CoercionHole, with consequent knock-on
  effects. See wrinkle (2) of `Note [Equalities with incompatible kinds]` in
  GHC.Tc.Solver.Equality.

* I refactored the StopOrContinue type to add StartAgain, so that after a
  fundep improvement (for example) we can simply start the pipeline again.

* I got rid of the unpleasant (and inefficient) rewriterSetFromType/Co functions.
  With Richard I concluded that they are never needed.

* I discovered Wrinkle (W1) in Note [Wanteds rewrite Wanteds] in
  GHC.Tc.Types.Constraint, and therefore now prioritise non-rewritten equalities.

Quite a few error messages change, I think always for the better.

Compiler runtime stays about the same, with one outlier: a 17% improvement in T17836

Metric Decrease:
    T17836
    T18223

- - - - -
5cad28e7 by Bartłomiej Cieślar at 2023-05-12T23:51:06-04:00
Cleanup of dynflags override in export renaming
The deprecation warnings are normally emitted whenever the name's GRE is being looked up, which calls the GHC.Rename.Env.addUsedGRE function. We do not want those warnings to be emitted when renaming export lists, so they are artificially turned off by removing all warning categories from DynFlags at the beginning of GHC.Tc.Gen.Export.rnExports. This commit removes that dependency by unifying the function used for GRE lookup in lookup_ie to lookupGreAvailRn and disabling the call to addUsedGRE in said function (the warnings are also disabled in a call to lookupSubBndrOcc_helper in lookupChildrenExport), as per #17957. This commit also changes the setting for whether to warn about deprecated names in addUsedGREs to be an explicit enum instead of a boolean.

- - - - -
d85ed900 by Alexis King at 2023-05-13T08:45:18-04:00
Use a uniform return convention in bytecode for unary results

fixes #22958

- - - - -
8a0d45f7 by Bodigrim at 2023-05-13T08:45:58-04:00
Add more instances for Compose: Enum, Bounded, Num, Real, Integral

See https://github.com/haskell/core-libraries-committee/issues/160 for discussion

- - - - -
902f0730 by Simon Peyton Jones at 2023-05-13T14:58:34-04:00
Make GHC.Types.Id.Make.shouldUnpackTy a bit more clever

As #23307, GHC.Types.Id.Make.shouldUnpackTy was leaving money on the
table, failing to unpack arguments that are perfectly unpackable.

The fix is pretty easy; see Note [Recursive unboxing]

- - - - -
a5451438 by sheaf at 2023-05-13T14:59:13-04:00
Fix bad multiplicity role in tyConAppFunCo_maybe

The function tyConAppFunCo_maybe produces a multiplicity coercion
for the multiplicity argument of the function arrow, except that
it could be at the wrong role if asked to produce a representational
coercion. We fix this by using the 'funRole' function, which computes
the right roles for arguments to the function arrow TyCon.

Fixes #23386

- - - - -
085e7dff by Simon Peyton Jones at 2023-05-14T00:21:01+01:00
Add the SolverStage monad

This refactoring makes a substantial improvement in the
structure of GHC.Tc.Solver.Equality.

I also added the new type IrredCt (akin to EqCt).
Still to come: DictCt.

- - - - -
59a3e961 by Simon Peyton Jones at 2023-05-14T00:21:01+01:00
Further refactoring

In particular make the Irred pipeline one-stage

(Just the Dict pipeline is left)

- - - - -
dfc7f0fd by Simon Peyton Jones at 2023-05-14T00:21:01+01:00
Wibbles

- - - - -
977910bb by Simon Peyton Jones at 2023-05-14T00:21:01+01:00
Wibble2

- - - - -
7da35a17 by Simon Peyton Jones at 2023-05-14T00:21:02+01:00
Begin on the type-class pipeline

- - - - -
f1e190d6 by Simon Peyton Jones at 2023-05-14T00:21:02+01:00
Progress

- - - - -
54fb6e43 by Simon Peyton Jones at 2023-05-14T00:21:02+01:00
Wibbles

- - - - -
736400f7 by Simon Peyton Jones at 2023-05-14T00:21:02+01:00
Remove white space

- - - - -
b5aa4631 by Simon Peyton Jones at 2023-05-14T00:21:02+01:00
More progress

- - - - -
ba4b1aae by Simon Peyton Jones at 2023-05-14T00:21:02+01:00
More

- - - - -
33d50330 by Simon Peyton Jones at 2023-05-14T00:21:02+01:00
Add GHC.Tc.Solver.Solve

- - - - -
3bd1588c by Simon Peyton Jones at 2023-05-14T00:21:02+01:00
Fixes

- - - - -
a468972b by Simon Peyton Jones at 2023-05-14T00:21:02+01:00
Wibbles

- - - - -
b5fefe72 by Simon Peyton Jones at 2023-05-14T00:21:02+01:00
Fixes

- - - - -
70893d76 by Simon Peyton Jones at 2023-05-14T00:21:02+01:00
More wibbles

- - - - -
f2a4bc51 by Simon Peyton Jones at 2023-05-14T00:21:02+01:00
More fixes

- - - - -


30 changed files:

- compiler/GHC/Builtin/Types/Prim.hs
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/Instr.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Coercion.hs-boot
- compiler/GHC/Core/Coercion/Opt.hs
- compiler/GHC/Core/InstEnv.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Predicate.hs
- compiler/GHC/Core/Reduction.hs
- compiler/GHC/Core/TyCo/Compare.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/TyCo/Rep.hs-boot
- compiler/GHC/Core/TyCo/Subst.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Core/Unify.hs
- compiler/GHC/HsToCore.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/StgToByteCode.hs
- compiler/GHC/StgToCmm/Closure.hs
- compiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/HsType.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/278d5c57490b23439e71917919800f4a0fac9725...f2a4bc5126b726710e5cb625a5d6869a9f4229eb

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/278d5c57490b23439e71917919800f4a0fac9725...f2a4bc5126b726710e5cb625a5d6869a9f4229eb
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/20230513/00bd691a/attachment-0001.html>


More information about the ghc-commits mailing list