[Git][ghc/ghc][wip/az/locateda-epa-improve-2023-03-27] 50 commits: compiler: Fingerprint more code generation flags

Alan Zimmerman (@alanz) gitlab at gitlab.haskell.org
Sat Jul 15 10:43:34 UTC 2023



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


Commits:
d1c92bf3 by Ben Gamari at 2023-07-11T08:07:02-04:00
compiler: Fingerprint more code generation flags

Previously our recompilation check was quite inconsistent in its
coverage of non-optimisation code generation flags. Specifically, we
failed to account for most flags that would affect the behavior of
generated code in ways that might affect the result of a program's
execution (e.g. `-feager-blackholing`, `-fstrict-dicts`)

Closes #23369.

- - - - -
eb623149 by Ben Gamari at 2023-07-11T08:07:02-04:00
compiler: Record original thunk info tables on stack

Here we introduce a new code generation option, `-forig-thunk-info`,
which ensures that an `stg_orig_thunk_info` frame is pushed before every
update frame. This can be invaluable when debugging thunk cycles and
similar.

See Note [Original thunk info table frames] for details.

Closes #23255.

- - - - -
4731f44e by Jaro Reinders at 2023-07-11T08:07:40-04:00
Fix wrong MIN_VERSION_GLASGOW_HASKELL macros

I forgot to change these after rebasing.

- - - - -
dd38aca9 by Andreas Schwab at 2023-07-11T13:55:56+00:00
Hadrian: enable GHCi support on riscv64

- - - - -
09a5c6cc by Josh Meredith at 2023-07-12T11:25:13-04:00
JavaScript: support unicode code points > 2^16 in toJSString using String.fromCodePoint (#23628)

- - - - -
29fbbd4e by Matthew Pickering at 2023-07-12T11:25:49-04:00
Remove references to make build system in mk/build.mk

Fixes #23636

- - - - -
630e3026 by sheaf at 2023-07-12T11:26:43-04:00
Valid hole fits: don't panic on a Given

The function GHC.Tc.Errors.validHoleFits would end up panicking when
encountering a Given constraint. To fix this, it suffices to filter out
the Givens before continuing.

Fixes #22684

- - - - -
c39f279b by Matthew Pickering at 2023-07-12T23:18:38-04:00
Use deb10 for i386 bindists

deb9 is now EOL so it's time to upgrade the i386 bindist to use deb10

Fixes #23585

- - - - -
bf9b9de0 by Krzysztof Gogolewski at 2023-07-12T23:19:15-04:00
Fix #23567, a specializer bug

Found by Simon in https://gitlab.haskell.org/ghc/ghc/-/issues/23567#note_507834

The testcase isn't ideal because it doesn't detect the bug in master,
unless doNotUnbox is removed as in
https://gitlab.haskell.org/ghc/ghc/-/issues/23567#note_507692.
But I have confirmed that with that modification, it fails before
and passes afterwards.

- - - - -
84c1a4a2 by Bartłomiej Cieślar at 2023-07-12T23:20:08-04:00
Comments

- - - - -
b2846cb5 by Bartłomiej Cieślar at 2023-07-12T23:20:08-04:00
updates to comments

- - - - -
2af23f0e by Bartłomiej Cieślar at 2023-07-12T23:20:08-04:00
changes

- - - - -
6143838a by sheaf at 2023-07-13T08:02:17-04:00
Fix deprecation of record fields

Commit 3f374399 inadvertently broke the deprecation/warning mechanism
for record fields due to its introduction of record field namespaces.

This patch ensures that, when a top-level deprecation is applied to
an identifier, it applies to all the record fields as well.
This is achieved by refactoring GHC.Rename.Env.lookupLocalTcNames, and
GHC.Rename.Env.lookupBindGroupOcc, to not look up a fixed number of
NameSpaces but to look up all NameSpaces and filter out the irrelevant
ones.

- - - - -
6fd8f566 by sheaf at 2023-07-13T08:02:17-04:00
Introduce greInfo, greParent

These are simple helper functions that wrap the internal
field names gre_info, gre_par.

- - - - -
7f0a86ed by sheaf at 2023-07-13T08:02:17-04:00
Refactor lookupGRE_... functions

This commit consolidates all the logic for looking up something in
the Global Reader Environment into the single function lookupGRE.
This allows us to declaratively specify all the different modes of
looking up in the GlobalRdrEnv, and avoids manually passing around
filtering functions as was the case in e.g. the function
GHC.Rename.Env.lookupSubBndrOcc_helper.

-------------------------
Metric Decrease:
    T8095
-------------------------
-------------------------
Metric Increase:
    T8095
-------------------------

- - - - -
5e951395 by Rodrigo Mesquita at 2023-07-13T08:02:54-04:00
configure: Drop DllWrap command

We used to configure into settings a DllWrap command for windows
builds and distributions, however, we no longer do, and dllwrap is
effectively unused.

This simplification is motivated in part by the larger
toolchain-selection project (#19877, !9263)

- - - - -
e10556b6 by Teo Camarasu at 2023-07-14T16:28:46-04:00
base: fix haddock syntax in GHC.Profiling

- - - - -
0f3fda81 by Matthew Pickering at 2023-07-14T16:29:23-04:00
Revert "CI: add JS release and debug builds, regen CI jobs"

This reverts commit 59c5fe1d4b624423b1c37891710f2757bb58d6af.

This commit added two duplicate jobs on all validate pipelines, so we
are reverting for now whilst we work out what the best way forward is.

Ticket #23618

- - - - -
54bca324 by Alan Zimmerman at 2023-07-15T03:23:26-04:00
EPA: Simplify GHC/Parser.y sLL

Follow up to !10743

- - - - -
c8863828 by sheaf at 2023-07-15T03:24:06-04:00
Configure: canonicalise PythonCmd on Windows

This change makes PythonCmd resolve to a canonical absolute path on
Windows, which prevents HLS getting confused (now that we have a
build-time dependency on python).

fixes #23652

- - - - -
ca1e636a by Rodrigo Mesquita at 2023-07-15T03:24:42-04:00
Improve Note [Binder-swap during float-out]

- - - - -
56828c5b by Alan Zimmerman at 2023-07-15T09:45:01+01:00
EPA: Store leading AnnSemi for decllist in al_rest

This simplifies the markAnnListA implementation in ExactPrint

- - - - -
6acf2ec6 by Alan Zimmerman at 2023-07-15T09:59:02+01:00
EPA: Improve annotation management in getMonoBind

Ensure the LHsDecl for a FunBind has the correct leading comments and
trailing annotations.

See the added note for details.

- - - - -
a94f6428 by Alan Zimmerman at 2023-07-15T10:00:11+01:00
EPA: Simplify GHC/Parser.y sL1

This is the next patch in a series simplifying location management in
GHC/Parser.y

This one simplifies sL1, to use the HasLoc instances introduced in
!10743 (closed)

- - - - -
4bd01449 by Alan Zimmerman at 2023-07-15T10:03:59+01:00
EPA: Simplify GHC/Parser.y comb2

Use the HasLoc instance from Ast.hs to allow comb2 to work with
anything with a SrcSpan

This gets rid of the custom comb2A, comb2Al, comb2N functions, and
removes various reLoc calls.

- - - - -
5a688a14 by Alan Zimmerman at 2023-07-15T10:05:13+01:00
Put BufSpan into RealSrcSpan

This has been superseded by !9473, which moved BufSpan into EpaSpan in
EpaLocation

Start on making LocatedN more direct

Using EpaLocation instead of Anchor

Via a synonym initially, to prove the concept

Variants of AnnSortKey

For future, just a list of which type comes next.
Example for ValBinds

EPA: Explicitly capture EOF Location in AnnsModule

And also get rid of EpaEofComment.

- - - - -
73af5abb by Alan Zimmerman at 2023-07-15T10:05:17+01:00
[EPA] Simplify noAnnSrcSpanDP0

- - - - -
c079291b by Alan Zimmerman at 2023-07-15T10:05:17+01:00
EPA: Provide correct annotation span for ImportDecl

Use the whole declaration, rather than just the span of the 'import'
keyword.

- - - - -
2e1c0c7e by Alan Zimmerman at 2023-07-15T10:05:17+01:00
EPA: Fix span for GRHS

- - - - -
b27b2d27 by Alan Zimmerman at 2023-07-15T10:05:17+01:00
EPA: Fix span for Located Context

- - - - -
3e297a2b by Alan Zimmerman at 2023-07-15T10:05:17+01:00
EPA: Widen anchor when adding a trailingAnn

- - - - -
db78062b by Alan Zimmerman at 2023-07-15T10:05:17+01:00
EPA: widen more TrailingAnn usages

- - - - -
bc3ab26f by Alan Zimmerman at 2023-07-15T10:05:17+01:00
EPA: Capture full range for a CaseAlt Match

- - - - -
eef22411 by Alan Zimmerman at 2023-07-15T10:05:17+01:00
Clean up addTrailingCommaN

Remove unused parameter

- - - - -
d04ac5fe by Alan Zimmerman at 2023-07-15T10:05:17+01:00
WIP

- - - - -
773fa5cc by Alan Zimmerman at 2023-07-15T10:05:17+01:00
Fixup after rebase

- - - - -
2effbf49 by Alan Zimmerman at 2023-07-15T10:05:17+01:00
[EPA] Introduce HasTrailing in ExactPrint

Just plumbed through, not being used yet

- - - - -
6a63ede7 by Alan Zimmerman at 2023-07-15T10:05:17+01:00
EPA use [TrailingAnn] in enterAnn

And remove it from ExactPrint (LocatedN RdrName)

- - - - -
9d2a9b12 by Alan Zimmerman at 2023-07-15T10:05:18+01:00
EPA Use full range for Anchor, and do not widen for [TrailingAnn]

- - - - -
de1732df by Alan Zimmerman at 2023-07-15T10:05:18+01:00
EPA: Move TrailingAnns from last match to FunBind

- - - - -
eb5f6f2e by Alan Zimmerman at 2023-07-15T10:05:18+01:00
EPA: In HsDo, put TrailingAnns at top of LastStmt

- - - - -
18f65b60 by Alan Zimmerman at 2023-07-15T10:05:18+01:00
EPA: More extending anchors to full span in Parser.y

- - - - -
b11aff96 by Alan Zimmerman at 2023-07-15T10:05:18+01:00
EPA: Move TrailingAnns to the top of FieldOcc

- - - - -
a80254b6 by Alan Zimmerman at 2023-07-15T10:05:18+01:00
EPA: Fix simple tests

- - - - -
c0aabfb2 by Alan Zimmerman at 2023-07-15T10:05:18+01:00
EPA: do not convert comments to deltas when balancing.

It seems its not needed with the new approach

- - - - -
955a3125 by Alan Zimmerman at 2023-07-15T10:05:18+01:00
EPA: Improve annotation management in getMonoBind

Ensure the LHsDecl for a FunBind has the correct leading comments and
trailing annotations.

See the added note for details.

- - - - -
ee9ecde4 by Alan Zimmerman at 2023-07-15T10:05:18+01:00
EPA: deal with fallout from getMonoBind

- - - - -
3eb57884 by Alan Zimmerman at 2023-07-15T10:05:18+01:00
EPA fix captureLineSpacing

- - - - -
a2aed54d by Alan Zimmerman at 2023-07-15T10:05:18+01:00
EPA print any comments in the span before exiting it

- - - - -
63cb29c6 by Alan Zimmerman at 2023-07-15T10:05:18+01:00
EPA: getting rid of tweakDelta

WIP at present

- - - - -


30 changed files:

- .gitlab-ci.yml
- .gitlab/ci.sh
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py
- .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Core/Opt/SetLevels.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Data/BooleanFormula.hs
- compiler/GHC/Data/FastString.hs
- compiler/GHC/Driver/Config/StgToCmm.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Session.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/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/Expr.hs
- compiler/GHC/HsToCore/Match/Literal.hs
- compiler/GHC/HsToCore/Monad.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/HsToCore/Ticks.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5e64ea9abbd847d5eedaa90a982b42fac0a9b711...63cb29c6118445b0342a2c21c72ca76cbd97d3ac

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5e64ea9abbd847d5eedaa90a982b42fac0a9b711...63cb29c6118445b0342a2c21c72ca76cbd97d3ac
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/20230715/1664e72b/attachment-0001.html>


More information about the ghc-commits mailing list