[Git][ghc/ghc][wip/t23103] 64 commits: base: Add changelog entry for CLC #188

Finley McIlwaine (@FinleyMcIlwaine) gitlab at gitlab.haskell.org
Tue Aug 22 18:14:11 UTC 2023



Finley McIlwaine pushed to branch wip/t23103 at Glasgow Haskell Compiler / GHC


Commits:
8e699b23 by Matthew Pickering at 2023-08-14T10:44:47-04:00
base: Add changelog entry for CLC #188

This proposal modified the implementations of copyBytes, moveBytes and
fillBytes (as detailed in the proposal)

https://github.com/haskell/core-libraries-committee/issues/188

- - - - -
026f040a by Matthew Pickering at 2023-08-14T10:45:23-04:00
packaging: Build manpage in separate directory to other documentation

We were installing two copies of the manpage:

* One useless one in the `share/doc` folder, because we copy the doc/
  folder into share/
* The one we deliberately installed into `share/man` etc

The solution is to build the manpage into the `manpage` directory when
building the bindist, and then just install it separately.

Fixes #23707

- - - - -
524c60c8 by Bartłomiej Cieślar at 2023-08-14T13:46:33-04:00
Report deprecated fields bound by record wildcards when used

This commit ensures that we emit the appropriate warnings when
a deprecated record field bound by a record wildcard is used.

For example:

    module A where
    data Foo = Foo {x :: Int, y :: Bool, z :: Char}

    {-# DEPRECATED x "Don't use x" #-}
    {-# WARNING y "Don't use y" #-}

    module B where
    import A

    foo (Foo {..}) = x

This will cause us to emit a "Don't use x" warning, with location the
location of the record wildcard. Note that we don't warn about `y`,
because it is unused in the RHS of `foo`.

Fixes #23382

- - - - -
d6130065 by Matthew Pickering at 2023-08-14T13:47:11-04:00
Add zstd suffix to jobs which rely on zstd

This was causing some confusion as the job was named simply
"x86_64-linux-deb10-validate", which implies a standard configuration
rather than any dependency on libzstd.

- - - - -
e24e44fc by Matthew Pickering at 2023-08-14T13:47:11-04:00
ci: Always run project-version job

This is needed for the downstream test-primops pipeline to workout what
the version of a bindist produced by a pipeline is.

- - - - -
f17b9d62 by Matthew Pickering at 2023-08-14T13:47:11-04:00
gen_ci: Rework how jobs-metadata.json is generated

* We now represent a job group a triple of Maybes, which makes it easier
  to work out when jobs are enabled/disabled on certain pipelines.

```
data JobGroup a = StandardTriple { v :: Maybe (NamedJob a)
                                 , n :: Maybe (NamedJob a)
                                 , r :: Maybe (NamedJob a) }
```

* `jobs-metadata.json`  generation is reworked using the following
  algorithm.
  - For each pipeline type, find all the platforms we are doing builds
    for.
  - Select one build per platform
  - Zip together the results

This way we can choose different pipelines for validate/nightly/release
which makes the metadata also useful for validate pipelines. This
feature is used by the test-primops downstream CI in order to select the
right bindist for testing validate pipelines.

This makes it easier to inspect which jobs are going to be enabled on a
particular pipeline.

- - - - -
f9a5563d by Matthew Pickering at 2023-08-14T13:47:11-04:00
gen_ci: Rules rework

In particular we now distinguish between whether we are dealing with a
Nightly/Release pipeline (which labels don't matter for) and a validate
pipeline where labels do matter.

The overall goal here is to allow a disjunction of labels for validate
pipelines, for example,

> Run a job if we have the full-ci label or test-primops label

Therefore the "ValidateOnly" rules are treated as a set of disjunctions
rather than conjunctions like before.

What this means in particular is that if we want to ONLY run a job if a
label is set, for example, "FreeBSD" label then we have to override the
whole label set.

Fixes #23772

- - - - -
d54b0c1d by Matthew Pickering at 2023-08-14T13:47:11-04:00
ci: set -e for lint-ci-config scripts

- - - - -
994a9b35 by Matthew Pickering at 2023-08-14T13:47:11-04:00
ci: Fix job metadata generation

- - - - -
e194ed2b by Ben Gamari at 2023-08-15T00:58:09-04:00
users-guide: Note that GHC2021 doesn't include ExplicitNamespaces

As noted in #23801.

- - - - -
d814bda9 by Ben Gamari at 2023-08-15T05:43:53-04:00
users-guide: Support both distutils and packaging

As noted in #23818, some old distributions (e.g. Debian 9) only include
`distutils` while newer distributions only include `packaging`.

Fixes #23818.

- - - - -
1726db3f by Ben Gamari at 2023-08-15T05:43:53-04:00
users-guide: Ensure extlinks is compatible with Sphinx <4

The semantics of the `extlinks` attribute annoyingly changed in Sphinx
4. Reflect this in our configuration. See #22690.

Fixes #23807.

- - - - -
173338cf by Matthew Pickering at 2023-08-15T22:00:24-04:00
ci: Run full-ci on master and release branches

Fixes #23737

- - - - -
bdab6898 by Bodigrim at 2023-08-15T22:01:03-04:00
Add @since pragmas for Data.Ord.clamp and GHC.Float.clamp

- - - - -
662d351b by Matthew Pickering at 2023-08-16T09:35:04-04:00
ghc-toolchain: Match CPP args with configure script

At the moment we need ghc-toolchain to precisely match the output as
provided by the normal configure script. The normal configure script
(FP_HSCPP_CMD_WITH_ARGS) branches on whether we are using clang or gcc
so we match that logic exactly in ghc-toolchain.

The old implementation (which checks if certain flags are supported) is
better but for now we have to match to catch any potential errors in the
configuration.

Ticket: #23720

- - - - -
09c6759e by Matthew Pickering at 2023-08-16T09:35:04-04:00
configure: Fix `-Wl,--no-as-needed` check

The check was failing because the args supplied by $$1 were quoted which
failed because then the C compiler thought they were an input file.

Fixes #23720

- - - - -
2129678b by Matthew Pickering at 2023-08-16T09:35:04-04:00
configure: Add flag which turns ghc-toolchain check into error

We want to catch these errors in CI, but first we need to a flag which
turns this check into an error.

- - - - -
6e2aa8e0 by Matthew Pickering at 2023-08-16T09:35:04-04:00
ci: Enable --enable-strict-ghc-toolchain-check for all CI jobs

This will cause any CI job to fail if we have a mismatch between what
ghc-toolchain reports and what ./configure natively reports. Fixing
these kinds of issues is highest priority for 9.10 release.

- - - - -
12d39e24 by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00
Pass user-specified options to ghc-toolchain

The current user interface to configuring target toolchains is `./configure`.

In !9263 we added a new tool to configure target toolchains called
`ghc-toolchain`, but the blessed way of creating these toolchains is
still through configure.

However, we were not passing the user-specified options given with the
`./configure` invocation to the ghc-toolchain tool.

This commit remedies that by storing the user options and environment
variables in USER_* variables, which then get passed to GHC-toolchain.

The exception to the rule is the windows bundled toolchain, which
overrides the USER_* variables with whatever flags the windows bundled
toolchain requires to work.
We consider the bundled toolchain to be effectively the user specifying
options, since the actual user delegated that configuration work.

Closes #23678

- - - - -
f7b3c3a0 by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00
ghc-toolchain: Parse javascript and ghcjs as a Arch and OS

- - - - -
8a0ae4ee by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00
ghc-toolchain: Fix ranlib option

- - - - -
31e9ec96 by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00
Check Link Works with -Werror

- - - - -
bc1998b3 by Matthew Pickering at 2023-08-16T09:35:04-04:00
Only check for no_compact_unwind support on darwin

While writing ghc-toolchain we noticed that the
FP_PROG_LD_NO_COMPACT_UNWIND check is subtly wrong. Specifically, we
pass -Wl,-no_compact_unwind to cc. However, ld.gold interprets this as
-n o_compact_unwind, which is a valid argument.

Fixes #23676

- - - - -
0283f36e by Matthew Pickering at 2023-08-16T09:35:04-04:00
Add some javascript special cases to ghc-toolchain

On javascript there isn't a choice of toolchain but some of the
configure checks were not accurately providing the correct answer.

1. The linker was reported as gnu LD because the --version output
   mentioned gnu LD.
2. The --target flag makes no sense on javascript but it was just
   ignored by the linker, so we add a special case to stop ghc-toolchain
   thinking that emcc supports --target when used as a linker.

- - - - -
a48ec5f8 by Matthew Pickering at 2023-08-16T09:35:04-04:00
check for emcc in gnu_LD check

- - - - -
50df2e69 by Matthew Pickering at 2023-08-16T09:35:04-04:00
Add ldOverrideWhitelist to only default to ldOverride on windows/linux

On some platforms - ie darwin, javascript etc we really do not want to
allow the user to use any linker other than the default one as this
leads to all kinds of bugs. Therefore it is a bit more prudant to add a
whitelist which specifies on which platforms it might be possible to use
a different linker.

- - - - -
a669a39c by Matthew Pickering at 2023-08-16T09:35:04-04:00
Fix plaform glob in FPTOOLS_SET_C_LD_FLAGS

A normal triple may look like

x86_64-unknown-linux

but when cross-compiling you get $target set to a quad such as..

aarch64-unknown-linux-gnu

Which should also match this check.

- - - - -
c52b6769 by Matthew Pickering at 2023-08-16T09:35:04-04:00
ghc-toolchain: Pass ld-override onto ghc-toolchain

- - - - -
039b484f by Matthew Pickering at 2023-08-16T09:35:04-04:00
ld override: Make whitelist override user given option

- - - - -
d2b63cbc by Matthew Pickering at 2023-08-16T09:35:05-04:00
ghc-toolchain: Add format mode to normalise differences before diffing.

The "format" mode takes an "--input" and "--ouput" target file and
formats it.

This is intended to be useful on windows where the
configure/ghc-toolchain target files can't be diffed very easily because
the path separators are different.

- - - - -
f2b39e4a by Matthew Pickering at 2023-08-16T09:35:05-04:00
ghc-toolchain: Bump ci-images commit to get new ghc-wasm-meta

We needed to remove -Wno-unused-command-line-argument from the arguments
passed in order for the configure check to report correctly.

See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10976#note_516335

- - - - -
92103830 by Matthew Pickering at 2023-08-16T09:35:05-04:00
configure: MergeObjsCmd - distinguish between empty string and unset variable

If `MergeObjsCmd` is explicitly set to the empty string then we should
assume that MergeObjs is just not supported.

This is especially important for windows where we set MergeObjsCmd to ""
in m4/fp_setup_windows_toolchain.m4.

- - - - -
3500bb2c by Matthew Pickering at 2023-08-16T09:35:05-04:00
configure: Add proper check to see if object merging works

- - - - -
08c9a014 by Matthew Pickering at 2023-08-16T09:35:05-04:00
ghc-toolchain: If MergeObjsCmd is not set, replace setting with Nothing

If the user explicitly chooses to not set a MergeObjsCmd then it is
correct to use Nothing for tgtMergeObjs field in the Target file.

- - - - -
c9071d94 by Matthew Pickering at 2023-08-16T09:35:05-04:00
HsCppArgs: Augment the HsCppOptions

This is important when we pass -I when setting up the windows toolchain.

- - - - -
294a6d80 by Matthew Pickering at 2023-08-16T09:35:05-04:00
Set USER_CPP_ARGS when setting up windows toolchain

- - - - -
bde4b5d4 by Rodrigo Mesquita at 2023-08-16T09:35:05-04:00
Improve handling of Cc as a fallback

- - - - -
f4c1c3a3 by Rodrigo Mesquita at 2023-08-16T09:35:05-04:00
ghc-toolchain: Configure Cpp and HsCpp correctly when user specifies flags

In ghc-toolchain, we were only /not/ configuring required flags when the
user specified any flags at all for the  of the HsCpp and Cpp tools.

Otherwise, the linker takes into consideration the user specified flags
to determine whether to search for a better linker implementation, but
already configured the remaining GHC and platform-specific flags
regardless of the user options.

Other Tools consider the user options as a baseline for further
configuration (see `findProgram`), so #23689 is not applicable.

Closes #23689

- - - - -
bfe4ffac by Matthew Pickering at 2023-08-16T09:35:05-04:00
CPP_ARGS: Put new options after user specified options

This matches up with the behaviour of ghc-toolchain, so that the output
of both matches.

- - - - -
a6828173 by Gergő Érdi at 2023-08-16T09:35:41-04:00
If a defaulting plugin made progress, re-zonk wanteds before built-in defaulting

Fixes #23821.

- - - - -
e2b38115 by Sylvain Henry at 2023-08-17T07:54:06-04:00
JS: implement openat(AT_FDCWD...) (#23697)

Use `openSync` to implement `openat(AT_FDCWD...)`.

- - - - -
a975c663 by sheaf at 2023-08-17T07:54:47-04:00
Use unsatisfiable for missing methods w/ defaults

When a class instance has an Unsatisfiable constraint in its context
and the user has not explicitly provided an implementation of a method,
we now always provide a RHS of the form `unsatisfiable @msg`, even
if the method has a default definition available. This ensures that,
when deferring type errors, users get the appropriate error message
instead of a possible runtime loop, if class default methods were
defined recursively.

Fixes #23816

- - - - -
45ca51e5 by Ben Gamari at 2023-08-17T15:16:41-04:00
ghc-internal: Initial commit of the skeleton

- - - - -
88bbf8c5 by Ben Gamari at 2023-08-17T15:16:41-04:00
ghc-experimental: Initial commit

- - - - -
664468c0 by Ben Gamari at 2023-08-17T15:17:17-04:00
testsuite/cloneStackLib: Fix incorrect format specifiers

- - - - -
eaa835bb by Ben Gamari at 2023-08-17T15:17:17-04:00
rts/ipe: Fix const-correctness of IpeBufferListNode

Both info tables and the string table should be `const`

- - - - -
78f6f6fd by Ben Gamari at 2023-08-17T15:17:17-04:00
nonmoving: Drop dead debugging utilities

These are largely superceded by support in the ghc-utils GDB extension.

- - - - -
3f6e8f42 by Ben Gamari at 2023-08-17T15:17:17-04:00
nonmoving: Refactor management of mark thread

Here we refactor that treatment of the worker thread used by the
nonmoving GC for concurrent marking, avoiding creating a new thread with
every major GC cycle. As well, the new scheme is considerably easier to
reason about, consolidating all state in one place, accessed via a small
set of accessors with clear semantics.

- - - - -
88c32b7d by Ben Gamari at 2023-08-17T15:17:17-04:00
testsuite: Skip T23221 in nonmoving GC ways

This test is very dependent upon GC behavior.

- - - - -
381cfaed by Ben Gamari at 2023-08-17T15:17:17-04:00
ghc-heap: Don't expose stack dirty and marking fields

These are GC metadata and are not relevant to the end-user. Moreover,
they are unstable which makes ghc-heap harder to test than necessary.

- - - - -
16828ca5 by Luite Stegeman at 2023-08-21T18:42:53-04:00
bump process submodule to include macOS fix and JS support

- - - - -
b4d5f6ed by Matthew Pickering at 2023-08-21T18:43:29-04:00
ci: Add support for triggering test-primops pipelines

This commit adds 4 ways to trigger testing with test-primops.

1. Applying the ~test-primops label to a validate pipeline.
2. A manually triggered job on a validate pipeline
3. A nightly pipeline job
4. A release pipeline job

Fixes #23695

- - - - -
32c50daa by Matthew Pickering at 2023-08-21T18:43:29-04:00
Add test-primops label support

The test-primops CI job requires some additional builds in the
validation pipeline, so we make sure to enable these jobs when
test-primops label is set.

- - - - -
73ca8340 by Matthew Pickering at 2023-08-21T18:43:29-04:00
Revert "Aarch ncg: Optimize immediate use for address calculations"

This reverts commit 8f3b3b78a8cce3bd463ed175ee933c2aabffc631.

See #23793

- - - - -
5546ad9e by Matthew Pickering at 2023-08-21T18:43:29-04:00
Revert "AArch NCG: Pure refactor"

This reverts commit 00fb6e6b06598752414a0b9a92840fb6ca61338d.

See #23793

- - - - -
02dfcdc2 by Matthew Pickering at 2023-08-21T18:43:29-04:00
Revert "Aarch64 NCG: Use encoded immediates for literals."

This reverts commit 40425c5021a9d8eb5e1c1046e2d5fa0a2918f96c.

See #23793

-------------------------
Metric Increase:
    T4801
    T5321FD
    T5321Fun
-------------------------

- - - - -
7be4a272 by Matthew Pickering at 2023-08-22T08:55:20+01:00
ci: Remove manually triggered test-ci job

This doesn't work on slimmed down pipelines as the needed jobs don't
exist.

If you want to run test-primops then apply the label.

- - - - -
76a4d11b by Jaro Reinders at 2023-08-22T08:08:13-04:00
Remove Ptr example from roles docs

- - - - -
069729d3 by Bryan Richter at 2023-08-22T08:08:49-04:00
Guard against duplicate pipelines in forks

- - - - -
f861423b by Rune K. Svendsen at 2023-08-22T08:09:35-04:00
dump-decls: fix "Ambiguous module name"-error

Fixes errors of the following kind, which happen when dump-decls is run on a package that contains a module name that clashes with that of another package.

```
dump-decls: <no location info>: error:
    Ambiguous module name `System.Console.ANSI.Types':
      it was found in multiple packages:
      ansi-terminal-0.11.4 ansi-terminal-types-0.11.5
```

- - - - -
edd8bc43 by Krzysztof Gogolewski at 2023-08-22T12:31:20-04:00
Fix MultiWayIf linearity checking (#23814)

Co-authored-by: Thomas BAGREL <thomas.bagrel at tweag.io>

- - - - -
4ba088d1 by konsumlamm at 2023-08-22T12:32:02-04:00
Update `Control.Concurrent.*` documentation

- - - - -
59d67be4 by Finley McIlwaine at 2023-08-22T12:13:59-06:00
Refactor estimation of stack info table provenance

This commit greatly refactors the way we compute estimated provenance for stack
info tables. Previously, this process was done using an entirely separate traversal
of the whole Cmm code stream to build the map from info tables to source locations.
The separate traversal is now fused with the Cmm code generation pipeline in
GHC.Driver.Main.

This results in very significant code generation speed ups when -finfo-table-map is
enabled. In testing, this patch reduces code generation times by almost 30% with
-finfo-table-map and -O0, and 60% with -finfo-table-map and -O1 or -O2 .

Fixes #23103

- - - - -
455b9702 by Finley McIlwaine at 2023-08-22T12:13:59-06:00
Add a test checking overhead of -finfo-table-map

We want to make sure we don't end up with long codegen times resulting from
-finfo-table-map again as in #23103. This test ensures the overhead stays below
the new accepted overhead after !11023.

- - - - -


11 changed files:

- .gitlab-ci.yml
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/generate-ci/generate-job-metadata
- .gitlab/generate-ci/generate-jobs
- .gitlab/jobs.yaml
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/CmmToAsm/AArch64/Regs.hs
- compiler/GHC/Driver/GenerateCgIPEStub.hs
- compiler/GHC/Driver/Main.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fecaff4a0581a9917ce6500a25933ad4aaeb221f...455b97022308debda3a14c6166f2493954068bbc

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fecaff4a0581a9917ce6500a25933ad4aaeb221f...455b97022308debda3a14c6166f2493954068bbc
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/20230822/f8b5e913/attachment-0001.html>


More information about the ghc-commits mailing list