[Git][ghc/ghc][ghc-9.12] 47 commits: SpecConstr: Introduce a separate argument limit for forced specs.

Zubin (@wz1000) gitlab at gitlab.haskell.org
Wed Oct 16 14:51:30 UTC 2024



Zubin pushed to branch ghc-9.12 at Glasgow Haskell Compiler / GHC


Commits:
18860aa6 by Andreas Klebinger at 2024-10-13T21:07:34+05:30
SpecConstr: Introduce a separate argument limit for forced specs.

We used to put no limit at all on specializations forced via the SPEC
argument. This isn't always reasonable so we introduce a very high limit
that applies to forced specializations, a flag to control it, and we now
emit a warning if we fail a specialization because we exceed the
warning.

Fixes #25197

(cherry picked from commit da20cac16d0982c982f9d6779dc8174e5184fe15)

- - - - -
0904d0c1 by Andreas Klebinger at 2024-10-13T21:08:23+05:30
ghc-experimental: Expose primops and ghc extensions via GHC.PrimOps

This will be the new place for functions that would have gone into
GHC.Exts in the past but are not stable enough to do so now.

Addresses #25242

(cherry picked from commit 39497eeda74fc7f1e7ea89292de395b16f69cee2)

- - - - -
187b2d5d by Sylvain Henry at 2024-10-13T21:08:36+05:30
RTS: cleanup timerfd file descriptors after a fork (#25280)

When we init a timerfd-based ticker, we should be careful to cleanup the
old file descriptors (e.g. after a fork).

(cherry picked from commit e9dc26907e13eeb73514ff3f70323b40b40ef8ac)

- - - - -
b9b6807e by Matthew Pickering at 2024-10-13T21:08:51+05:30
Bump LLVM upper bound to allow LLVM 19

Also bumps the ci-images commit so that the deb12 images uses LLVM 19
for testing.

-------------------------
Metric Decrease:
    size_hello_artifact_gzip
    size_hello_unicode_gzip
-------------------------

Fixes #25295

(cherry picked from commit 36bbb167f354a2fbc6c4842755f2b1e374e3580e)

- - - - -
d6b8a4fb by ARATA Mizuki at 2024-10-13T21:09:19+05:30
Use bundled llc/opt on Windows (#22438)

(cherry picked from commit 92976985625ffba551f1e1422f5e3a0cbf7beb89)

- - - - -
f9a0dc6d by Andreas Klebinger at 2024-10-13T21:09:36+05:30
Change versionig of ghc-experimental to follow ghc versions.

Just like ghc-internal it will now use the @ProjectVersionForLib@ macro for versioning.
This means for ghc=9.10.1, ghc-experimental's version will be 9.1001.0 and so on.

This fixes #25289

(cherry picked from commit 2293c0b7d709df7be04f596e72c97fd2435c4134)

- - - - -
a85c33c4 by Rodrigo Mesquita at 2024-10-13T21:09:47+05:30
determinism: Deterministic MonadGetUnique LlvmM

Update LlvmM to thread a unique deterministic supply (using UniqDSMT),
and use it in the MonadGetUnique instance.

This makes uniques sampled from LlvmM deterministic, which guarantees
object determinism with -fllvm.

Fixes #25274

(cherry picked from commit 64e876bc0a5dd5d59b47ee3969b52a3bcecb37e6)

- - - - -
623a2534 by Cheng Shao at 2024-10-13T21:09:56+05:30
testsuite: remove accidentally checked in debug print logic

(cherry picked from commit bcb293f216e56c8dfd199f990e8eaa48071ef845)

- - - - -
6bbb7588 by Daniel Díaz at 2024-10-13T21:10:06+05:30
Clarify the meaning of "exactly once" in LinearTypes

Solves documentaion issue #25084.

(cherry picked from commit 535a2117239f0d0e4588c6616fcd8deed725cfc0)

- - - - -
b78e8c5b by Krzysztof Gogolewski at 2024-10-13T21:10:14+05:30
Only allow (a => b) :: Constraint rather than CONSTRAINT rep

Fixes #25243

(cherry picked from commit 92f8939a5fa689dc0143501cfeac0b3b2cd7abd6)

- - - - -
a4328a4c by Teo Camarasu at 2024-10-13T21:11:42+05:30
Add changelog entries for !12479

(cherry picked from commit c9590ba0703d65ecb9d71ac8390c1ae1144bd9d0)

- - - - -
616dfef0 by Matthew Pickering at 2024-10-13T21:12:05+05:30
Fix registerArch for riscv64

The register allocator doesn't support vector registers on riscv64,
therefore advertise as NoVectors.

Fixes #25314

(cherry picked from commit af59749abb723283fa42b51f62a8ac8b345a7f8f)

- - - - -
76549660 by Matthew Pickering at 2024-10-13T21:12:20+05:30
riscv: Avoid using csrr instruction to test for vector registers

The csrr instruction isn't allowed in qemu user-mode, and raises an
illegal instruction error when it is encountered.

Therefore for now, we just hard-code that there is no support for vector
registers since the rest of the compiler doesn't support vector
registers for riscv.

Fixes #25312

(cherry picked from commit a49e66fcf26632b31991384193e9fc0f7d051adc)

- - - - -
30e85658 by Andreas Klebinger at 2024-10-13T21:12:35+05:30
Add support for fp min/max to riscv

Fixes #25313

(cherry picked from commit 115a30e9142b4481de3ba735396e9d0417d46445)

- - - - -
a4b9b1a2 by Sven Tennie at 2024-10-13T21:12:45+05:30
CCallConv test: Align argument types

The C calling convention / standard requires that arguments and their
values are of the same type.

(cherry picked from commit 5fd320da57bb52458bb1e8c14c5311129d88a3a7)

- - - - -
328dedef by sheaf at 2024-10-13T21:12:56+05:30
user's guide: update docs for X86 CPU flags

This commit updates the section of the user's guide pertaining to
X86 feature flags with the following changes:

  - the NCG backend now supports SIMD, so remove all text
    that says the contrary,
  - the LLVM backend does not "automatically detect" features,
    so remove any text that makes that claim.

(cherry picked from commit 9c9c790dbca89722080f47158001ac3920f11606)

- - - - -
7b07c101 by Matthew Pickering at 2024-10-13T21:13:04+05:30
ci: Add nightly & release ubuntu-22.04 jobs

This adds build of bindists on ubuntu-22.04 on nightly and release
pipelines.

We also update ghcup-metadata to provide ubuntu-22.04 bindists on
ubuntu-22.04.

Fixes #25317

(cherry picked from commit 504900755e3297c000a3bcf4f20eaae1f10298f4)

- - - - -
86f3005b by Cheng Shao at 2024-10-13T21:13:52+05:30
driver: bail out when -fllvm is passed to GHC not configured with LLVM

This patch makes GHC bail out with an proper error message when it's
not configured with LLVM but users attempt to pass -fllvm, see #25011
and added comment for details.

Fixes #25011

Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com>
(cherry picked from commit 2338a971ce45ce7bc6ba2711e40966ec5ff12359)

- - - - -
abd0d124 by Simon Peyton Jones at 2024-10-13T21:16:19+05:30
Consider Wanteds with rewriters as insoluble

This MR fixes #25325

See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2)

There is a small change in the error message for T14172, but it looks
entirely acceptable to me.

(cherry picked from commit 083703a12cd34369e7ed2f0efc4a5baee47aedab)

- - - - -
fbbba0f1 by Simon Peyton Jones at 2024-10-13T21:16:27+05:30
Wibbles

(cherry picked from commit 0dfaeb66fb8457e7339abbd44d5c53a81ad8ae3a)

- - - - -
7164dbca by Simon Peyton Jones at 2024-10-13T21:16:33+05:30
Spelling errors

(cherry picked from commit 09d24d828e48c2588a317e6dad711f8673983703)

- - - - -
aa5026c7 by sheaf at 2024-10-13T21:16:57+05:30
LLVM: use sse4.2 instead of sse42

LLVM expects the former instead of the latter since version 3.4.

Fixes #25019

(cherry picked from commit 694489edf35c35b29fbdf09a8e3fdc404469858f)

- - - - -
0b323326 by sheaf at 2024-10-13T21:17:15+05:30
LLVM: make SSE4.2 imply +popcnt

For consistency with the NCG as well as with Clang and GCC, we make
the SSE4.2 feature flag imply +popcnt when using the LLVM backend.

Fixes #25353

(cherry picked from commit 06ae85071b95376bd1eb354f7cc7901aed45b625)

- - - - -
b1f40130 by Ben Gamari at 2024-10-13T21:17:26+05:30
base: Improve documentation of Control.Exception.Backtrace

(cherry picked from commit 0060ece762d7a936daf28195676b6162c30dc845)

- - - - -
95880157 by Ben Gamari at 2024-10-13T21:17:55+05:30
testsuite: Normalise trailing digits from hole fits output

The type variables in the holes fit output from
`abstract_refinement_hole_fits` is quite sensitive to compiler
configuration. Specifically, a slight change in the inlining
behavior of `throw` changes type variable naming in `(>>=)` and a few
others.

Ideally we would make hole fits output more deterministic but in the
meantime we simply normalise this difference away as it not relevant
to the test's goal.

(cherry picked from commit d029f1700effa626ff622700b198ed49ee8b6c19)

- - - - -
f92a8a84 by Ben Gamari at 2024-10-13T21:18:09+05:30
base: Add test for #25066

(cherry picked from commit da5d7d0d8bde06a1c29612fd17b6a579fc523036)

- - - - -
3d0fe159 by Ben Gamari at 2024-10-13T21:22:40+05:30
base: Fix #25066

As noted in #25066, the exception backtrace proposal introduced a rather
subtle performance regression due to simplification producing Core which
the demand analyser concludes may diverge with a precise exception. The
nature of the problem is more completely described in the new Note
[Hiding precise exception signature in throw].

The (rather hacky) solution we use here hides the problematic
optimisation through judicious use of `noinline`. Ultimately however we
will want a more principled solution (e.g. #23847).

Fixes #255066

CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290

Metric Decrease:
    T9872d

(cherry picked from commit eb7ddae1a2b3fb1be1cd635849516a6398327b29)

- - - - -
772b4f59 by Artem Pelenitsyn at 2024-10-13T21:22:40+05:30
Docs: Linear types: link Strict Patterns subsection

Also, fix a bug in RST with missing newline before a listing.

Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net>
(cherry picked from commit 4dd30cba51c7936dc53f0c1d331f88a590f93013)

- - - - -
1418869f by Ben Gamari at 2024-10-13T21:22:40+05:30
base: Add `HasCallStack` constraint to `ioError`

As proposed in core-libraries-committee#275.

(cherry picked from commit 876d6e0e807c074d5c71370aa3c3451bbcb28342)

- - - - -
b5ad81c7 by Matthew Pickering at 2024-10-13T21:22:40+05:30
Fix toException method for ExceptionWithContext

Fixes #25235

(cherry picked from commit 9bfd9fd0730359b4e88e97b08d3654d966a9a11d)

- - - - -
35f20223 by Matthew Pickering at 2024-10-13T21:22:40+05:30
Exception rethrowing

Basic changes:

* Change `catch` function to propagate exceptions using the
  WhileHandling mechanism.
* Introduce `catchNoPropagate`, which does the same as before, but
  passes an exception which can be rethrown.
* Introduce `rethrowIO` combinator, which rethrows an exception with a
  context and doesn't add a new backtrace.
* Introduce `tryWithContext` for a variant of `try` which can rethrow
  the exception with it's original context.
* onException is modified to rethrow the original error rather than
  creating a new callstack.
* Functions which rethrow in GHC.Internal.IO.Handle.FD,
  GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and
  GHC.Internal.System.IO.Error are modified to not add a new callstack.

Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202>

(cherry picked from commit ac0040286a8962b728a7cdb3c1be4691db635366)

- - - - -
a2ec22e7 by Rodrigo Mesquita at 2024-10-13T21:26:21+05:30
Add test for #25300

(cherry picked from commit 0e5cff6676426d614739c74bf6a953ef6e9659e6)

- - - - -
d92aa23a by Rodrigo Mesquita at 2024-10-13T21:26:30+05:30
Backport !13302 docs to users guide

(cherry picked from commit e44e448ea8745a04724420edfa6ab4d24252a53f)

- - - - -
d2f2a3b2 by Alan Zimmerman at 2024-10-13T21:26:50+05:30
EPA: Remove unused hsCaseAnnsRest

We never populate it, so remove it.

(cherry picked from commit 4a2f0f1302f5919dfc9c8cbc410fceb19e7309ba)

- - - - -
b2c53e75 by Alan Zimmerman at 2024-10-13T21:29:24+05:30
EPA: Remove [AddEpAnn] from (most of) HsExpr

EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA`
from `Parser.y`, it is the same as `glR`

EPA: Remove unused annotation from XOpApp

EPA: Use EpToken for XNPat and XNegApp

EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens.

EPA: Use specific annotation for MultiIf

EPA: Move annotations into FunRhs

EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig

EPA: Remove [AddEpAnn] from ArithSeq

EPA: Remove [AddEpAnn] from HsProc

EPA: Remove [AddEpAnn] from HsStatic

EPA: Remove [AddEpAnn] from BindStmt

EPA: Remove [AddEpAnn] from TransStmt

EPA: Remove [AddEpAnn] from HsTypedSplice

EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr
(cherry picked from commit ef481813719c5f6d9d97b60ffef4617307d24c80)

- - - - -
7564b6a7 by Zubin Duggal at 2024-10-13T21:30:30+05:30
hadrian: Handle broken symlinks properly when creating source dist directories

If we have a broken symlink in the repository, don't try to `need` the symlink
or the target of the symlink. Attempting to do so has `shake` attempt to read the
target to compute its hash, which fails because the target doesn't exist.

(cherry picked from commit 8b402da2738ef6bbc17409f1daac7448e064503a)

- - - - -
39e19e26 by Zubin Duggal at 2024-10-13T21:30:37+05:30
hadrian: exclude cabal.project.symlink.broken from source archives

Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately,
this broke our source distribution as we use use `tar --dereference` to avoid
issues with symlink compatibility on windows, and `tar --dereference` chokes
when it encounters any broken symlinks.

We can't get rid of `--dereference` because symlinks are generally broken on
windows, so the only option is to exclude this file from source archives.

see also https://github.com/haskell/cabal/issues/10442

(cherry picked from commit 16f97667a859337e8c82636aca7dd7102aa94b55)

- - - - -
c6dd5542 by Zubin Duggal at 2024-10-13T21:30:44+05:30
Bump Cabal submodule to 3.14

Metric Decrease:
    MultiLayerModulesTH_OneShot
Metric Increase:
    haddock.Cabal

(cherry picked from commit f1a2c9fc140baa0aaeda00c02648aa75deb59723)

- - - - -
e78c7ef9 by Zubin Duggal at 2024-10-14T14:20:59+05:30
haddock: oneshot tests can drop files if they share modtimes. Stop this by
including the filename in the key.

Ideally we would use `ghc -M` output to do a proper toposort

Partially addresses #25372

- - - - -
f230e29f by Zubin Duggal at 2024-10-15T04:26:11+05:30
testsuite: normalise some versions in callstacks

- - - - -
b19de476 by Zubin Duggal at 2024-10-15T04:26:11+05:30
testsuite: use -fhide-source-paths to normalise some backpack tests

- - - - -
fbf0889e by Zubin Duggal at 2024-10-15T04:26:11+05:30
testsuite/haddock: strip version identifiers and unit hashes from html tests

- - - - -
473a201c by Zubin Duggal at 2024-10-15T04:26:11+05:30
Bump base bound to 4.21 for GHC 9.12

- - - - -
a79a587e by Zubin Duggal at 2024-10-15T04:26:11+05:30
testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences

- - - - -
f858875e by Zubin Duggal at 2024-10-15T04:41:35+05:30
testsuite: normalise windows file seperators

- - - - -
24e5761e by Zubin Duggal at 2024-10-15T04:55:36+05:30
testsuite: Mark 25300A as broken on windows

- - - - -
ca2b21c3 by Zubin Duggal at 2024-10-15T04:55:41+05:30
Prepare 9.12.1 alpha

- - - - -


30 changed files:

- .gitlab-ci.yml
- .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
- compiler/GHC/CmmToAsm/RV64/CodeGen.hs
- compiler/GHC/CmmToAsm/RV64/Instr.hs
- compiler/GHC/CmmToAsm/RV64/Ppr.hs
- compiler/GHC/CmmToLlvm.hs
- compiler/GHC/CmmToLlvm/Base.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Errors/Ppr.hs
- compiler/GHC/Driver/Errors/Types.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Dump.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Arrows.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Match.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Platform/Reg/Class.hs
- compiler/GHC/Rename/Bind.hs
- compiler/GHC/Rename/Utils.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/362afd632032ee8f174690c3ffe0015076b83ce6...ca2b21c3429a5ff780cb6c58c33c171a3c0af82b

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/362afd632032ee8f174690c3ffe0015076b83ce6...ca2b21c3429a5ff780cb6c58c33c171a3c0af82b
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/20241016/fecfb7fb/attachment-0001.html>


More information about the ghc-commits mailing list