[Git][ghc/ghc][wip/ncg-simd] 58 commits: Fix a QuickLook bug

sheaf (@sheaf) gitlab at gitlab.haskell.org
Sat Jun 15 15:33:18 UTC 2024



sheaf pushed to branch wip/ncg-simd at Glasgow Haskell Compiler / GHC


Commits:
2747cd34 by Simon Peyton Jones at 2024-06-12T12:51:37-04:00
Fix a QuickLook bug

This MR fixes the bug exposed by #24676.  The problem was that
quickLookArg was trying to avoid calling tcInstFun unnecessarily; but
it was in fact necessary.  But that in turn forced me into a
significant refactoring, putting more fields into EValArgQL.

Highlights: see Note [Quick Look overview] in GHC.Tc.Gen.App

* Instantiation variables are now distinguishable from ordinary
  unification variables, by level number = QLInstVar. This is
  treated like "level infinity".  See Note [The QLInstVar TcLevel]
  in GHC.Tc.Utils.TcType.

* In `tcApp`, we don't track the instantiation variables in a set Delta
  any more; instead, we just tell them apart by their level number.

* EValArgQL now much more clearly captures the "half-done" state
  of typechecking an argument, ready for later resumption.
  See Note [Quick Look at value arguments] in GHC.Tc.Gen.App

* Elminated a bogus (never used) fast-path in
  GHC.Tc.Utils.Instantiate.instCallConstraints
  See Note [Possible fast path for equality constraints]

Many other small refactorings.

- - - - -
1b1523b1 by George Thomas at 2024-06-12T12:52:18-04:00
Fix non-compiling extensible record `HasField` example
- - - - -
97b141a3 by Zubin Duggal at 2024-06-12T12:52:55-04:00
haddock: Fix hyperlinker source urls (#24907)

This fixes a bug introduced by f56838c36235febb224107fa62334ebfe9941aba Links to
external modules in the hyperlinker are uniformly generated using splicing the
template given to us instead of attempting to construct the url in an ad-hoc manner.

- - - - -
954f864c by Zubin Duggal at 2024-06-12T12:52:55-04:00
haddock: Add name anchor to external source urls from documentation page

URLs for external source links from documentation pages were missing a splice
location for the name.

Fixes #24912

- - - - -
b0b64177 by Simon Peyton Jones at 2024-06-12T12:53:31-04:00
Prioritise nominal equalities

The main payload of this patch is

* Prioritise nominal equalities in the constraint solver. This
  ameliorates the incompleteness of solving for representational
  constraints over newtypes: see #24887.

   See (EX2) in Note [Decomposing newtype equalities] in
   GHC.Tc.Solver.Equality

In doing this patch I tripped over some other things that I refactored:

* Move `isCoVarType` from `GHC.Core.Type` to `GHC.Core.Predicate`
  where it seems more at home.

* Clarify the "rewrite role" of a constraint.  I was very puzzled
  about what the role of, say `(Eq a)` might be, but see the new
  Note [The rewrite-role of a constraint].

  In doing so I made predTypeEqRel crash when given a non-equality.
  Usually it expects an equality; but it was being mis-used for
  the above rewrite-role stuff.

- - - - -
cb7c1b83 by Liam Goodacre at 2024-06-12T12:54:09-04:00
compiler: missing-deriving-strategies suggested fix

Extends the missing-deriving-strategies warning with a suggested fix
that includes which deriving strategies were assumed.

For info about the warning, see comments for
`TcRnNoDerivStratSpecified`, `TcRnNoDerivingClauseStrategySpecified`, &
`TcRnNoStandaloneDerivingStrategySpecified`.

For info about the suggested fix, see
`SuggestExplicitDerivingClauseStrategies` &
`SuggestExplicitStandalanoDerivingStrategy`.

docs: Rewords missing-deriving-strategies to mention the suggested fix.

Resolves #24955

- - - - -
4e36d3a3 by Jan Hrček at 2024-06-12T12:54:48-04:00
Further haddocks improvements in Language.Haskell.Syntax.Pat.Pat

- - - - -
558353f4 by Cheng Shao at 2024-06-12T12:55:24-04:00
rts: use page sized mblocks on wasm

This patch changes mblock size to page size on wasm. It allows us to
simplify our wasi-libc fork, makes it much easier to test third party
libc allocators like emmalloc/mimalloc, as well as experimenting with
threaded RTS in wasm.

- - - - -
b3cc5366 by Matthew Pickering at 2024-06-12T23:06:57-04:00
compiler: Make ghc-experimental not wired in

If you need to wire in definitions, then place them in ghc-internal and
reexport them from ghc-experimental.

Ticket #24903

- - - - -
700eeab9 by Hécate Kleidukos at 2024-06-12T23:07:37-04:00
base: Use a more appropriate unicode arrow for the ByteArray diagram

This commit rectifies the usage of a unicode arrow in favour of one that
doesn't provoke mis-alignment.

- - - - -
cca7de25 by Matthew Pickering at 2024-06-12T23:08:14-04:00
ghcup-metadata: Fix debian version ranges

This was caught by `ghcup-ci` failing and attempting to install a deb12
bindist on deb11.

```
configure: WARNING: m4/prep_target_file.m4: Expecting YES/NO but got  in ArSupportsDashL_STAGE0. Defaulting to False.
bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by bin/ghc-toolchain-bin)
bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so)
bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so)
```

Fixes #24974

- - - - -
7b23ce8b by Pierre Le Marre at 2024-06-13T15:35:04-04:00
ucd2haskell: remove Streamly dependency + misc

- Remove dead code.
- Remove `streamly` dependency.
- Process files with `bytestring`.
- Replace Unicode files parsers with the corresponding ones from the
  package `unicode-data-parser`.
- Simplify cabal file and rename module
- Regenerate `ghc-internal` Unicode files with new header

- - - - -
4570319f by Jacco Krijnen at 2024-06-13T15:35:41-04:00
Document how to run haddocks tests (#24976)

Also remove ghc 9.7 requirement

- - - - -
fb629e24 by amesgen at 2024-06-14T00:28:20-04:00
compiler: refactor lower_CmmExpr_Ptr

- - - - -
def46c8c by amesgen at 2024-06-14T00:28:20-04:00
compiler: handle CmmRegOff in lower_CmmExpr_Ptr

- - - - -
ce76bf78 by Simon Peyton Jones at 2024-06-14T00:28:56-04:00
Small documentation update in Quick Look

- - - - -
19bcfc9b by Simon Peyton Jones at 2024-06-14T14:44:19-04:00
Add hack for #24623

..Th bug in #24623 is randomly triggered by this MR!..

- - - - -
7a08a025 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00
Various fixes to type-tidying

This MR was triggered by #24868, but I found a number of bugs
and infelicities in type-tidying as I went along.  Highlights:

* Fix to #24868 is in GHC.Tc.Errors.report_unsolved: avoid
  using the OccNames of /bound/ variables when tidying /free/
  variables; see the call to `tidyAvoiding`.  That avoid the
  gratuitous renaming which was the cause of #24868. See
     Note [tidyAvoiding] in GHC.Core.TyCo.Tidy

* Refactor and document the tidying of open types.
  See GHC.Core.TyCo.Tidy
     Note [Tidying open types]
     Note [Tidying is idempotent]

* Tidy the coercion variable in HoleCo. That's important so
  that tidied types have tidied kinds.

* Some small renaming to make things consistent.  In particular
  the "X" forms return a new TidyEnv.  E.g.
     tidyOpenType  :: TidyEnv -> Type -> Type
     tidyOpenTypeX :: TidyEnv -> Type -> (TidyEnv, Type)

- - - - -
2eac0288 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00
Wibble

- - - - -
e5d24cc2 by Simon Peyton Jones at 2024-06-14T14:44:20-04:00
Wibbles

- - - - -
246bc3a4 by Simon Peyton Jones at 2024-06-14T14:44:56-04:00
Localise a case-binder in SpecConstr.mkSeqs

This small change fixes #24944

See (SCF1) in Note [SpecConstr and strict fields]

- - - - -
a5994380 by Sylvain Henry at 2024-06-15T03:20:29-04:00
PPC: display foreign label in panic message (cf #23969)

- - - - -
bd95553a by Rodrigo Mesquita at 2024-06-15T03:21:06-04:00
cmm: Parse MO_BSwap primitive operation

Parsing this operation allows it to be tested using `test-primops` in a
subsequent MR.

- - - - -
15dc097c by sheaf at 2024-06-15T10:54:35+02:00
Rebase of first attempt of NCG SIMD support

This commit contains most of the changes from the commit:

  Add support for SIMD operations in the NCG

    This adds support for constructing vector types from Float#, Double# etc
    and performing arithmetic operations on them

This commit is meant to serve as a base from which to figure out
register allocation issues.

- - - - -
b625b251 by sheaf at 2024-06-15T10:54:35+02:00
Add QuickCheck-like test for SIMD operations

- - - - -
2128fed2 by sheaf at 2024-06-15T10:54:35+02:00
SIMD NCG: add stack spilling test

- - - - -
4f57cdbb by sheaf at 2024-06-15T10:54:35+02:00
SIMD NCG: fix pack & insert for DoubleX2

- - - - -
179fec9f by sheaf at 2024-06-15T10:54:35+02:00
SIMD NCG WIP: fix stack spilling

- - - - -
d2f88396 by sheaf at 2024-06-15T10:54:35+02:00
SIMD NCG: accept simd006

- - - - -
16f74f1d by sheaf at 2024-06-15T10:54:35+02:00
WIP: fix mkSpillInstr/mkLoadInstr panics

- - - - -
34ca88fb by sheaf at 2024-06-15T10:54:36+02:00
improve RegClass

- - - - -
e37a497e by sheaf at 2024-06-15T10:54:36+02:00
set up basics for AArch64 SIMD

- - - - -
fe37c01f by sheaf at 2024-06-15T10:54:36+02:00
use MOVU instructions for spill/unspill

- - - - -
a8c0c7f8 by sheaf at 2024-06-15T10:54:36+02:00
WIP: start adding vector shuffle primops

- - - - -
9348b7b5 by sheaf at 2024-06-15T10:54:36+02:00
remove redundant code in CmmToAsm/PPC/Instr

- - - - -
b8776883 by sheaf at 2024-06-15T10:54:36+02:00
emit ymm/zmm when appropriate

- - - - -
a1569cd8 by sheaf at 2024-06-15T10:54:36+02:00
fix reg2reg for vectors

- - - - -
e32e1f98 by sheaf at 2024-06-15T10:54:36+02:00
WIP: lower vector shuffle instruction on X86

- - - - -
50e263ac by sheaf at 2024-06-15T10:54:37+02:00
NCG SIMD: fix shuffle lowering

- - - - -
d20d5a5c by sheaf at 2024-06-15T10:54:37+02:00
slight improvement to vector unpack

- - - - -
14cac3df by sheaf at 2024-06-15T10:54:37+02:00
fix whitespace

- - - - -
a98460b7 by sheaf at 2024-06-15T10:54:37+02:00
fix regUsageOfInstr INSERTPS

- - - - -
8569e03f by Jaro Reinders at 2024-06-15T10:54:37+02:00
Add Int64X2 SIMD operations

- - - - -
f0162997 by sheaf at 2024-06-15T10:54:37+02:00
SIMD: need LLVM for Aarch64/PPC (for now)

- - - - -
16f04126 by sheaf at 2024-06-15T10:54:37+02:00
fixup Jaro

- - - - -
f6373450 by sheaf at 2024-06-15T10:54:37+02:00
fixup: shuffle base exports

- - - - -
0b7d6da4 by sheaf at 2024-06-15T10:54:37+02:00
improve cgrun083

- - - - -
af98820d by sheaf at 2024-06-15T10:54:37+02:00
move SIMD tests

- - - - -
9a379ac0 by sheaf at 2024-06-15T10:54:38+02:00
TODO: MOV stuff

- - - - -
c9900fb0 by sheaf at 2024-06-15T10:54:38+02:00
X86 NCG SIMD: refactoring

- - - - -
cf7b246a by sheaf at 2024-06-15T10:54:38+02:00
SIMD tests: fixup

- - - - -
e0164e1d by sheaf at 2024-06-15T10:54:38+02:00
fix X86 takeRegRegMove

- - - - -
a695af5f by sheaf at 2024-06-15T10:54:38+02:00
SIMD: add vector FMA primops

- - - - -
f8440fb3 by sheaf at 2024-06-15T10:54:39+02:00
SIMD: cleanup

- - - - -
8bbff8d2 by sheaf at 2024-06-15T10:54:39+02:00
WIP: improve broadcast, especially on LLVM

- - - - -
fb48978d by sheaf at 2024-06-15T10:54:39+02:00
more tidying

- - - - -
81fa6e17 by sheaf at 2024-06-15T16:21:22+02:00
SIMD: refactor Format datatype

- - - - -
baa104c6 by sheaf at 2024-06-15T17:32:35+02:00
Introduce RegFormat instead of using (Reg, Format)

- - - - -


30 changed files:

- .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Cmm/CallConv.hs
- compiler/GHC/Cmm/MachOp.hs
- compiler/GHC/Cmm/Opt.hs
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/Cmm/Reg.hs
- compiler/GHC/CmmToAsm.hs
- compiler/GHC/CmmToAsm/AArch64.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Regs.hs
- compiler/GHC/CmmToAsm/Config.hs
- compiler/GHC/CmmToAsm/Format.hs
- compiler/GHC/CmmToAsm/Instr.hs
- compiler/GHC/CmmToAsm/PPC.hs
- compiler/GHC/CmmToAsm/PPC/CodeGen.hs
- compiler/GHC/CmmToAsm/PPC/Instr.hs
- compiler/GHC/CmmToAsm/PPC/Ppr.hs
- compiler/GHC/CmmToAsm/PPC/Regs.hs
- compiler/GHC/CmmToAsm/Reg/Graph.hs
- compiler/GHC/CmmToAsm/Reg/Graph/Coalesce.hs
- compiler/GHC/CmmToAsm/Reg/Graph/Spill.hs
- compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs
- compiler/GHC/CmmToAsm/Reg/Graph/SpillCost.hs
- compiler/GHC/CmmToAsm/Reg/Graph/Stats.hs
- compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs
- compiler/GHC/CmmToAsm/Reg/Linear.hs
- compiler/GHC/CmmToAsm/Reg/Linear/AArch64.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d565519c80be8d180ec6cfd19fc81947ba1999a0...baa104c6ba96284ecc96eb82eb0f8581abb65b84

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d565519c80be8d180ec6cfd19fc81947ba1999a0...baa104c6ba96284ecc96eb82eb0f8581abb65b84
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/20240615/8a2aa217/attachment-0001.html>


More information about the ghc-commits mailing list