[Git][ghc/ghc][wip/T25281] 17 commits: SpecConstr: Introduce a separate argument limit for forced specs.
Simon Peyton Jones (@simonpj)
gitlab at gitlab.haskell.org
Fri Oct 4 21:06:01 UTC 2024
Simon Peyton Jones pushed to branch wip/T25281 at Glasgow Haskell Compiler / GHC
Commits:
da20cac1 by Andreas Klebinger at 2024-10-02T22:18:48-04:00
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
- - - - -
39497eed by Andreas Klebinger at 2024-10-02T22:19:24-04:00
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
- - - - -
e9dc2690 by Sylvain Henry at 2024-10-02T22:20:06-04:00
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).
- - - - -
64e876bc by Rodrigo Mesquita at 2024-10-02T22:20:43-04:00
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
- - - - -
36bbb167 by Matthew Pickering at 2024-10-02T22:21:18-04:00
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
- - - - -
0029ca91 by Matthew Pickering at 2024-10-02T22:21:54-04:00
configure: Allow happy-2.0.2
happy-2.0.2 can be used to compile GHC.
happy-2.0 and 2.0.1 have bugs which make it unsuitable to use.
The version bound is now == 1.20.* || >= 2.0.2 && < 2.1
Fixes #25276
- - - - -
92976985 by ARATA Mizuki at 2024-10-02T22:22:35-04:00
Use bundled llc/opt on Windows (#22438)
- - - - -
af59749a by Matthew Pickering at 2024-10-02T22:23:11-04:00
Fix registerArch for riscv64
The register allocator doesn't support vector registers on riscv64,
therefore advertise as NoVectors.
Fixes #25314
- - - - -
a49e66fc by Matthew Pickering at 2024-10-02T22:23:11-04:00
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
- - - - -
115a30e9 by Andreas Klebinger at 2024-10-02T22:23:11-04:00
Add support for fp min/max to riscv
Fixes #25313
- - - - -
f28b5992 by Ben Gamari at 2024-10-02T22:23:47-04:00
testsuite/perf: Report better error message on malformed note
Previously a malformed perf note resulted in very poor errors.
Here we slight improve this situation.
- - - - -
51377508 by Ben Gamari at 2024-10-02T22:23:47-04:00
testsuite: Handle division-by-zero more gracefully
Previously we would fail with an ZeroDivisionError.
Fixes #25321
- - - - -
50490075 by Matthew Pickering at 2024-10-03T05:55:13-04:00
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
- - - - -
9cf1cef5 by Zubin Duggal at 2024-10-03T05:55:49-04:00
haddock: Bump binary interface version to 46.
This allows haddock to give good error messages when being used on mismatched interface files.
We bump to 46 since GHC 9.12 uses version 45: https://gitlab.haskell.org/ghc/ghc/-/commit/362afd632032ee8f174690c3ffe0015076b83ce6
This should have been done in e4ac1b0d281b85a0144d1ef6f84a1df00e236052 but was overlooked.
- - - - -
2293c0b7 by Andreas Klebinger at 2024-10-03T05:56:25-04:00
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
- - - - -
f2103575 by Sebastian Graf at 2024-10-04T22:04:47+01:00
Desugaring, plus -Wincomplete-record-selectors
This commit does several related things:
* Major refactor of the handling of applications in the desugarer.
Now all applications are handled in `dsApp`, `ds_app` and related
functions. This dramatically simplifies the code and removes
complicated cruft that had accumulated. Hooray.
Fixes #25281.
* Improve the handling of -Wincomplete-record-selectors.
We now incorporate the result type of unsaturated record selector
applications as well as consider long-distance information in
getField applications.
Plus, the implmentation now builds the improved `dsApp` stuff
above, so it is much easier to understand.
Plus, incorporates improved error message wording suggested
by Adam Gundry in !12685.
Fixes #24824, #24891
See the long Note [Detecting incomplete record selectors]
* Add -Wincomplete-record-selectors to -Wall, as specified in
GHC Proposal 516.
To do this, I also had to add -Wno-incomplete-record-selectors
to the build flags for Cabal in GHC's CI. See
hadrian/src/Settings/Warnings.hs. We can remove this when
Cabal is updated so that it doesn't trigger the warning:
https://github.com/haskell/cabal/issues/10402
2.6% decrease in compile time allocation in RecordUpPerf
Metric Decrease:
RecordUpdPerf
- - - - -
70a9d1f4 by Simon Peyton Jones at 2024-10-04T22:05:45+01:00
Elmininate incomplete record selectors
This patch is a pure refactor of GHC's source code, to avoid the use
of partial record selectors. It was provoked by adding
-Wincomplete-record-selectors to -Wall (as the GHC Proposal specified),
which in turn showed up lots of places where GHC was using incomplete
record selectors.
This patch does mostly-simple refactoring to make it clear to the pattern
match checker that there is in fact no partiality.
There is one externally-visible change: I changed the data type HoleFit
to split out the two cases
data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc
data TcHoleFit = HoleFit { ...lots of fields }
There are large swathes of code that just deal with `TcHoleFit`, and
having it as a separate data types makes it apparent that `RawHoleFit`
can't occur.
This makes it much better -- but the change is visible in the
HolePlugin interface. I decided that there are so few clients of this
API that it's worth the change.
I moved several functions from Language.Haskell.Syntax to GHC.Hs.
Reason, when instantiated at (GhcPass _), the extension data construtcor
is guaranteed unused, and that justifies omitted patterns in these
functions. By putting them in GHC.Hs.X I can specialise the type for
(GhcPass _) and thereby make the function total.
An interesting side-light is that there were a few local function
definitions without a type signature, like this one in GHC.Parser.Header
convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i)
This is fully closed, and so is generalised; but that generalises
it to any old pass, not (GhcPass _), so GHC rightly complains about the
use of the selector `ideclPkgQual`. I added a type signature to `i`, thus
convImport (L _ (i::ImportDecl GhcPs))
= (ideclPkgQual i, reLoc $ ideclName i)
which specialised the function enough to make the record selector complete.
Quite a surprising consequence of local let-generalisation!
- - - - -
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/Dwarf/Types.hs
- compiler/GHC/CmmToAsm/RV64/CodeGen.hs
- compiler/GHC/CmmToAsm/RV64/Instr.hs
- compiler/GHC/CmmToAsm/RV64/Ppr.hs
- compiler/GHC/CmmToAsm/Reg/Graph/Stats.hs
- compiler/GHC/CmmToLlvm.hs
- compiler/GHC/CmmToLlvm/Base.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/ConLike.hs
- compiler/GHC/Core/FVs.hs
- compiler/GHC/Core/LateCC/OverloadedCalls.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/CprAnal.hs
- compiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/Opt/Simplify/Env.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/Subst.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/CoreToIface.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e6d281e3595eaee513094a6c5d996337b432e380...70a9d1f404edf37a913ffc6467897ed79c884e00
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e6d281e3595eaee513094a6c5d996337b432e380...70a9d1f404edf37a913ffc6467897ed79c884e00
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/20241004/5055b0bd/attachment-0001.html>
More information about the ghc-commits
mailing list