[Git][ghc/ghc][wip/spj-unf-size] 59 commits: AArch64: Delete unused LDATA pseudo-instruction

Simon Peyton Jones (@simonpj) gitlab at gitlab.haskell.org
Fri Nov 17 17:36:21 UTC 2023



Simon Peyton Jones pushed to branch wip/spj-unf-size at Glasgow Haskell Compiler / GHC


Commits:
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

- - - - -
a7492048 by Alan Zimmerman at 2023-11-12T13:43:07+00:00
EPA: get rid of AnchorOperation

Now that the Anchor type is an alias for EpaLocation, remove
AnchorOperation.

Updates haddock submodule

- - - - -
0745c34d by Andrew Lelechenko at 2023-11-13T16:25:07-05:00
Add since annotation for showHFloat

- - - - -
e98051a5 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00
Suppress duplicate librares linker warning of new macOS linker

Fixes #24167

XCode 15 introduced a new linker which warns on duplicate libraries being
linked. To disable this warning, we pass -Wl,-no_warn_duplicate_libraries as
suggested by Brad King in CMake issue #25297.

This flag isn't necessarily available to other linkers on darwin, so we must
only configure it into the CC linker arguments if valid.

- - - - -
c411c431 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00
testsuite: Encoding test witnesses recent iconv bug is fragile

A regression in the new iconv() distributed with XCode 15 and MacOS
Sonoma causes the test 'encoding004' to fail in the CP936 roundrip.

We mark this test as fragile until this is fixed upstream (rather than
broken, since previous versions of iconv pass the test)

See #24161

- - - - -
ce7fe5a9 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00
testsuite: Update to LC_ALL=C no longer being ignored in darwin

MacOS seems to have fixed an issue where it used to ignore the variable
`LC_ALL` in program invocations and default to using Unicode.

Since the behaviour seems to be fixed to account for the locale
variable, we mark tests that were previously broken in spite of it as
fragile (since they now pass in recent macOS distributions)

See #24161

- - - - -
e6c803f7 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00
darwin: Fix single_module is obsolete warning

In XCode 15's linker, -single_module is the default and otherwise
passing it as a flag results in a warning being raised:

    ld: warning: -single_module is obsolete

This patch fixes this warning by, at configure time, determining whether
the linker supports -single_module (which is likely false for all
non-darwin linkers, and true for darwin linkers in previous versions of
macOS), and using that information at runtime to decide to pass or not
the flag in the invocation.

Fixes #24168

- - - - -
929ba2f9 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00
testsuite: Skip MultiLayerModulesTH_Make on darwin

The recent toolchain upgrade on darwin machines resulted in the
MultiLayerModulesTH_Make test metrics varying too much from the
baseline, ultimately blocking the CI pipelines.

This commit skips the test on darwin to temporarily avoid failures due
to the environment change in the runners. However, the metrics
divergence is being investigated still (tracked in #24177)

- - - - -
af261ccd by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00
configure: check target (not build) understands -no_compact_unwind

Previously, we were branching on whether the build system was darwin to
shortcut this check, but we really want to branch on whether the target
system (which is what we are configuring ld_prog for) is darwin.

- - - - -
2125c176 by Luite Stegeman at 2023-11-15T13:19:38-05:00
JS: Fix missing variable declarations

The JStg IR update was missing some local variable declarations
that were present earlier, causing global variables to be used
implicitly (or an error in JavaScript strict mode).

This adds the local variable declarations again.

- - - - -
99ced73b by Krzysztof Gogolewski at 2023-11-15T13:20:14-05:00
Remove loopy superclass solve mechanism

Programs with a -Wloopy-superclass-solve warning will now fail with an error.

Fixes #23017

- - - - -
2aff2361 by Zubin Duggal at 2023-11-15T13:20:50-05:00
users-guide: Fix links to libraries from the users-guide.

The unit-ids generated in c1a3ecde720b3bddc2c8616daaa06ee324e602ab include the
package name, so we don't need to explicitly add it to the links.

Fixes #24151

- - - - -
27981fac by Alan Zimmerman at 2023-11-15T13:21:25-05:00
EPA: splitLHsForAllTyInvis does not return ann

We did not use the annotations returned from splitLHsForAllTyInvis, so
do not return them.

- - - - -
a6467834 by Krzysztof Gogolewski at 2023-11-15T22:22:59-05:00
Document defaulting of RuntimeReps

Fixes #24099

- - - - -
2776920e by Simon Peyton Jones at 2023-11-15T22:23:35-05:00
Second fix to #24083

My earlier fix turns out to be too aggressive for data/type families

See wrinkle (DTV1) in Note [Disconnected type variables]

- - - - -
cee81370 by Sylvain Henry at 2023-11-16T09:57:46-05:00
Fix unusable units and module reexport interaction (#21097)

This commit fixes an issue with ModUnusable introduced in df0f148feae.

In mkUnusableModuleNameProvidersMap we traverse the list of unusable
units and generate ModUnusable origin for all the modules they contain:
exposed modules, hidden modules, and also re-exported modules. To do
this we have a two-level map:

  ModuleName -> Unit:ModuleName (aka Module) -> ModuleOrigin

So for each module name "M" in broken unit "u" we have:
  "M" -> u:M -> ModUnusable reason

However in the case of module reexports we were using the *target*
module as a key. E.g. if "u:M" is a reexport for "X" from unit "o":
   "M" -> o:X -> ModUnusable reason

Case 1: suppose a reexport without module renaming (u:M -> o:M) from
unusable unit u:
   "M" -> o:M -> ModUnusable reason

Here it's claiming that the import of M is unusable because a reexport
from u is unusable. But if unit o isn't unusable we could also have in
the map:
   "M" -> o:M -> ModOrigin ...

Issue: the Semigroup instance of ModuleOrigin doesn't handle the case
(ModUnusable <> ModOrigin)

Case 2: similarly we could have 2 unusable units reexporting the same module
without renaming, say (u:M -> o:M) and (v:M -> o:M) with u and v
unusable. It gives:

  "M" -> o:M -> ModUnusable ... (for u)
  "M" -> o:M -> ModUnusable ... (for v)

Issue: the Semigroup instance of ModuleOrigin doesn't handle the case
(ModUnusable <> ModUnusable).

This led to #21097, #16996, #11050.

To fix this, in this commit we make ModUnusable track whether the module
used as key is a reexport or not (for better error messages) and we use
the re-export module as key. E.g. if "u:M" is a reexport for "o:X" and u
is unusable, we now record:

    "M" -> u:M -> ModUnusable reason reexported=True

So now, we have two cases for a reexport u:M -> o:X:
   - u unusable: "M" -> u:M -> ModUnusable ... reexported=True
   - u usable:   "M" -> o:X -> ModOrigin   ... reexportedFrom=u:M

The second case is indexed with o:X because in this case the Semigroup
instance of ModOrigin is used to combine valid expositions of a module
(directly or via reexports).

Note that module lookup functions select usable modules first (those who
have a ModOrigin value), so it doesn't matter if we add new ModUnusable
entries in the map like this:

  "M" -> {
    u:M -> ModUnusable ... reexported=True
    o:M -> ModOrigin ...
  }

The ModOrigin one will be used. Only if there is no ModOrigin or
ModHidden entry will the ModUnusable error be printed. See T21097 for an
example printing several reasons why an import is unusable.

- - - - -
3e606230 by Krzysztof Gogolewski at 2023-11-16T09:58:22-05:00
Fix IPE test

A helper function was defined in a different module than used.
To reproduce: ./hadrian/build test --test-root-dirs=testsuite/tests/rts/ipe

- - - - -
49f5264b by Andreas Klebinger at 2023-11-16T20:52:11-05:00
Properly compute unpacked sizes for -funpack-small-strict-fields.

Use rep size rather than rep count to compute the size.

Fixes #22309

- - - - -
b4f84e4b by James Henri Haydon at 2023-11-16T20:52:53-05:00
Explicit methods for Alternative Compose

Explicitly define some and many in Alternative instance for
Data.Functor.Compose

Implementation of https://github.com/haskell/core-libraries-committee/issues/181

- - - - -
9bc0dd1f by Ignat Insarov at 2023-11-16T20:53:34-05:00
Add permutations for non-empty lists.

Approved by CLC in https://github.com/haskell/core-libraries-committee/issues/68#issuecomment-1221409837

- - - - -
5643ecf9 by Andrew Lelechenko at 2023-11-16T20:53:34-05:00
Update changelog and since annotations for Data.List.NonEmpty.permutations

Approved by CLC in https://github.com/haskell/core-libraries-committee/issues/68#issuecomment-1221409837

- - - - -
94ff2134 by Oleg Alexander at 2023-11-16T20:54:15-05:00
Update doc string for traceShow

Updated doc string for traceShow.

- - - - -
37642384 by Simon Peyton Jones at 2023-11-17T17:35:22+00:00
Work in progress on unfoldings re-engineering

- - - - -
77918531 by Simon Peyton Jones at 2023-11-17T17:35:22+00:00
More

- - - - -
4feecf3f by Simon Peyton Jones at 2023-11-17T17:35:22+00:00
More -- now it compiles

- - - - -
21883198 by Simon Peyton Jones at 2023-11-17T17:35:22+00:00
Wibbles

- - - - -
3ecb5608 by Simon Peyton Jones at 2023-11-17T17:35:22+00:00
Wibbles

- - - - -
45f42432 by Simon Peyton Jones at 2023-11-17T17:35:22+00:00
Wibbles

- - - - -
d29defb3 by Simon Peyton Jones at 2023-11-17T17:35:22+00:00
More wibbles

In particular, respect OtherCon

- - - - -
2c385bc4 by Simon Peyton Jones at 2023-11-17T17:35:22+00:00
oops remove spurious trace

- - - - -
ff0d0ff5 by Simon Peyton Jones at 2023-11-17T17:35:22+00:00
Value args only in ExprTrees

- - - - -
82c7f776 by Simon Peyton Jones at 2023-11-17T17:35:22+00:00
Another wibble

- - - - -
95d4e352 by Simon Peyton Jones at 2023-11-17T17:35:22+00:00
Be a little bit more eager

- - - - -
28a072c4 by Simon Peyton Jones at 2023-11-17T17:35:22+00:00
Comment out unused arg_is_free

- - - - -
71b6cfbe by Simon Peyton Jones at 2023-11-17T17:35:22+00:00
Fix scoping bug

- - - - -
a1f42379 by Simon Peyton Jones at 2023-11-17T17:35:22+00:00
Take care with void args

- - - - -
90b4cf36 by Simon Peyton Jones at 2023-11-17T17:35:22+00:00
Comments

- - - - -
88b781c3 by Simon Peyton Jones at 2023-11-17T17:35:22+00:00
Limit case width and depth

- - - - -
c4a1e7ad by Simon Peyton Jones at 2023-11-17T17:35:22+00:00
White space

- - - - -
a94af65c by Simon Peyton Jones at 2023-11-17T17:35:22+00:00
Simplify size calculations

- - - - -
cd36ad61 by Simon Peyton Jones at 2023-11-17T17:35:22+00:00
Fix egregious error

- - - - -
965e69bc by Simon Peyton Jones at 2023-11-17T17:35:23+00:00
Further improvements

* Fix threshold in SpecConstr
* Need to recurse in keptCaseSize

- - - - -
9a75f9ba by Simon Peyton Jones at 2023-11-17T17:35:23+00:00
More care with discounts and sizes

- - - - -
6d3cbf20 by Simon Peyton Jones at 2023-11-17T17:35:23+00:00
More improvements

Rename et_tot to et_wc_tot (for "worst case")

Fix size bug in etCaseOf

- - - - -
6eb60059 by Simon Peyton Jones at 2023-11-17T17:35:23+00:00
Bale out altogether on very wide cases

- - - - -
d5f9d6f6 by Simon Peyton Jones at 2023-11-17T17:35:23+00:00
Stupid typo

- - - - -
dff887d0 by Simon Peyton Jones at 2023-11-17T17:35:23+00:00
Wibble

- - - - -
ac56295a by Simon Peyton Jones at 2023-11-17T17:35:23+00:00
More improvements

Mainly doing the result-discounts as before.

Some skirmishing about dealing with knownCon.. more to come

- - - - -
d699af4e by Simon Peyton Jones at 2023-11-17T17:35:23+00:00
Fix a bad, subtle bug in exprIsConApp_maybe

In extend_in_scope We were simply overwriting useful bindings in the
in-scope set, notably ones that had unfoldings.  That could lead to
repeated simplifier iterations.

- - - - -
97ef5828 by Simon Peyton Jones at 2023-11-17T17:35:23+00:00
Minor refactoring...

Plus: don't be so eager to inline when argument is a non-value,
but has some struture.

We want *some* incentive though.

- - - - -
1660fd0c by Simon Peyton Jones at 2023-11-17T17:35:23+00:00
Wibbles

The significant one is a discount for arguments that have structure

- - - - -
03e04ef4 by Simon Peyton Jones at 2023-11-17T17:35:23+00:00
More wibbles

- - - - -
e6b8b200 by Simon Peyton Jones at 2023-11-17T17:35:23+00:00
Small updates

* Reduce unfolding-use-threshold to 80
* Make dfun applications look like value args

- - - - -
b62ff4ad by Simon Peyton Jones at 2023-11-17T17:35:23+00:00
Inline on structured arguments

- - - - -
244b0ff5 by Simon Peyton Jones at 2023-11-17T17:35:23+00:00
Further wibbles

Make unlifted cases cheaper

- - - - -
5e501ed2 by Simon Peyton Jones at 2023-11-17T17:35:23+00:00
Wibbles

- - - - -


29 changed files:

- compiler/GHC/Builtin/PrimOps.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Opt/LiberateCase.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/Pipeline.hs
- compiler/GHC/Core/Opt/Simplify/Env.hs
- compiler/GHC/Core/Opt/Simplify/Inline.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Ppr.hs
- compiler/GHC/Core/Seq.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/Subst.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Core/Unfold.hs
- compiler/GHC/Core/Unfold/Make.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/Driver/Config/Core/Opt/Simplify.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Iface/Errors/Ppr.hs
- compiler/GHC/Iface/Errors/Types.hs
- compiler/GHC/Linker/Dynamic.hs
- compiler/GHC/Parser.y


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c5b6bcc3e2cda086d2d98506a72709bba504c2e8...5e501ed27dfe1166817afa49c1fbb57ea7e41fd2

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c5b6bcc3e2cda086d2d98506a72709bba504c2e8...5e501ed27dfe1166817afa49c1fbb57ea7e41fd2
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/20231117/dacf576d/attachment-0001.html>


More information about the ghc-commits mailing list