[Git][ghc/ghc][wip/T25281] 26 commits: EPA: Remove unused hsCaseAnnsRest

Simon Peyton Jones (@simonpj) gitlab at gitlab.haskell.org
Tue Oct 8 14:40:22 UTC 2024



Simon Peyton Jones pushed to branch wip/T25281 at Glasgow Haskell Compiler / GHC


Commits:
4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00
EPA: Remove unused hsCaseAnnsRest

We never populate it, so remove it.

- - - - -
5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00
rts: Fix invocation of __ieee_set_fp_control() on alpha-linux

Fixes the following error when building GHC on alpha-linux:

rts/posix/Signals.c: In function ‘initDefaultHandlers’:

rts/posix/Signals.c:709:5: error:
     error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration]
      709 |     ieee_set_fp_control(0);
          |     ^~~~~~~~~~~~~~~~~~~
    |
709 |     ieee_set_fp_control(0);
    |

- - - - -
c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00
Add changelog entries for !12479

- - - - -
bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00
javascript: Read fields of ObjectBlock lazily

When linking a module with a large dependency footprint too much of the
object files were forced during linking. This lead to a large amount of
memory taken up by thunks which would never be forced

On the PartialDownsweep test this halves the memory required (from 25G
to 13G).

Towards #25324

-------------------------
Metric Increase:
    size_hello_obj
-------------------------

- - - - -
571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00
ci: Run the i386 validation job when i386 label is set

This is helpful when making changes to base and must update the
javascript and i386 base exports files.

- - - - -
e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00
Rewrite partitionByWorkerSize to avoid pattern match checker bug

With `-g3` the pattern match checker would warn about these incomplete
patterns. This affects the debug_info builds on CI.

```
    Pattern match(es) are non-exhaustive
    In an equation for ‘go’:
        Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched:
            (_:_) _ _
     |
2514 |         go [] small warnings = (small, warnings)
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
```

Workaround for #25338

- - - - -
d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00
Remove the wrapper/coercion-passing logic for submultiplicity checks

Instead, we use a dedicated DelayedError, which is emitted
systematically on submultiplicity checks, but is suppressed if we can
indeed solve the submultiplicity constraint with a reflexivity
coercion.

This way, we don't have to return anything from `tcSubMult`, which now
looks like a regular constraint check, the rest is implementation
detail. This removes all of the strange boilerplate that I'd been
struggling with under the previous implementation. Even if
submultiplicity checks are not properly constraints, this way it's
contained entirely within a `WantedConstraint`. Much more pleasant.

Closes #25128.

- - - - -
1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00
AArch64: Implement switch/jump tables (#19912)

This improves the performance of Cmm switch statements (compared to a
chain of if statements.)

- - - - -
3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00
Fixes #25256, missing parens inside TH-printed pattern type signature

- - - - -
ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00
Better documentation for floatRange function

Closes #16479

- - - - -
ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00
Adjust progress message for hadrian to include cwd.

Fixes #25335

- - - - -
5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00
CCallConv test: Align argument types

The C calling convention / standard requires that arguments and their
values are of the same type.

- - - - -
c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00
hadrian: remove unused ghciWithDebugger field from flavour config

This patch removes the ghciWithDebugger field from flavour config
since it's actually not used anywhere.

- - - - -
9c9c790d by sheaf at 2024-10-07T19:27:23-04:00
user's guide: update docs for X86 CPU flags

This commit updates the section of the user's guide pertaining to
X86 feature flags with the following changes:

  - the NCG backend now supports SIMD, so remove all text
    that says the contrary,
  - the LLVM backend does not "automatically detect" features,
    so remove any text that makes that claim.

- - - - -
f579ec01 by Sebastian Graf at 2024-10-08T12:29:10+01:00
Desugaring, plus -Wincomplete-record-selectors

This commit does several related things:

* Major refactor of the handling of applications in the desugarer.
  Now all applications are handled in `dsApp`, `ds_app` and related
  functions.  This dramatically simplifies the code and removes
  complicated cruft that had accumulated.  Hooray.

  Fixes #25281.

* Improve the handling of -Wincomplete-record-selectors.

  We now incorporate the result type of unsaturated record selector
  applications as well as consider long-distance information in
  getField applications.

  Plus, the implmentation now builds the improved `dsApp` stuff
  above, so it is much easier to understand.

  Plus, incorporates improved error message wording suggested
  by Adam Gundry in !12685.

  Fixes #24824, #24891

  See the long Note [Detecting incomplete record selectors]

* Add -Wincomplete-record-selectors to -Wall, as specified in
  GHC Proposal 516.

  To do this, I also had to add -Wno-incomplete-record-selectors
  to the build flags for Cabal in GHC's CI.  See
  hadrian/src/Settings/Warnings.hs.  We can remove this when
  Cabal is updated so that it doesn't trigger the warning:
  https://github.com/haskell/cabal/issues/10402

2.6% decrease in compile time allocation in RecordUpPerf

Metric Decrease:
    RecordUpdPerf

- - - - -
13a38836 by Simon Peyton Jones at 2024-10-08T12:29:10+01:00
Elmininate incomplete record selectors

This patch is a pure refactor of GHC's source code, to avoid the use
of partial record selectors.  It was provoked by adding
-Wincomplete-record-selectors to -Wall (as the GHC Proposal specified),
which in turn showed up lots of places where GHC was using incomplete
record selectors.

This patch does mostly-simple refactoring to make it clear to the pattern
match checker that there is in fact no partiality.

There is one externally-visible change: I changed the data type HoleFit
to split out the two cases

  data HoleFit = TcHoleFit  TcHoleFit | RawHoleFit SDoc
  data TcHoleFit = HoleFit { ...lots of fields }

There are large swathes of code that just deal with `TcHoleFit`, and
having it as a separate data types makes it apparent that `RawHoleFit`
can't occur.

This makes it much better -- but the change is visible in the
HolePlugin interface.  I decided that there are so few clients of this
API that it's worth the change.

I moved several functions from Language.Haskell.Syntax to GHC.Hs.
Reason, when instantiated at (GhcPass _), the extension data construtcor
is guaranteed unused, and that justifies omitted patterns in these
functions.  By putting them in GHC.Hs.X I can specialise the type for
(GhcPass _) and thereby make the function total.

An interesting side-light is that there were a few local function
definitions without a type signature, like this one in GHC.Parser.Header
     convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i)
This is fully closed, and so is generalised; but that generalises
it to any old pass, not (GhcPass _), so GHC rightly complains about the
use of the selector `ideclPkgQual`.  I added a type signature to `i`, thus
     convImport (L _ (i::ImportDecl GhcPs))
         = (ideclPkgQual i, reLoc $ ideclName i)
which specialised the function enough to make the record selector complete.
Quite a surprising consequence of local let-generalisation!

- - - - -
e2130b2a by Simon Peyton Jones at 2024-10-08T12:29:10+01:00
Yet more

- - - - -
17e68471 by Simon Peyton Jones at 2024-10-08T12:29:10+01:00
One more

- - - - -
9209ca22 by Simon Peyton Jones at 2024-10-08T12:29:10+01:00
More

- - - - -
4658168a by Simon Peyton Jones at 2024-10-08T12:29:10+01:00
More

- - - - -
26035f4a by Simon Peyton Jones at 2024-10-08T12:29:10+01:00
Wibble

- - - - -
4497402c by Simon Peyton Jones at 2024-10-08T12:29:10+01:00
Wibble warning

- - - - -
4e99eebb by Simon Peyton Jones at 2024-10-08T12:29:10+01:00
Try again

- - - - -
4f503bef by Simon Peyton Jones at 2024-10-08T12:29:10+01:00
More

- - - - -
cec48035 by Simon Peyton Jones at 2024-10-08T15:39:43+01:00
Wibble nospec

- - - - -
e81f2e72 by Simon Peyton Jones at 2024-10-08T15:39:52+01:00
Wibble record selectors

- - - - -


30 changed files:

- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/CmmToAsm/Dwarf/Types.hs
- compiler/GHC/CmmToAsm/Reg/Graph/Stats.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/ConLike.hs
- compiler/GHC/Core/FVs.hs
- compiler/GHC/Core/LateCC/OverloadedCalls.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/CprAnal.hs
- compiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/Opt/Simplify/Env.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/Subst.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Hs/Binds.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Pat.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/cada7c27b8a6227999f586d877c2fe2e0730ef7a...e81f2e726dba3f28799e3aacd17f015c1ee2710d

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/cada7c27b8a6227999f586d877c2fe2e0730ef7a...e81f2e726dba3f28799e3aacd17f015c1ee2710d
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/20241008/b7b47cf9/attachment-0001.html>


More information about the ghc-commits mailing list