[Git][ghc/ghc][wip/torsten.schmits/parallel-depanal-downsweep] 106 commits: Bump array submodule

Sjoerd Visscher (@trac-sjoerd_visscher) gitlab at gitlab.haskell.org
Mon Sep 23 11:47:43 UTC 2024



Sjoerd Visscher pushed to branch wip/torsten.schmits/parallel-depanal-downsweep at Glasgow Haskell Compiler / GHC


Commits:
0f3d3bd6 by Sylvain Henry at 2024-06-30T00:47:40-04:00
Bump array submodule

- - - - -
354c350c by Sylvain Henry at 2024-06-30T00:47:40-04:00
GHCi: Don't use deprecated sizeofMutableByteArray#

- - - - -
35d65098 by Ben Gamari at 2024-06-30T00:47:40-04:00
primops: Undeprecate addr2Int# and int2Addr#

addr2Int# and int2Addr# were marked as deprecated with the introduction
of the OCaml code generator (1dfaee318171836b32f6b33a14231c69adfdef2f)
due to its use of tagged integers. However, this backend has long
vanished and `base` has all along been using `addr2Int#` in the Show
instance for Ptr.

While it's unlikely that we will have another backend which has tagged
integers, we may indeed support platforms which have tagged pointers.
Consequently we undeprecate the operations but warn the user that the
operations may not be portable.

- - - - -
3157d817 by Sylvain Henry at 2024-06-30T00:47:41-04:00
primops: Undeprecate par#

par# is still used in base and it's not clear how to replace it with
spark# (see #24825)

- - - - -
c8d5b959 by Ben Gamari at 2024-06-30T00:47:41-04:00
Primops: Make documentation generation more efficient

Previously we would do a linear search through all primop names, doing a
String comparison on the name of each when preparing the HsDocStringMap.
Fix this.

- - - - -
65165fe4 by Ben Gamari at 2024-06-30T00:47:41-04:00
primops: Ensure that deprecations are properly tracked

We previously failed to insert DEPRECATION pragmas into GHC.Prim's
ModIface, meaning that they would appear in the Haddock documentation
but not issue warnings. Fix this.

See #19629. Haddock also needs to be fixed: https://github.com/haskell/haddock/issues/223

Co-authored-by: Sylvain Henry <sylvain at haskus.fr>

- - - - -
bc1d435e by Mario Blažević at 2024-06-30T00:48:20-04:00
Improved pretty-printing of unboxed TH sums and tuples, fixes #24997

- - - - -
0d170eaf by Zubin Duggal at 2024-07-04T11:08:41-04:00
compiler: Turn `FinderCache` into a record of operations so that GHC API clients can
have full control over how its state is managed by overriding `hsc_FC`.

Also removes the `uncacheModule` function as this wasn't being used by anything
since 1893ba12fe1fa2ade35a62c336594afcd569736e

Fixes #23604

- - - - -
4664997d by Teo Camarasu at 2024-07-04T11:09:18-04:00
Add HasCallStack to T23221

This makes the test a bit easier to debug

- - - - -
66919dcc by Teo Camarasu at 2024-07-04T11:09:18-04:00
rts: use live words to estimate heap size

We use live words rather than live blocks to determine the size of the
heap for determining memory retention.

Most of the time these two metrics align, but they can come apart in
normal usage when using the nonmoving collector.

The nonmoving collector leads to a lot of partially occupied blocks. So,
using live words is more accurate.

They can also come apart when the heap is suffering from high levels
fragmentation caused by small pinned objects, but in this case, the
block size is the more accurate metric. Since this case is best avoided
anyway. It is ok to accept the trade-off that we might try (and
probably) fail to return more memory in this case.

See also the Note [Statistics for retaining memory]

Resolves #23397

- - - - -
8dfca66a by Oleg Grenrus at 2024-07-04T11:09:55-04:00
Add reflections of GHC.TypeLits/Nats type families

-------------------------
Metric Increase:
    ghc_experimental_dir
    ghc_experimental_so
-------------------------

- - - - -
6c469bd2 by Adam Gundry at 2024-07-04T11:10:33-04:00
Correct -Wpartial-fields warning to say "Definition" rather than "Use"

Fixes #24710.  The message and documentation for `-Wpartial-fields` were
misleading as (a) the warning occurs at definition sites rather than use
sites, and (b) the warning relates to the definition of a field independently
of the selector function (e.g. because record updates are also partial).

- - - - -
977b6b64 by Max Ulidtko at 2024-07-04T11:11:11-04:00
GHCi: Support local Prelude

Fixes #10920, an issue where GHCi bails out when started alongside a
file named Prelude.hs or Prelude.lhs (even empty file suffices).

The in-source Note [GHCi and local Preludes] documents core reasoning.

Supplementary changes:

 * add debug traces for module lookups under -ddump-if-trace;
 * drop stale comment in GHC.Iface.Load;
 * reduce noise in -v3 traces from GHC.Utils.TmpFs;
 * new test, which also exercizes HomeModError.

- - - - -
87cf4111 by Ryan Scott at 2024-07-04T11:11:47-04:00
Add missing gParPat in cvtp's ViewP case

When converting a `ViewP` using `cvtp`, we need to ensure that the view pattern
is parenthesized so that the resulting code will parse correctly when
roundtripped back through GHC's parser.

Fixes #24894.

- - - - -
b05613c5 by Adam Gundry at 2024-07-04T11:12:23-04:00
Use structured error representation for module cycle errors (see #18516)

This removes the re-export of cyclicModuleErr from the top-level GHC module.

- - - - -
70389749 by Adam Gundry at 2024-07-04T11:12:23-04:00
Use structured error representation when reloading a nonexistent module

- - - - -
680ade3d by sheaf at 2024-07-04T11:12:23-04:00
Use structured errors for a Backpack instantiation error

- - - - -
97c6d6de by sheaf at 2024-07-04T11:12:23-04:00
Move mkFileSrcSpan to GHC.Unit.Module.Location

- - - - -
f9e7bd9b by Adriaan Leijnse at 2024-07-04T11:12:59-04:00
ttg: Remove SourceText from OverloadedLabel

Progress towards #21592

- - - - -
00d63245 by Alexander Foremny at 2024-07-04T11:12:59-04:00
AST: GHC.Prelude -> Prelude

Refactor occurrences to GHC.Prelude with Prelude within
Language/Haskell.

Progress towards #21592

- - - - -
cc846ea5 by Alexander Foremny at 2024-07-04T11:12:59-04:00
AST: remove occurrences of GHC.Unit.Module.ModuleName

`GHC.Unit.Module` re-exports `ModuleName` from
`Language.Haskell.Syntax.Module.Name`.

Progress towards #21592

- - - - -
24c7d287 by Fabian Kirchner at 2024-07-04T11:12:59-04:00
AST: move Data instance definition for ModuleName to GHC.Unit.Types

To remove the dependency on GHC.Utils.Misc inside
Language.Haskell.Syntax.Module.Name, the instance definition is moved
from there into GHC.Unit.Types.

Progress towards #21592

- - - - -
6cbba381 by Fabian Kirchner at 2024-07-04T11:12:59-04:00
AST: move negateOverLitVal into GHC.Hs.Lit

The function negateOverLitVal is not used within Language.Haskell and
therefore can be moved to the respective module inside GHC.Hs.

Progress towards #21592

- - - - -
611aa7c6 by Fabian Kirchner at 2024-07-04T11:12:59-04:00
AST: move conDetailsArity into GHC.Rename.Module

The function conDetailsArity is only used inside GHC.Rename.Module.  We
therefore move it there from Language.Haskell.Syntax.Lit.

Progress towards #21592

- - - - -
1b968d16 by Mauricio at 2024-07-04T11:12:59-04:00
AST: Remove GHC.Utils.Assert from GHC

Simple cleanup.

Progress towards #21592

- - - - -
3d192e5d by Fabian Kirchner at 2024-07-04T11:12:59-04:00
ttg: extract Specificity, ForAllTyFlag and helper functions from GHC.Types.Var

Progress towards #21592

Specificity, ForAllTyFlag and its' helper functions are extracted from
GHC.Types.Var and moved into a new module Language.Haskell.Syntax.Specificity.

Note: Eventually (i.e. after Language.Haskell.Syntax.Decls does not depend on
GHC.* anymore) these should be moved into Language.Haskell.Syntax.Decls.
At this point, this would cause cyclic dependencies.

- - - - -
257d1adc by Adowrath at 2024-07-04T11:12:59-04:00
ttg: Split HsSrcBang, remove ref to DataCon from Syntax.Type

Progress towards #21592

This splits HsSrcBang up, creating the new HsBang within
`Language.Haskell.Syntax.Basic`. `HsBang` holds the unpackedness
and strictness information, while `HsSrcBang` only adds the SourceText
for usage within the compiler directly.

Inside the AST, to preserve the SourceText, it is hidden behind the
pre-existing extension point `XBindTy`. All other occurrences of
`HsSrcBang` were adapted to deconstruct the inner `HsBang`, and when
interacting with the `BindTy` constructor, the hidden `SourceText` is
extracted/inserted into the `XBindTy` extension point.

`GHC.Core.DataCon` exports both `HsSrcBang` and `HsBang` for
convenience. A constructor function `mkHsSrcBang` that takes all
individual components has been added.

Two exceptions has been made though:
- The `Outputable HsSrcBang` instance is replaced by
  `Outputable HsBang`. While being only GHC-internal, the only place
  it's used is in outputting `HsBangTy` constructors -- which already
  have `HsBang`. It wouldn't make sense to reconstruct a `HsSrcBang` just
  to ignore the `SourceText` anyway.
- The error `TcRnUnexpectedAnnotation` did not use the `SourceText`,
  so it too now only holds a `HsBang`.

- - - - -
24757fec by Mauricio at 2024-07-04T11:12:59-04:00
AST: Moved definitions that use GHC.Utils.Panic to GHC namespace

Progress towards #21592

- - - - -
9be49379 by Mike Pilgrem at 2024-07-04T11:13:41-04:00
Fix #25032 Refer to Cabal's `includes` field, not `include-files`

- - - - -
9e2ecf14 by Andrew Lelechenko at 2024-07-04T11:14:17-04:00
base: fix more missing changelog entries

- - - - -
a82121b3 by Peter Trommler at 2024-07-04T11:14:53-04:00
X86 NCG: Fix argument promotion in foreign C calls

Promote 8 bit and 16 bit signed arguments by sign extension.

Fixes #25018

- - - - -
fab13100 by Bryan Richter at 2024-07-04T11:15:29-04:00
Add .gitlab/README.md with creds instructions

- - - - -
564981bd by Matthew Pickering at 2024-07-05T07:35:29-04:00
configure: Set LD_STAGE0 appropiately when 9.10.1 is used as a boot compiler

In 9.10.1 the "ld command" has been removed, so we fall back to using
the more precise "merge objects command" when it's available as
LD_STAGE0 is only used to set the object merging command in hadrian.

Fixes #24949

- - - - -
a949c792 by Matthew Pickering at 2024-07-05T07:35:29-04:00
hadrian: Don't build ghci object files for ./hadrian/ghci target

There is some convoluted logic which determines whether we build ghci
object files are not. In any case, if you set `ghcDynPrograms = pure
False` then it forces them to be built.

Given we aren't ever building executables with this flavour it's fine
to leave `ghcDynPrograms` as the default and it should be a bit faster
to build less.

Also fixes #24949

- - - - -
48bd8f8e by Matthew Pickering at 2024-07-05T07:36:06-04:00
hadrian: Remove STG dump from ticky_ghc flavour transformer

This adds 10-15 minutes to build time, it is a better strategy to
precisely enable dumps for the modules which show up prominently in a
ticky profile.

Given I am one of the only people regularly building ticky compilers I
think it's worthwhile to remove these.

Fixes #23635

- - - - -
5b1aefb7 by Matthew Pickering at 2024-07-05T07:36:06-04:00
hadrian: Add dump_stg flavour transformer

This allows you to write `--flavour=default+ticky_ghc+dump_stg` if you
really want STG for all modules.

- - - - -
ab2b60b6 by Sven Tennie at 2024-07-08T15:03:41-04:00
AArch64: Simplify stmtToInstrs type

There's no need to hand `Nothing`s around... (there was no case with a
`BlockId`.)

- - - - -
71a7fa8c by Sven Tennie at 2024-07-08T15:03:41-04:00
AArch64: Simplify stmtsToInstrs type

The `BlockId` parameter (`bid`) is never used, only handed around.
Deleting it simplifies the surrounding code.

- - - - -
8bf6fd68 by Simon Peyton Jones at 2024-07-08T15:04:17-04:00
Fix eta-expansion in Prep

As #25033 showed, we were eta-expanding in a way that broke a join point,
which messed up Note [CorePrep invariants].

The fix is rather easy.  See Wrinkle (EA1) of
Note [Eta expansion of arguments in CorePrep]

- - - - -
96acf823 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00
One-shot Haddock

- - - - -
74ec4c06 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00
Remove haddock-stdout test option

Superseded by output handling of Hadrian

- - - - -
ed8a8f0b by Rodrigo Mesquita at 2024-07-09T06:16:51-04:00
ghc-boot: Relax Cabal bound

Fixes #25013

- - - - -
3f9548fe by Matthew Pickering at 2024-07-09T06:17:36-04:00
ci: Unset ALEX/HAPPY variables when testing bootstrap jobs

Ticket #24826 reports a regression in 9.10.1 when building from a source
distribution. This patch is an attempt to reproduce the issue on CI by
more aggressively removing `alex` and `happy` from the environment.

- - - - -
aba2c9d4 by Andrea Bedini at 2024-07-09T06:17:36-04:00
hadrian: Ignore build-tool-depends fields in cabal files

hadrian does not utilise the build-tool-depends fields in cabal files
and their presence can cause issues when building source distribution
(see #24826)

Ideally Cabal would support building "full" source distributions which
would remove the need for workarounds in hadrian but for now we can
patch the build-tool-depends out of the cabal files.

Fixes #24826

- - - - -
12bb9e7b by Matthew Pickering at 2024-07-09T06:18:12-04:00
testsuite: Don't attempt to link when checking whether a way is supported

It is sufficient to check that the simple test file compiles as it will
fail if there are not the relevant library files for the requested way.

If you break a way so badly that even a simple executable fails to link
(as I did for profiled dynamic way), it will just mean the tests for
that way are skipped on CI rather than displayed.

- - - - -
46ec0a8e by Torsten Schmits at 2024-07-09T13:37:02+02:00
Improve docs for NondecreasingIndentation

The text stated that this affects indentation of layouts nested in do
expressions, while it actually affects that of do layouts nested in any
other.

- - - - -
dddc9dff by Zubin Duggal at 2024-07-12T11:41:24-04:00
compiler: Fingerprint -fwrite-if-simplified-core

We need to recompile if this flag is changed because later modules might depend on the
simplified core for this module if -fprefer-bytecode is enabled.

Fixes #24656

- - - - -
145a6477 by Matthew Pickering at 2024-07-12T11:42:00-04:00
Add support for building profiled dynamic way

The main payload of this change is to hadrian.

* Default settings will produced dynamic profiled objects
* `-fexternal-interpreter` is turned on in some situations when there is
  an incompatibility between host GHC and the way attempting to be
  built.
* Very few changes actually needed to GHC

There are also necessary changes to the bootstrap plans to work with the
vendored Cabal dependency. These changes should ideally be reverted by
the next GHC release.

In hadrian support is added for building profiled dynamic libraries
(nothing too exciting to see there)

Updates hadrian to use a vendored Cabal submodule, it is important that
we replace this usage with a released version of Cabal library before
the 9.12 release.

Fixes #21594

-------------------------
Metric Increase:
    libdir
-------------------------

- - - - -
414a6950 by Matthew Pickering at 2024-07-12T11:42:00-04:00
testsuite: Make find_so regex more precise

The hash contains lowercase [a-z0-9] and crucially not _p which meant we
sometimes matched on `libHS.._p` profiled shared libraries rather than
the normal shared library.

- - - - -
dee035bf by Alex Mason at 2024-07-12T11:42:41-04:00
ncg(aarch64): Add fsqrt instruction, byteSwap primitives [#24956]

Implements the FSQRT machop using native assembly rather than a C call.

Implements MO_BSwap by producing assembly to do the byte swapping
instead of producing a foreign call a C function.

In `tar`, the hot loop for `deserialise` got almost 4x faster by
avoiding the foreign call which caused spilling live variables to the
stack -- this means the loop did 4x more memory read/writing than
necessary in that particular case!

- - - - -
5104ee61 by Sylvain Henry at 2024-07-12T11:43:23-04:00
Linker: use m32 allocator for sections when NEED_PLT (#24432)

Use M32 allocator to avoid fragmentation when allocating ELF sections.
We already did this when NEED_PLT was undefined. Failing to do this led
to relocations impossible to fulfil (#24432).

- - - - -
52d66984 by Sylvain Henry at 2024-07-12T11:43:23-04:00
RTS: allow M32 allocation outside of 4GB range when assuming -fPIC

- - - - -
c34fef56 by Sylvain Henry at 2024-07-12T11:43:23-04:00
Linker: fix stub offset

Remove unjustified +8 offset that leads to memory corruption (cf
discussion in #24432).

- - - - -
280e4bf5 by Simon Peyton Jones at 2024-07-12T11:43:59-04:00
Make type-equality on synonyms a bit faster

This MR make equality fast for (S tys1 `eqType` S tys2),
where S is a non-forgetful type synonym.

It doesn't affect compile-time allocation much, but then comparison doesn't
allocate anyway.  But it seems like a Good Thing anyway.

See Note [Comparing type synonyms] in GHC.Core.TyCo.Compare
and Note [Forgetful type synonyms] in GHC.Core.TyCon

Addresses #25009.

- - - - -
cb83c347 by Alan Zimmerman at 2024-07-12T11:44:35-04:00
EPA: Bring back SrcSpan in EpaDelta

When processing files in ghc-exactprint, the usual workflow is to
first normalise it with makeDeltaAst, and then operate on it.

But we need the original locations to operate on it, in terms of
finding things.

So restore the original SrcSpan for reference in EpaDelta

- - - - -
7bcda869 by Matthew Pickering at 2024-07-12T11:45:11-04:00
Update alpine release job to 3.20

alpine 3.20 was recently released and uses a new python and sphinx
toolchain which could be useful to test.

- - - - -
43aa99b8 by Matthew Pickering at 2024-07-12T11:45:11-04:00
testsuite: workaround bug in python-3.12

There is some unexplained change to binding behaviour in python-3.12
which requires moving this import from the top-level into the scope of
the function.

I didn't feel any particular desire to do a deep investigation as to why
this changed as the code works when modified like this. No one in the
python IRC channel seemed to know what the problem was.

- - - - -
e3914028 by Adam Sandberg Ericsson at 2024-07-12T11:45:47-04:00
initialise mmap_32bit_base during RTS startup #24847
- - - - -
86b8ecee by Hécate Kleidukos at 2024-07-12T11:46:27-04:00
haddock: Only fetch supported languages and extensions once per Interface list

This reduces the number of operations done on each Interface, because
supported languages and extensions are determined from architecture and
operating system of the build host. This information remains stable
across Interfaces, and as such doesn not need to be recovered for each
Interface.

- - - - -
f3bf7876 by Cheng Shao at 2024-07-12T10:16:24-07:00
Oneshot bytecode linking

- - - - -
7d129149 by Torsten Schmits at 2024-07-12T10:17:14-07:00
Package deps bytecode linking

- - - - -
0df7982d by Cheng Shao at 2024-07-17T11:22:03-07:00
driver: add -dep-json -opt-json flags to ghc -M

docs: document -dep-json -opt-json flags

Rework protocol

merge opt-json into dep-json

normalize source filenames

include more canonical variant of the package id

choose the main library when -package matches multiple units with the same version

allow specifying library deps with -package pkg:lib

OsString <-> FilePath change

- - - - -
76e97b66 by Cheng Shao at 2024-07-17T11:23:00-07:00
debug print

- - - - -
52562340 by Matthew Pickering at 2024-07-18T16:00:44-07:00
Run on test-abi label

- - - - -
a58642ef by Rodrigo Mesquita at 2024-07-18T16:00:44-07:00
Write a test for object determinism

Extend abi_test with object determinism check

Standalone run abi test

Disable local test on CI

- - - - -
d7f945d1 by Rodrigo Mesquita at 2024-07-18T16:00:44-07:00
Remame uniques straight off stgtocmm, before cmm pipeline

WIP

Progress

Work around LLVM assembler bug!

In a really stupid way)

Fix ordering of CLabels for IdLabels

Local test script tweaks

Do uniq renaming before SRTs

Revert "Do uniq renaming before SRTs"

This reverts commit db38b635d626106e40b3ab18091e0a24046c30c5.

Do on CmmGroup

Do uniq-renaming pass right at `codeGen`

not better

Revert "Do uniq-renaming pass right at `codeGen`"

This reverts commit 74e9068aaaf736bf815a36bf74a0dde19a074a7a.

Reapply "Do uniq renaming before SRTs"

This reverts commit 682f89732fc2a95fa011f530c0c6922bf576d229.

Try ALSO after SRT

Revert "Try ALSO after SRT"

This reverts commit c5dd7b426cde768126402aac3f39617ccb99f5c5.

Renaming before and after SRTs bc of procs and srts and ...

Wait no that was way too slow...

cleaner approach, same idea

Revert "Reapply "Do uniq renaming before SRTs""

This reverts commit 70ff49b7efc8c1fca46cba6eff630c5d39a99213.

Finfixes

Add traces

Fix bug triggered by static data generated during SRT

Wait, that was still there?!

StableNmCmp is invalid for internal names... also, rename all Id uniques

This fixes a really awful bug.

Tweaks

- - - - -
6812c22d by Rodrigo Mesquita at 2024-07-18T16:00:44-07:00
cmm: Back LabelMap with UDFM

Use a deterministic unique map to back the implementation of `LabelMap`.

This is necessary towards the goal of object code determinism in #12935.

Our intended solution requires renaming uniques in a deterministic
order (which will be the order in which they were created), but storing
them label map makes us lose this order. Backing it with a UDFM fixes
this issue.

- - - - -
634ac689 by Rodrigo Mesquita at 2024-07-18T16:00:44-07:00
Deriving-via one-shot strict state Monad instances

A small refactor to use deriving via GHC.Utils.Monad.State.Strict
Monad instances for state Monads with unboxed/strict results which all
re-implemented the one-shot trick in the instance and used unboxed
tuples:

* CmmOptM in GHC.Cmm.GenericOpt
* RegM in GHC.CmmToAsm.Reg.Linear.State
* UniqSM in GHC.Types.Unique.Supply

- - - - -
1314f380 by Rodrigo Mesquita at 2024-07-18T16:00:44-07:00
UniqDSM det uniques + use in Cmm.Info

Now for SRTs

SRT generation using deterministic uniq supply

Back LabelMap with deterministic UDFM

TSAN uniq rename hard

Revert "TSAN uniq rename hard"

This reverts commit 7ca5ab3036c15f38c6d4cbcb616d415958c6bcda.

improvements to uniqdsm

UniqDSM ProcPoint

CmmLayoutStack UniqDet

90% of cpsTop UniqDSM

Major progress in using UniqDSM in CmmToAsm and Ncg backends

Fix imports

Un-back label map with udfm

Revert "Un-back label map with udfm"

This reverts commit f5d2e4257214a3f7b7d845651e6662c5babfd6a3.

- - - - -
8de2be45 by Rodrigo Mesquita at 2024-07-18T16:00:44-07:00
Tweaks

- - - - -
98ee4a92 by Rodrigo Mesquita at 2024-07-18T16:00:44-07:00
Make UDSM oneshot deriving via state

- - - - -
72877779 by Rodrigo Mesquita at 2024-07-18T16:00:44-07:00
Put deterministic renaming behind a flag

- - - - -
994c7e9c by Rodrigo Mesquita at 2024-07-18T16:00:44-07:00
Introduce back LabelMap non deterministic

- - - - -
aba296e5 by Rodrigo Mesquita at 2024-07-18T16:00:44-07:00
Use NonDeterministic Label map in multiple passes

(TODO: More could be available. Look through Det LabelMap uses again)

- - - - -
e0794abd by Rodrigo Mesquita at 2024-07-18T16:00:44-07:00
Drop dumps

- - - - -
e6500cd0 by Rodrigo Mesquita at 2024-07-18T16:00:44-07:00
Make FactBase deterministic again

- - - - -
82a70119 by Rodrigo Mesquita at 2024-07-18T16:00:44-07:00
Undo a bit more NonDet LblMap

- - - - -
809cc44a by Rodrigo Mesquita at 2024-07-18T16:00:44-07:00
Revert "Undo a bit more NonDet LblMap"

This reverts commit f526e1aee078712a5ae611d73fe90afa5e5095cb.

- - - - -
df575b9a by Rodrigo Mesquita at 2024-07-18T16:00:44-07:00
Revert "Make FactBase deterministic again"

This reverts commit 315f05c001f41cf27b75870aa60d55f15a725421.

- - - - -
4081878f by Matthew Pickering at 2024-07-18T16:00:44-07:00
MP fixes, don't rename external names

- - - - -
447414e7 by Matthew Pickering at 2024-07-18T16:00:45-07:00
Use NonDet for CFG

- - - - -
d91fa729 by Matthew Pickering at 2024-07-18T16:00:45-07:00
fix Ord instance

- - - - -
49898340 by Matthew Pickering at 2024-07-18T16:00:45-07:00
More NonDet

- - - - -
21225d26 by Matthew Pickering at 2024-07-18T16:00:45-07:00
More explicit

- - - - -
be5864f7 by Matthew Pickering at 2024-07-18T16:00:45-07:00
Introduce DCmmDecl, start

- - - - -
2ed04290 by Matthew Pickering at 2024-07-18T16:00:45-07:00
Removing more maps

- - - - -
a73568e4 by Matthew Pickering at 2024-07-18T16:00:45-07:00
Fix warnings

- - - - -
33bb563c by Matthew Pickering at 2024-07-18T16:00:45-07:00
tests

- - - - -
ae9ca59a by Matthew Pickering at 2024-07-18T16:00:45-07:00
Fix tests

- - - - -
222fa818 by Matthew Pickering at 2024-07-18T16:00:45-07:00
undo

- - - - -
e4721154 by Matthew Pickering at 2024-07-18T16:00:45-07:00
undo

- - - - -
94486951 by Simon Peyton Jones at 2024-08-06T13:05:05-07:00
Refactor only newSysLocalDs

* Change newSysLocalDs to take a scaled type
* Add newSysLocalMDs that takes a type and makes a ManyTy local

Lots of files touched, nothing deep.

- - - - -
9c3b8ba0 by Simon Peyton Jones at 2024-08-09T08:01:40-07:00
Add defaulting of equalities

This MR adds one new defaulting strategy to the top-level
defaulting story: see Note [Defaulting equalities] in GHC.Tc.Solver.

This resolves #25029 and #25125, which showed that users were
accidentally relying on a GHC bug, which was fixed by

    commit 04f5bb85c8109843b9ac2af2a3e26544d05e02f4
    Author: Simon Peyton Jones <simon.peytonjones at gmail.com>
    Date:   Wed Jun 12 17:44:59 2024 +0100

    Fix untouchability test

    This MR fixes #24938.  The underlying problem was tha the test for
    "does this implication bring in scope any equalities" was plain wrong.

This fix gave rise to a number of user complaints; but the improved
defaulting story of this MR largely resolves them.

On the way I did a bit of refactoring, of course

* Completely restructure the extremely messy top-level defaulting
  code. The new code is in GHC.Tc.Solver.tryDefaulting, and is much,
  much, much esaier to grok.

* In GHC.Core.InstEnv, change the type synonym `Canonical` to a data
  type `CanonicalEvidence`; and document it better.  That in turn made
  me realise that CalLStacks were being treated with a bit of a hack, which
  I documented in `Note [CallStack and ExecptionContext hack]`.

* Fix a bug I found when desugaring RULE left hand sides; see (NC1) in
  Note [Desugaring non-canonical evidence] in GHC.HsToCore.Binds
  This means giving a boolean flag to dsHsWrapper, alas.  But I think it
  will go away again when I have finished with my (entirely separate)
  speciaise-on-values patch.

- - - - -
0dc954f7 by Cheng Shao at 2024-08-21T16:10:54-07:00
compiler: implement --show-iface-abi-hash major mode

- - - - -
d9f06653 by Torsten Schmits at 2024-08-28T12:32:00-07:00
store boot module data separately

- - - - -
db5ba983 by Torsten Schmits at 2024-08-28T12:34:29-07:00
treat boot files in CLI targets properly

- - - - -
ae5c6d7d by Ian-Woo Kim at 2024-08-28T12:41:36-07:00
fix OsString <-> FilePath in cherry-picked code

- - - - -
64c085bf by Ian-Woo Kim at 2024-09-13T09:42:54-07:00
added many debug prints

- - - - -
6411a5dc by Torsten Schmits at 2024-09-20T14:41:53-07:00
Parallelize getRootSummary computations in dep analysis downsweep

This reuses the upsweep step's infrastructure to process batches of
modules in parallel.

I benchmarked this by running `ghc -M` on two sets of 10,000 modules;
one with a linear dependency chain and the other with a binary tree.
Comparing different values for the number of modules per thread
suggested an optimum at `length targets `div` (n_cap * 2)`, with results
similar to this one (6 cores, 12 threads):

```
Benchmark 1: linear 1 jobs
  Time (mean ± σ):      1.775 s ±  0.026 s    [User: 1.377 s, System: 0.399 s]
  Range (min … max):    1.757 s …  1.793 s    2 runs

Benchmark 2: linear 6 jobs
  Time (mean ± σ):     876.2 ms ±  20.9 ms    [User: 1833.2 ms, System: 518.6 ms]
  Range (min … max):   856.2 ms … 898.0 ms    3 runs

Benchmark 3: linear 12 jobs
  Time (mean ± σ):     793.5 ms ±  23.2 ms    [User: 2318.9 ms, System: 718.6 ms]
  Range (min … max):   771.9 ms … 818.0 ms    3 runs
```

Results don't differ much when the batch size is reduced to a quarter
of that, but there's significant thread scheduling overhead for a size
of 1:

```
Benchmark 1: linear 1 jobs
  Time (mean ± σ):      2.611 s ±  0.029 s    [User: 2.851 s, System: 0.783 s]
  Range (min … max):    2.591 s …  2.632 s    2 runs

Benchmark 2: linear 6 jobs
  Time (mean ± σ):      1.189 s ±  0.007 s    [User: 2.707 s, System: 1.103 s]
  Range (min … max):    1.184 s …  1.194 s    2 runs

Benchmark 3: linear 12 jobs
  Time (mean ± σ):      1.097 s ±  0.006 s    [User: 2.938 s, System: 1.300 s]
  Range (min … max):    1.093 s …  1.101 s    2 runs
```

Larger batches also slightly worsen performance.

- - - - -
60ae7968 by Torsten Schmits at 2024-09-20T14:41:53-07:00
use diag_wrapper argument like upsweep does

- - - - -
4139f44d by Torsten Schmits at 2024-09-20T14:41:53-07:00
restructure a bit

- - - - -
7d3f785d by Torsten Schmits at 2024-09-20T14:41:53-07:00
also pass down the Messager

- - - - -
77c1b533 by Torsten Schmits at 2024-09-20T14:41:53-07:00
propagate exceptions to preserve current behavior

- - - - -
7a8e215c by Torsten Schmits at 2024-09-20T14:41:53-07:00
use fixed bundle size

- - - - -
64bc18c8 by Ian-Woo Kim at 2024-09-20T14:44:48-07:00
Make addToFinderCache monotonic

- - - - -
5fdb31ab by Sjoerd Visscher at 2024-09-20T14:45:00-07:00
Fix tests that call downsweep

- - - - -


30 changed files:

- .gitlab-ci.yml
- + .gitlab/README.md
- .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
- .gitmodules
- compiler/GHC.hs
- compiler/GHC/Builtin/PrimOps.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/Utils.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/ByteCode/Linker.hs
- compiler/GHC/Cmm.hs
- compiler/GHC/Cmm/BlockId.hs
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Cmm/Dataflow.hs
- compiler/GHC/Cmm/Dataflow/Graph.hs
- compiler/GHC/Cmm/GenericOpt.hs
- compiler/GHC/Cmm/Graph.hs
- compiler/GHC/Cmm/Info.hs
- compiler/GHC/Cmm/Info/Build.hs
- compiler/GHC/Cmm/LayoutStack.hs
- compiler/GHC/Cmm/Opt.hs
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/Cmm/Pipeline.hs
- compiler/GHC/Cmm/ProcPoint.hs
- compiler/GHC/Cmm/Reducibility.hs
- compiler/GHC/Cmm/Sink.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/04a3a9e61d0cc14865b445af3220d93e15a1e29f...5fdb31abb5f104c438e6b5f34ed607641db4dae4

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/04a3a9e61d0cc14865b445af3220d93e15a1e29f...5fdb31abb5f104c438e6b5f34ed607641db4dae4
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/20240923/9b86cc82/attachment-0001.html>


More information about the ghc-commits mailing list