[Git][ghc/ghc][wip/ghc-9.4.5-backports] 22 commits: base: Correct @since annotation for FP<->Integral bit cast operations.

Zubin (@wz1000) gitlab at gitlab.haskell.org
Wed Apr 5 11:44:47 UTC 2023



Zubin pushed to branch wip/ghc-9.4.5-backports at Glasgow Haskell Compiler / GHC


Commits:
b6e950c3 by Andreas Klebinger at 2023-04-05T17:14:28+05:30
base: Correct @since annotation for FP<->Integral bit cast operations.

Fixes #22708

(cherry picked from commit 9296660b131d42f1b1f9c421040c5746d5c56989)

- - - - -
b3bcf25d by Matthew Pickering at 2023-04-05T17:14:28+05:30
constant folding: Correct type of decodeDouble_Int64 rule

The first argument is Int64# unconditionally, so we better produce
something of that type. This fixes a core lint error found in the ad
package.

Fixes #23019

(cherry picked from commit a86aae8b562c12bb3cee8dcae5156b647f1a74ad)

- - - - -
ebe79f6b by Sylvain Henry at 2023-04-05T17:14:28+05:30
linker: fix linking with aligned sections (#23066)

Take section alignment into account instead of assuming 16 bytes (which
is wrong when the section requires 32 bytes, cf #23066).

(cherry picked from commit 4158722a6cff5d19e228356c525946b6c4b83396)

- - - - -
f0c95618 by Ben Gamari at 2023-04-05T17:14:28+05:30
nativeGen/AArch64: Fix bitmask immediate predicate

Previously the predicate for determining whether a logical instruction
operand could be encoded as a bitmask immediate was far too
conservative. This meant that, e.g., pointer untagged required five
instructions whereas it should only require one.

Fixes #23030.

(cherry picked from commit b8d783d24b9a617ad1e3038abeb75d322703ef65)

- - - - -
f30d0e51 by Matthew Pickering at 2023-04-05T17:14:28+05:30
compiler: Add -f[no-]split-sections flags

Here we add a `-fsplit-sections` flag which may some day replace
`-split-sections`. This has the advantage of automatically providing a
`-fno-split-sections` flag, which is useful for our packaging because we
enable `-split-sections` by default but want to disable it in certain
configurations.

(cherry picked from commit 32255d055b768d51deb9d1f49681164cf7492011)

- - - - -
8da303ba by Matthew Pickering at 2023-04-05T17:14:28+05:30
hadrian: Add test:all_deps to build just testsuite dependencies

Fixes #22534

(cherry picked from commit 15bee1239877a4629a245fe457f06e5f96668423)

- - - - -
951bd209 by Matthew Pickering at 2023-04-05T17:14:28+05:30
hadrian: Add no_split_sections tranformer

This transformer reverts the effect of `split_sections`, which we intend
to use for platforms which don't support split sections.

In order to achieve this we have to modify the implemntation of the
split_sections transformer to store whether we are enabling
split_sections directly in the `Flavour` definition. This is because
otherwise there's no convenient way to turn off split_sections due to
having to pass additional linker scripts when merging objects.

(cherry picked from commit fec6638e2468c78f136f2363d8b3239a9bfd4f91)

- - - - -
abe44949 by Matthew Pickering at 2023-04-05T17:14:28+05:30
ci: Build all test dependencies with in-tree compiler

This means that these executables will honour flavour transformers such
as "werror".

Fixes #22555

(cherry picked from commit 53a6ae7a8f819d1105aa190dc9cce215cdbcc6dc)

- - - - -
5ce45815 by Matthew Pickering at 2023-04-05T17:14:28+05:30
hadrian: Document using GHC environment variable to select boot compiler

Fixes #22340

(cherry picked from commit 32e264c1a11e6356bb045371b87a3736df19e792)

- - - - -
747e20ed by Matthew Pickering at 2023-04-05T17:14:28+05:30
packaging: Build perf builds with -split-sections

In 8f71d958 the make build system was made to use split-sections on
linux systems but it appears this logic never made it to hadrian.
There is the split_sections flavour transformer but this doesn't appear
to be used for perf builds on linux.

This is disbled on deb9 and windows due to #21670

Closes #21135

(cherry picked from commit be9dd9b03479070ba6387c251541f4569392c4bb)

- - - - -
91782221 by Matthew Pickering at 2023-04-05T17:14:28+05:30
hadrian bindist: Install manpages to share/man/man1/ghc.1

When the installation makefile was copied over the manpages were no
longer installed in the correct place. Now we install it into share/man/man1/ghc.1
as the make build system did.

Fixes #22371

(cherry picked from commit 32b32d7fbc5544ad6c435a1ea26e6353ec567a9b)

- - - - -
ef11a3db by Matthew Pickering at 2023-04-05T17:14:28+05:30
Fix recompilation checking for multiple home units

The key part of this change is to store a UnitId in the
`UsageHomeModule` and `UsageHomeModuleInterface`.

* Fine-grained dependency tracking is used if the dependency comes from
  any home unit.
* We actually look up the right module when checking whether we need to
  recompile in the `UsageHomeModuleInterface` case.

These scenarios are both checked by the new tests (
multipleHomeUnits_recomp and multipleHomeUnits_recomp_th )

Fixes #22675

(cherry picked from commit 1d1dd3fbfafdb9705076d4c587d5cf47e33b7640)

- - - - -
584b79f7 by Matthew Pickering at 2023-04-05T17:14:28+05:30
Augment target filepath by working directory when checking if module satisfies target

This fixes a spurious warning in -Wmissing-home-modules.

This is a simple oversight where when looking for the target in the
first place we augment the search by the -working-directory flag but
then fail to do so when checking this warning.

Fixes #22676

(cherry picked from commit 7bfb30f92f5e21a8aca58068dc970040130433c6)

- - - - -
16cbd2ab by Matthew Pickering at 2023-04-05T17:14:28+05:30
Use NodeKey rather than ModuleName in pruneCache

The `pruneCache` function assumes that the list of `CachedInfo` all have unique `ModuleName`, this is not true:

* In normal compilation, the same module name can appear for a file and it's boot file.
* In multiple home unit compilation the same ModuleName can appear in different units

The fix is to use a `NodeKey` as the actual key for the interfaces which includes `ModuleName`, `IsBoot` and `UnitId`.

Fixes #22677

(cherry picked from commit 69500dd4a6dc81fa6fee6f24f0fe08a07b6112fc)

- - - - -
c448f36d by Matthew Pickering at 2023-04-05T17:14:29+05:30
Recompilation checking: Don't try to find artefacts for Interactive & hs-boot combo

In interactive mode we don't produce any linkables for hs-boot files. So
we also need to not going looking for them when we check to see if we
have all the right objects needed for recompilation.

Ticket #22669

(cherry picked from commit 336b2b1c8628b1317de46078e049b529205f2129)

- - - - -
ba0a7c97 by Matthew Pickering at 2023-04-05T17:14:29+05:30
Don't write o-boot files in Interactive mode

We should not be producing object files when in interactive mode but we
still produced the dummy o-boot files. These never made it into a
`Linkable` but then confused the recompilation checker.

Fixes #22669

(cherry picked from commit 6469fea7c78408db679898168a8e9c50c8c7c5ce)

- - - - -
1caf6a39 by Matthew Pickering at 2023-04-05T17:14:29+05:30
Improve driver diagnostic messages by including UnitId in message

Currently the driver diagnostics don't give any indication about which unit they correspond to.

For example `-Wmissing-home-modules` can fire multiple times for each different home unit and gives no indication about which unit it's actually reporting about.

Perhaps a longer term fix is to generalise the providence information away from a SrcSpan so that these kind of whole project errors can be reported with an accurate provenance. For now we can just include the `UnitId` in the error message.

Fixes #22678

(cherry picked from commit 06cc0a9529f2fe0dfa40d9966a52a982653bfcb9)

- - - - -
e0a70743 by Matthew Pickering at 2023-04-05T17:14:29+05:30
Key ModSummary cache by UnitId as well as FilePath

Multiple units can refer to the same files without any problem. Just
another assumption which needs to be updated when we may have multiple
home units.

However, there is the invariant that within each unit each file only
maps to one module, so as long as we also key the cache by UnitId then
we are all good.

This led to some confusing behaviour in GHCi when reloading,
multipleHomeUnits_shared distils the essence of what can go wrong.

Fixes #22679

(cherry picked from commit 4fe9eaff11ccf1fe185de2918aef4f96fd200c72)

- - - - -
7572982d by Matthew Pickering at 2023-04-05T17:14:29+05:30
Finder: Look in current unit before looking in any home package dependencies

In order to preserve existing behaviour it's important to look within the current component before consideirng a module might come from an external component.

This already happened by accident in `downsweep`, (because roots are used to repopulated the cache) but in the `Finder` the logic was the wrong way around.

Fixes #22680

-------------------------
Metric Decrease:
    MultiComponentModules
    MultiComponentModulesRecomp
-------------------------p

(cherry picked from commit ada29f5ca5a567b69713f08feac9ee4f247de117)

- - - - -
a59fbf91 by Matthew Pickering at 2023-04-05T17:14:29+05:30
Debug: Print full NodeKey when pretty printing ModuleGraphNode

This is helpful when debugging multiple component issues.

(cherry picked from commit be701cc64f0ff78aa50bcd7293d8692dc1ba6c85)

- - - - -
41cd318a by Simon Peyton Jones at 2023-04-05T17:14:29+05:30
Add a missing checkEscapingKind

Ticket #22743 pointed out that there is a missing check,
for type-inferred bindings, that the inferred type doesn't
have an escaping kind.

The fix is easy.

(cherry picked from commit 496607fdb77baf12e2fe263104ba5d0d700eee3b)

- - - - -
eef166c2 by Matthew Pickering at 2023-04-05T17:14:29+05:30
Only store Name in FunRhs rather than Id with knot-tied fields

All the issues here have been caused by #18758.
The goal of the ticket is to be able to talk about things like
`LTyClDecl GhcTc`. In the case of HsMatchContext,
the correct "context" is whatever we want, and in fact storing just a
`Name` is sufficient and correct context, even if the rest of the AST is
storing typechecker Ids.

So this reverts (#20415, !5579) which intended to get closed to #18758 but
didn't really and introduced a few subtle bugs.

Printing of an error message in #22695 would just hang, because we would
attempt to print the `Id` in debug mode to assertain whether it was
empty or not. Printing the Name is fine for the error message.

Another consequence is that when `-dppr-debug` was enabled the compiler would
hang because the debug printing of the Id would try and print fields
which were not populated yet.

This also led to 32070e6c2e1b4b7c32530a9566fe14543791f9a6 having to add
a workaround for the `checkArgs` function which was probably a very
similar bug to #22695.

Fixes #22695

(cherry picked from commit ac39e8e97fbb69e4a786c1c29d6e477e7944f998)

- - - - -


30 changed files:

- .gitlab-ci.yml
- .gitlab/ci.sh
- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Driver/Errors/Ppr.hs
- compiler/GHC/Driver/Errors/Types.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Usage.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Load.hs
- compiler/GHC/Iface/Recomp.hs
- compiler/GHC/Tc/Gen/Arrow.hs
- compiler/GHC/Tc/Gen/Bind.hs
- compiler/GHC/Tc/Gen/Match.hs
- compiler/GHC/Tc/Gen/Match.hs-boot
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs
- compiler/GHC/Tc/Validity.hs
- compiler/GHC/Unit/Env.hs
- compiler/GHC/Unit/Finder.hs
- compiler/GHC/Unit/Module/Deps.hs
- compiler/GHC/Unit/Module/Graph.hs
- compiler/Language/Haskell/Syntax/Expr.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5eea437e1b20e294a6e7a8267a1c968ac59053aa...eef166c2e544207a98d361e7977aa1d82d9c0c7c

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5eea437e1b20e294a6e7a8267a1c968ac59053aa...eef166c2e544207a98d361e7977aa1d82d9c0c7c
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/20230405/b3e3b25c/attachment-0001.html>


More information about the ghc-commits mailing list