[Git][ghc/ghc][wip/T24634-oneshot-bytecode] 22 commits: testsuite: Delay querying ghc-pkg to find .so dirs until test is run

Torsten Schmits (@torsten.schmits) gitlab at gitlab.haskell.org
Mon Jul 29 12:43:23 UTC 2024



Torsten Schmits pushed to branch wip/T24634-oneshot-bytecode at Glasgow Haskell Compiler / GHC


Commits:
bace981e by Matthew Pickering at 2024-07-19T10:14:02-04:00
testsuite: Delay querying ghc-pkg to find .so dirs until test is run

The tests which relied on find_so would fail when `test` was run
before the tree was built. This was because `find_so` was evaluated too
eagerly.

We can fix this by waiting to query the location of the libraries until
after the compiler has built them.

- - - - -
478de1ab by Torsten Schmits at 2024-07-19T10:14:37-04:00
Add `complete` pragmas for backwards compat patsyns `ModLocation` and `ModIface`

!12347 and !12582 introduced breaking changes to these two constructors
and mitigated that with pattern synonyms.

- - - - -
b57792a8 by Matthew Pickering at 2024-07-19T10:15:13-04:00
ci: Fix ghcup-metadata generation (again)

I made some mistakes in 203830065b81fe29003c1640a354f11661ffc604

* Syntax error
* The aarch-deb11 bindist doesn't exist

I tested against the latest nightly pipeline locally:

```
nix run .gitlab/generate-ci#generate-job-metadata
nix shell -f .gitlab/rel_eng/ -c ghcup-metadata --pipeline-id 98286 --version 9.11.20240715 --fragment --date 2024-07-17 --metadata=/tmp/meta
```

- - - - -
1fa35b64 by Andreas Klebinger at 2024-07-19T17:35:20+02:00
Revert "Allow non-absolute values for bootstrap GHC variable"

This broke configure in subtle ways resulting in #25076 where hadrian
didn't end up the boot compiler it was configured to use.

This reverts commit 209d09f52363b261b900cf042934ae1e81e2caa7.

- - - - -
55117e13 by Simon Peyton Jones at 2024-07-24T02:41:12-04:00
Fix bad bug in mkSynonymTyCon, re forgetfulness

As #25094 showed, the previous tests for forgetfulness was
plain wrong, when there was a forgetful synonym in the RHS
of a synonym.

- - - - -
a8362630 by Sergey Vinokurov at 2024-07-24T12:22:45-04:00
Define Eq1, Ord1, Show1 and Read1 instances for basic Generic representation types

This way the Generically1 newtype could be used to derive Eq1 and Ord1
for user types with DerivingVia.

The CLC proposal is https://github.com/haskell/core-libraries-committee/issues/273.

The GHC issue is https://gitlab.haskell.org/ghc/ghc/-/issues/24312.

- - - - -
de5d9852 by Simon Peyton Jones at 2024-07-24T12:23:22-04:00
Address #25055, by disabling case-of-runRW# in Gentle phase

See Note [Case-of-case and full laziness]
in GHC.Driver.Config.Core.Opt.Simplify

- - - - -
3f89ab92 by Andreas Klebinger at 2024-07-25T14:12:54+02:00
Fix -freg-graphs for FP and AARch64 NCG (#24941).

It seems we reserve 8 registers instead of four for global regs
based on the layout in Note [AArch64 Register assignments].

I'm not sure it's neccesary, but for now we just accept this state of
affairs and simple update -fregs-graph to account for this.

- - - - -
f6b4c1c9 by Simon Peyton Jones at 2024-07-27T09:45:44-04:00
Fix nasty bug in occurrence analyser

As #25096 showed, the occurrence analyser was getting one-shot info
flat out wrong.

This commit does two things:

* It fixes the bug and actually makes the code a bit tidier too.
  The work is done in the new function
     GHC.Core.Opt.OccurAnal.mkRhsOccEnv,
  especially the bit that prepares the `occ_one_shots` for the RHS.

  See Note [The OccEnv for a right hand side]

* When floating out a binding we must be conservative about one-shot
  info.  But we were zapping the entire demand info, whereas we only
  really need zap the /top level/ cardinality.

  See Note [Floatifying demand info when floating]
  in GHC.Core.Opt.SetLevels

For some reason there is a 2.2% improvement in compile-time allocation
for CoOpt_Read.  Otherwise nickels and dimes.

Metric Decrease:
    CoOpt_Read

- - - - -
646ee207 by Torsten Schmits at 2024-07-27T09:46:20-04:00
add missing cell in flavours table

- - - - -
ec2eafdb by Ben Gamari at 2024-07-28T20:51:12+02:00
users-guide: Drop mention of dead __PARALLEL_HASKELL__ macro

This has not existed for over a decade.

- - - - -
e2f2a56e by Arnaud Spiwack at 2024-07-28T22:21:07-04:00
Add tests for 25081

- - - - -
23f50640 by Arnaud Spiwack at 2024-07-28T22:21:07-04:00
Scale multiplicity in list comprehension

Fixes #25081

- - - - -
eb7bec5e by Cheng Shao at 2024-07-29T14:43:11+02:00
compiler: always generate dynamic stub objects when generating bytecode

When foreign stub objects are compiled during bytecode generation
(e.g. when using whole core bindings), ensure they are dynamic so they
can be properly loaded.

- - - - -
022f398b by Cheng Shao at 2024-07-29T14:43:11+02:00
compiler: generate stub objects before writing iface

This commit promotes foreign stub compilation a bit earlier before we
actually write iface, to make it possible to actually serialize them
into the final iface when compiling with
`-fwrite-if-simplified-core`. Also ensures dynamic stub objects are
generated if we're compiling with `-fwrite-if-simplified-core`.

- - - - -
18f16947 by Cheng Shao at 2024-07-29T14:43:11+02:00
compiler: add mi_stub_objs to ModIface

This commit adds the mi_stub_objs field to ModIface, representing
serialized foreign stub dynamic objects that can be reloaded later
when compiling a downstream module with `-fprefer-byte-code` that
loads whole core bindings from an upstream module that requires
foreign stubs, see #24634 for such an example.

- - - - -
27c4425a by Cheng Shao at 2024-07-29T14:43:11+02:00
compiler: serialize foreign stub dynamic objects in interface file when compiling with -fwrite-if-simplified-core

This commit makes the compiler serialize foreign stub dynamic objects
in mi_stub_objs when compiling with -fwrite-if-simplified-core. This
is needed when we compile a downstream module with -fprefer-byte-code,
in which case we want to make use of whole core bindings in upstream
modules instead of having to load their dynamic objects, but the
foreign stub information has been lost across different ghc
invocations previously. Hence the fix in this commit. See #24634 for
such an example.

- - - - -
25607288 by Cheng Shao at 2024-07-29T14:43:11+02:00
testsuite: fix T24634

This commit fixes T24634 and marks it as unbroken.

- - - - -
d81b690a by Cheng Shao at 2024-07-29T14:43:11+02:00
WIP: oneshot bytecode support

- - - - -
d611fb1d by Torsten Schmits at 2024-07-29T14:43:11+02:00
use the EPS type env when typechecking core bindings in oneshot mode

- - - - -
64eaa44d by Torsten Schmits at 2024-07-29T14:43:11+02:00
avoid case-insensitivity clobber in test

- - - - -
f6b3008c by Torsten Schmits at 2024-07-29T14:43:11+02:00
compile exe in test with core bindings to avoid recompilation of Hello

- - - - -


30 changed files:

- .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/CmmToAsm/AArch64/Regs.hs
- compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/SetLevels.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Driver/Config/Core/Opt/Simplify.hs
- compiler/GHC/Driver/Main.hs
- + compiler/GHC/Driver/Main.hs-boot
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Iface/Load.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Linker/Deps.hs
- compiler/GHC/Linker/Loader.hs
- compiler/GHC/Tc/Gen/Match.hs
- compiler/GHC/Types/Demand.hs
- compiler/GHC/Types/Id.hs
- compiler/GHC/Types/Id/Info.hs
- compiler/GHC/Unit/Module/Location.hs
- compiler/GHC/Unit/Module/ModIface.hs
- compiler/GHC/Utils/Outputable.hs
- configure.ac
- docs/users_guide/9.12.1-notes.rst


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4d5349bd5721aff30f0c2a1d76c622abb1e71247...f6b3008c5a6e84dc229a058ec0bf49b269477e7e

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4d5349bd5721aff30f0c2a1d76c622abb1e71247...f6b3008c5a6e84dc229a058ec0bf49b269477e7e
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/20240729/4588c66b/attachment-0001.html>


More information about the ghc-commits mailing list