[Git][ghc/ghc][wip/az/locateda-epa-improve-2023-07-15] 24 commits: Create specially-solved DataToTag class

Alan Zimmerman (@alanz) gitlab at gitlab.haskell.org
Sun Nov 12 18:48:37 UTC 2023



Alan Zimmerman pushed to branch wip/az/locateda-epa-improve-2023-07-15 at Glasgow Haskell Compiler / GHC


Commits:
455524a2 by Matthew Craven at 2023-11-09T08:41:59-05:00
Create specially-solved DataToTag class

Closes #20532. This implements CLC proposal 104:
  https://github.com/haskell/core-libraries-committee/issues/104

The design is explained in Note [DataToTag overview]
in GHC.Tc.Instance.Class. This replaces the existing
`dataToTag#` primop.

These metric changes are not "real"; they represent Unique-related
flukes triggering on a different set of jobs than they did previously.
See also #19414.

Metric Decrease:
    T13386
    T8095
Metric Increase:
    T13386
    T8095

Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com>

- - - - -
a05f4554 by Alan Zimmerman at 2023-11-09T08:42:35-05:00
EPA: get rid of glRR and friends in GHC/Parser.y

With the HasLoc and HasAnnotation classes, we can replace a
number of type-specific helper functions in the parser with
polymorphic ones instead

Metric Decrease:
    MultiLayerModulesTH_Make

- - - - -
18498538 by Cheng Shao at 2023-11-09T16:58:12+00:00
ci: bump ci-images for wasi-sdk upgrade

- - - - -
52c0fc69 by PHO at 2023-11-09T19:16:22-05:00
Don't assume the current locale is *.UTF-8, set the encoding explicitly

primops.txt contains Unicode characters:
> LC_ALL=C ./genprimopcode --data-decl < ./primops.txt
> genprimopcode: <stdin>: hGetContents: invalid argument (cannot decode byte sequence starting from 226)

Hadrian must also avoid using readFile' to read primops.txt because it
tries to decode the file with a locale-specific encoding.

- - - - -
7233b3b1 by PHO at 2023-11-09T19:17:01-05:00
Use '[' instead of '[[' because the latter is a Bash-ism

It doesn't work on platforms where /bin/sh is something other than Bash.

- - - - -
6dbab180 by Simon Peyton Jones at 2023-11-09T19:17:36-05:00
Add an extra check in kcCheckDeclHeader_sig

Fix #24083 by checking for a implicitly-scoped type variable that is not
actually bound.  See Note [Disconnected type variables] in GHC.Tc.Gen.HsType

For some reason, on aarch64-darwin we saw a 2.8% decrease in compiler
allocations for MultiLayerModulesTH_Make; but 0.0% on other architectures.

Metric Decrease:
    MultiLayerModulesTH_Make

- - - - -
22551364 by Sven Tennie at 2023-11-11T06:35:22-05:00
AArch64: Delete unused LDATA pseudo-instruction

Though there were consuming functions for LDATA, there were no
producers. Thus, the removed code was "dead".

- - - - -
2a0ec8eb by Alan Zimmerman at 2023-11-11T06:35:59-05:00
EPA: harmonise acsa and acsA in GHC/Parser.y

With the HasLoc class, we can remove the acsa helper function,
using acsA instead.

- - - - -
7ae517a0 by Teo Camarasu at 2023-11-12T08:04:12-05:00
nofib: bump submodule

This includes changes that:
- fix building a benchmark with HEAD
- remove a Makefile-ism that causes errors in bash scripts

Resolves #24178

- - - - -
3f0036ec by Alan Zimmerman at 2023-11-12T08:04:47-05:00
EPA: Replace Anchor with EpaLocation

An Anchor has a location and an operation, which is either that it is
unchanged or that it has moved with a DeltaPos

    data Anchor = Anchor { anchor :: RealSrcSpan
                         , anchor_op :: AnchorOperation }

An EpaLocation also has either a location or a DeltaPos

    data EpaLocation = EpaSpan !RealSrcSpan !(Strict.Maybe BufSpan)
                     | EpaDelta !DeltaPos ![LEpaComment]

Now that we do not care about always having a location in the anchor,
we remove Anchor and replace it with EpaLocation

We do this with a type alias initially, to ease the transition.
The alias will be removed in time.

We also have helpers to reconstruct the AnchorOperation from an
EpaLocation. This is also temporary.

Updates Haddock submodule

- - - - -
57c4b9d6 by Alan Zimmerman at 2023-11-12T13:08:49+00:00
EPA: get rid of AnchorOperation

[2023-09-21 Thu]
Only error is
  HsDocTy

- - - - -
0c84f3af by Alan Zimmerman at 2023-11-12T13:09:21+00:00
EPA: splitLHsForAllTyInvis no ann returned

- - - - -
0fd65e35 by Alan Zimmerman at 2023-11-12T18:37:04+00:00
EPA: Replace Monoid with NoAnn

[2023-08-19 Sat]
AddClassMethod fails

- - - - -
ba3d552a by Alan Zimmerman at 2023-11-12T18:37:04+00:00
EPA: Use SrcSpan in EpaSpan

[2023-09-04 Mon]
No errors or warnings in check-exact

[2023-09-21 Thu]
Test failures
   HsDocTy

- - - - -
ad9519cb by Alan Zimmerman at 2023-11-12T18:37:04+00:00
EPA: Present no longer has annotation

- - - - -
e27fa24b by Alan Zimmerman at 2023-11-12T18:37:04+00:00
EPA: empty tup_tail has no ann

Parser.y: tup_tail rule was
          | {- empty -} %shift   { return [Left noAnn] }

This means we add an extra Missing constructor if the last item was a comma.

Change the annotation type to a Bool to indicate this, and use the
EpAnn Anchor for the print location for the others.

- - - - -
861573de by Alan Zimmerman at 2023-11-12T18:37:05+00:00
EPA: Remove parenthesizeHsType

- - - - -
72754a70 by Alan Zimmerman at 2023-11-12T18:37:05+00:00
EPA: Remove EpAnnNotUsed

[2023-10-01 Sun]
Failures
  HsDocTy
  T15242

- - - - -
ba4157b2 by Alan Zimmerman at 2023-11-12T18:37:05+00:00
EPA: Remove SrcSpanAnn

[2023-10-12 Thu]
  Failures
    HsDocTy
    T15242

- - - - -
337597fc by Alan Zimmerman at 2023-11-12T18:37:05+00:00
EPA: Remove SrcSpanAnn completely

- - - - -
1e8dceef by Alan Zimmerman at 2023-11-12T18:37:05+00:00
Clean up mkScope

- - - - -
86c22e61 by Alan Zimmerman at 2023-11-12T18:37:05+00:00
EPA: Clean up TC Monad Utils

- - - - -
af93972e by Alan Zimmerman at 2023-11-12T18:37:05+00:00
EPA: EpaDelta for comment has no comments

[2023-09-23 Sat]
Current failures
   HsDocTy
   T15242

- - - - -
d62bfc30 by Alan Zimmerman at 2023-11-12T18:37:06+00:00
Semigroup instances for AnnList and AnnContext

- - - - -


30 changed files:

- .gitlab-ci.yml
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/PrimOps.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/Core/FamInstEnv.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/Hs.hs
- compiler/GHC/Hs/Binds.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Dump.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Extension.hs
- compiler/GHC/Hs/ImpExp.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Arrows.hs
- compiler/GHC/HsToCore/Docs.hs
- compiler/GHC/HsToCore/Monad.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Ext/Utils.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e94b94dfc15619d32f54af8e4ebe22d2b183ee28...d62bfc30467db227ba0849b46828f4c5dddde4bc

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e94b94dfc15619d32f54af8e4ebe22d2b183ee28...d62bfc30467db227ba0849b46828f4c5dddde4bc
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/20231112/fbd05db8/attachment-0001.html>


More information about the ghc-commits mailing list