[Git][ghc/ghc][wip/hadrian-haddock-opts] 46 commits: ci: Test bootstrapping configurations with full-ci and on marge batches
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Thu Aug 3 19:39:58 UTC 2023
Ben Gamari pushed to branch wip/hadrian-haddock-opts at Glasgow Haskell Compiler / GHC
Commits:
5d45b92a by Matthew Pickering at 2023-07-27T05:46:46-04:00
ci: Test bootstrapping configurations with full-ci and on marge batches
There have been two incidents recently where bootstrapping has been
broken by removing support for building with 9.2.*.
The process for bumping the minimum required version starts with bumping
the configure version and then other CI jobs such as the bootstrap jobs
have to be updated. We must not silently bump the minimum required
version.
Now we are running a slimmed down validate pipeline it seems worthwile
to test these bootstrap configurations in the full-ci pipeline.
- - - - -
25d4fee7 by Matthew Pickering at 2023-07-27T05:46:46-04:00
bootstrap: Remove ghc-9_2_* plans
We are anticipating shortly making it necessary to use ghc-9.4 to boot
the compiler.
- - - - -
2f66da16 by Matthew Pickering at 2023-07-27T05:46:46-04:00
Update bootstrap plans for ghc-platform and ghc-toolchain dependencies
Fixes #23735
- - - - -
c8c6eab1 by Matthew Pickering at 2023-07-27T05:46:46-04:00
bootstrap: Disable -selftest flag from bootstrap plans
This saves on building one dependency (QuickCheck) which is unecessary
for bootstrapping.
- - - - -
a80ca086 by Bodigrim at 2023-07-27T05:47:26-04:00
Link reference paper and package from System.Mem.{StableName,Weak}
- - - - -
a5319358 by David Knothe at 2023-07-28T13:13:10-04:00
Update Match Datatype
EquationInfo currently contains a list of the equation's patterns together with a CoreExpr that is to be evaluated after a successful match on this equation.
All the match-functions only operate on the first pattern of an equation - after successfully matching it, match is called recursively on the tail of the pattern list.
We can express this more clearly and make the code a little more elegant by updating the datatype of EquationInfo as follows:
data EquationInfo
= EqnMatch { eqn_pat = Pat GhcTc, eqn_rest = EquationInfo }
| EqnDone { eqn_rhs = MatchResult CoreExpr }
An EquationInfo now explicitly exposes its first pattern which most functions operate on, and exposes the equation that remains after processing the first pattern. An EqnDone signifies an empty equation where the CoreExpr can now be evaluated.
- - - - -
86ad1af9 by David Binder at 2023-07-28T13:13:53-04:00
Improve documentation for Data.Fixed
- - - - -
f8fa1d08 by Ben Gamari at 2023-07-28T13:14:31-04:00
ghc-prim: Use C11 atomics
Previously `ghc-prim`'s atomic wrappers used the legacy `__sync_*`
family of C builtins. Here we refactor these to rather use the
appropriate C11 atomic equivalents, allowing us to be more explicit
about the expected ordering semantics.
- - - - -
0bfc8908 by Finley McIlwaine at 2023-07-28T18:46:26-04:00
Include -haddock in DynFlags fingerprint
The -haddock flag determines whether or not the resulting .hi files
contain haddock documentation strings. If the existing .hi files do
not contain haddock documentation strings and the user requests them,
we should recompile.
- - - - -
40425c50 by Andreas Klebinger at 2023-07-28T18:47:02-04:00
Aarch64 NCG: Use encoded immediates for literals.
Try to generate
instr x2, <imm>
instead of
mov x1, lit
instr x2, x1
When possible. This get's rid if quite a few redundant
mov instructions.
I believe this causes a metric decrease for LargeRecords as
we reduce register pressure.
-------------------------
Metric Decrease:
LargeRecord
-------------------------
- - - - -
e9a0fa3f by Bodigrim at 2023-07-28T18:47:42-04:00
Bump filepath submodule to 1.4.100.4
Resolves #23741
Metric Decrease:
MultiComponentModules
MultiComponentModulesRecomp
MultiLayerModules
MultiLayerModulesRecomp
T10421
T12234
T12425
T13035
T13701
T13719
T16875
T18304
T18698a
T18698b
T21839c
T9198
TcPlugin_RewritePerf
hard_hole_fits
Metric decrease on Windows can be probably attributed to https://github.com/haskell/filepath/pull/183
- - - - -
ee93edfd by Bodigrim at 2023-07-28T18:48:21-04:00
Add since pragmas to GHC.IO.Handle.FD
- - - - -
d0369802 by Simon Peyton Jones at 2023-07-30T09:24:48+01:00
Make the occurrence analyser smarter about join points
This MR addresses #22404. There is a big Note
Note [Occurrence analysis for join points]
that explains it all. Significant changes
* New field occ_join_points in OccEnv
* The NonRec case of occAnalBind splits into two cases:
one for existing join points (which does the special magic for
Note [Occurrence analysis for join points], and one for other
bindings.
* mkOneOcc adds in info from occ_join_points.
* All "bring into scope" activity is centralised in the
new function `addInScope`.
* I made a local data type LocalOcc for use inside the occurrence analyser
It is like OccInfo, but lacks IAmDead and IAmALoopBreaker, which in turn
makes computationns over it simpler and more efficient.
* I found quite a bit of allocation in GHC.Core.Rules.getRules
so I optimised it a bit.
More minor changes
* I found I was using (Maybe Arity) a lot, so I defined a new data
type JoinPointHood and used it everwhere. This touches a lot of
non-occ-anal files, but it makes everything more perspicuous.
* Renamed data constructor WithUsageDetails to WUD, and
WithTailUsageDetails to WTUD
This also fixes #21128, on the way.
--------- Compiler perf -----------
I spent quite a time on performance tuning, so even though it
does more than before, the occurrence analyser runs slightly faster
on average. Here are the compile-time allocation changes over 0.5%
CoOpt_Read(normal) ghc/alloc 766,025,520 754,561,992 -1.5%
CoOpt_Singletons(normal) ghc/alloc 759,436,840 762,925,512 +0.5%
LargeRecord(normal) ghc/alloc 1,814,482,440 1,799,530,456 -0.8%
PmSeriesT(normal) ghc/alloc 68,159,272 67,519,720 -0.9%
T10858(normal) ghc/alloc 120,805,224 118,746,968 -1.7%
T11374(normal) ghc/alloc 164,901,104 164,070,624 -0.5%
T11545(normal) ghc/alloc 79,851,808 78,964,704 -1.1%
T12150(optasm) ghc/alloc 73,903,664 71,237,544 -3.6% GOOD
T12227(normal) ghc/alloc 333,663,200 331,625,864 -0.6%
T12234(optasm) ghc/alloc 52,583,224 52,340,344 -0.5%
T12425(optasm) ghc/alloc 81,943,216 81,566,720 -0.5%
T13056(optasm) ghc/alloc 294,517,928 289,642,512 -1.7%
T13253-spj(normal) ghc/alloc 118,271,264 59,859,040 -49.4% GOOD
T15164(normal) ghc/alloc 1,102,630,352 1,091,841,296 -1.0%
T15304(normal) ghc/alloc 1,196,084,000 1,166,733,000 -2.5%
T15630(normal) ghc/alloc 148,729,632 147,261,064 -1.0%
T15703(normal) ghc/alloc 379,366,664 377,600,008 -0.5%
T16875(normal) ghc/alloc 32,907,120 32,670,976 -0.7%
T17516(normal) ghc/alloc 1,658,001,888 1,627,863,848 -1.8%
T17836(normal) ghc/alloc 395,329,400 393,080,248 -0.6%
T18140(normal) ghc/alloc 71,968,824 73,243,040 +1.8%
T18223(normal) ghc/alloc 456,852,568 453,059,088 -0.8%
T18282(normal) ghc/alloc 129,105,576 131,397,064 +1.8%
T18304(normal) ghc/alloc 71,311,712 70,722,720 -0.8%
T18698a(normal) ghc/alloc 208,795,112 210,102,904 +0.6%
T18698b(normal) ghc/alloc 230,320,736 232,697,976 +1.0% BAD
T19695(normal) ghc/alloc 1,483,648,128 1,504,702,976 +1.4%
T20049(normal) ghc/alloc 85,612,024 85,114,376 -0.6%
T21839c(normal) ghc/alloc 415,080,992 410,906,216 -1.0% GOOD
T4801(normal) ghc/alloc 247,590,920 250,726,272 +1.3%
T6048(optasm) ghc/alloc 95,699,416 95,080,680 -0.6%
T783(normal) ghc/alloc 335,323,384 332,988,120 -0.7%
T9233(normal) ghc/alloc 709,641,224 685,947,008 -3.3% GOOD
T9630(normal) ghc/alloc 965,635,712 948,356,120 -1.8%
T9675(optasm) ghc/alloc 444,604,152 428,987,216 -3.5% GOOD
T9961(normal) ghc/alloc 303,064,592 308,798,800 +1.9% BAD
WWRec(normal) ghc/alloc 503,728,832 498,102,272 -1.1%
geo. mean -1.0%
minimum -49.4%
maximum +1.9%
In fact these figures seem to vary between platforms; generally worse
on i386 for some reason. The Windows numbers vary by 1% espec in
benchmarks where the total allocation is low. But the geom mean stays
solidly negative, which is good. The "increase/decrease" list below
covers all platforms.
The big win on T13253-spj comes because it has a big nest of join
points, each occurring twice in the next one. The new occ-anal takes
only one iteration of the simplifier to do the inlining; the old one
took four. Moreover, we get much smaller code with the new one:
New: Result size of Tidy Core
= {terms: 429, types: 84, coercions: 0, joins: 14/14}
Old: Result size of Tidy Core
= {terms: 2,437, types: 304, coercions: 0, joins: 10/10}
--------- Runtime perf -----------
No significant changes in nofib results, except a 1% reduction in
compiler allocation.
Metric Decrease:
CoOpt_Read
T13253-spj
T9233
T9630
T9675
T12150
T21839c
LargeRecord
MultiComponentModulesRecomp
T10421
T13701
T10421
T13701
T12425
Metric Increase:
T18140
T9961
T18282
T18698a
T18698b
T19695
- - - - -
42aa7fbd by Julian Ospald at 2023-07-30T17:22:01-04:00
Improve documentation around IOException and ioe_filename
See:
* https://github.com/haskell/core-libraries-committee/issues/189
* https://github.com/haskell/unix/pull/279
* https://github.com/haskell/unix/pull/289
- - - - -
33598ecb by Sylvain Henry at 2023-08-01T14:45:54-04:00
JS: implement getMonotonicTime (fix #23687)
- - - - -
d2bedffd by Bartłomiej Cieślar at 2023-08-01T14:46:40-04:00
Implementation of the Deprecated Instances proposal #575
This commit implements the ability to deprecate certain instances,
which causes the compiler to emit the desired deprecation message
whenever they are instantiated. For example:
module A where
class C t where
instance {-# DEPRECATED "dont use" #-} C Int where
module B where
import A
f :: C t => t
f = undefined
g :: Int
g = f -- "dont use" emitted here
The implementation is as follows:
- In the parser, we parse deprecations/warnings attached to instances:
instance {-# DEPRECATED "msg" #-} Show X
deriving instance {-# WARNING "msg2" #-} Eq Y
(Note that non-standalone deriving instance declarations do not support
this mechanism.)
- We store the resulting warning message in `ClsInstDecl` (respectively, `DerivDecl`).
In `GHC.Tc.TyCl.Instance.tcClsInstDecl` (respectively, `GHC.Tc.Deriv.Utils.newDerivClsInst`),
we pass on that information to `ClsInst` (and eventually store it in `IfaceClsInst` too).
- Finally, when we solve a constraint using such an instance, in
`GHC.Tc.Instance.Class.matchInstEnv`, we emit the appropriate warning
that was stored in `ClsInst`.
Note that we only emit a warning when the instance is used in a different module
than it is defined, which keeps the behaviour in line with the deprecation of
top-level identifiers.
Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com>
- - - - -
d5a65af6 by Ben Gamari at 2023-08-01T14:47:18-04:00
compiler: Style fixes
- - - - -
7218c80a by Ben Gamari at 2023-08-01T14:47:19-04:00
rts: Fix implicit cast
This ensures that Task.h can be built with a C++ compiler.
- - - - -
d6d5aafc by Ben Gamari at 2023-08-01T14:47:19-04:00
testsuite: Fix warning in hs_try_putmvar001
- - - - -
d9eddf7a by Ben Gamari at 2023-08-01T14:47:19-04:00
testsuite: Add AtomicModifyIORef test
- - - - -
f9eea4ba by Ben Gamari at 2023-08-01T14:47:19-04:00
rts: Introduce NO_WARN macro
This allows fine-grained ignoring of warnings.
- - - - -
497b24ec by Ben Gamari at 2023-08-01T14:47:19-04:00
rts: Simplify atomicModifyMutVar2# implementation
Previously we would perform a redundant load in the non-threaded RTS in
atomicModifyMutVar2# implementation for the benefit of the non-moving
GC's write barrier. Eliminate this.
- - - - -
52ee082b by Ben Gamari at 2023-08-01T14:47:19-04:00
rts: Introduce more principled fence operations
- - - - -
cd3c0377 by Ben Gamari at 2023-08-01T14:47:19-04:00
rts: Introduce SET_INFO_RELAXED
- - - - -
6df2352a by Ben Gamari at 2023-08-01T14:47:19-04:00
rts: Style fixes
- - - - -
4ef6f319 by Ben Gamari at 2023-08-01T14:47:19-04:00
codeGen/tsan: Rework handling of spilling
- - - - -
f9ca7e27 by Ben Gamari at 2023-08-01T14:47:19-04:00
hadrian: More debug information
- - - - -
df4153ac by Ben Gamari at 2023-08-01T14:47:19-04:00
Improve TSAN documentation
- - - - -
fecae988 by Ben Gamari at 2023-08-01T14:47:19-04:00
hadrian: More selective TSAN instrumentation
- - - - -
465a9a0b by Alan Zimmerman at 2023-08-01T14:47:56-04:00
EPA: Provide correct annotation span for ImportDecl
Use the whole declaration, rather than just the span of the 'import'
keyword.
Metric Decrease:
T9961
T5205
Metric Increase:
T13035
- - - - -
ae63d0fa by Bartłomiej Cieślar at 2023-08-01T14:48:40-04:00
Add cases to T23279: HasField for deprecated record fields
This commit adds additional tests from ticket #23279 to ensure that we don't
regress on reporting deprecated record fields in conjunction with HasField,
either when using overloaded record dot syntax or directly through `getField`.
Fixes #23279
- - - - -
00fb6e6b by Andreas Klebinger at 2023-08-01T14:49:17-04:00
AArch NCG: Pure refactor
Combine some alternatives. Add some line breaks for overly long lines
- - - - -
8f3b3b78 by Andreas Klebinger at 2023-08-01T14:49:54-04:00
Aarch ncg: Optimize immediate use for address calculations
When the offset doesn't fit into the immediate we now just reuse the
general getRegister' code path which is well optimized to compute the
offset into a register instead of a special case for CmmRegOff.
This means we generate a lot less code under certain conditions which is
why performance metrics for these improve.
-------------------------
Metric Decrease:
T4801
T5321FD
T5321Fun
-------------------------
- - - - -
74a882dc by MorrowM at 2023-08-02T06:00:03-04:00
Add a RULE to make lookup fuse
See https://github.com/haskell/core-libraries-committee/issues/175
Metric Increase:
T18282
- - - - -
cca74dab by Ben Gamari at 2023-08-02T06:00:39-04:00
hadrian: Ensure that way-flags are passed to CC
Previously the way-specific compilation flags (e.g. `-DDEBUG`,
`-DTHREADED_RTS`) would not be passed to the CC invocations. This meant
that C dependency files would not correctly reflect
dependencies predicated on the way, resulting in the rather
painful #23554.
Closes #23554.
- - - - -
622b483c by Jaro Reinders at 2023-08-02T06:01:20-04:00
Native 32-bit Enum Int64/Word64 instances
This commits adds more performant Enum Int64 and Enum Word64 instances
for 32-bit platforms, replacing the Integer-based implementation.
These instances are a copy of the Enum Int and Enum Word instances with
minimal changes to manipulate Int64 and Word64 instead.
On i386 this yields a 1.5x performance increase and for the JavaScript
back end it even yields a 5.6x speedup.
Metric Decrease:
T18964
- - - - -
c8bd7fa4 by Sylvain Henry at 2023-08-02T06:02:03-04:00
JS: fix typos in constants (#23650)
- - - - -
b9d5bfe9 by Josh Meredith at 2023-08-02T06:02:40-04:00
JavaScript: update MK_TUP macros to use current tuple constructors (#23659)
- - - - -
28211215 by Matthew Pickering at 2023-08-02T06:03:19-04:00
ci: Pass -Werror when building hadrian in hadrian-ghc-in-ghci job
Warnings when building Hadrian can end up cluttering the output of HLS,
and we've had bug reports in the past about these warnings when building
Hadrian. It would be nice to turn on -Werror on at least one build of
Hadrian in CI to avoid a patch introducing warnings when building
Hadrian.
Fixes #23638
- - - - -
aca20a5d by Ben Gamari at 2023-08-02T06:03:55-04:00
codeGen: Ensure that TSAN is aware of writeArray# write barriers
By using a proper release store instead of a fence.
- - - - -
453c0531 by Ben Gamari at 2023-08-02T06:03:55-04:00
codeGen: Ensure that array reads have necessary barriers
This was the cause of #23541.
- - - - -
93a0d089 by Arnaud Spiwack at 2023-08-02T06:04:37-04:00
Add test for #23550
- - - - -
6a2f4a20 by Arnaud Spiwack at 2023-08-02T06:04:37-04:00
Desugar non-recursive lets to non-recursive lets (take 2)
This reverts commit 522bd584f71ddeda21efdf0917606ce3d81ec6cc. And
takes care of the case that I missed in my previous attempt. Namely
the case of an AbsBinds with no type variables and no dictionary
variable.
Ironically, the comment explaining why non-recursive lets were
desugared to recursive lets were pointing specifically at this case
as the reason. I just failed to understand that it was until Simon PJ
pointed it out to me.
See #23550 for more discussion.
- - - - -
ff81d53f by jade at 2023-08-02T06:05:20-04:00
Expand documentation of List & Data.List
This commit aims to improve the documentation and examples
of symbols exported from Data.List
- - - - -
fa4e5913 by Jade at 2023-08-02T06:06:03-04:00
Improve documentation of Semigroup & Monoid
This commit aims to improve the documentation of various symbols
exported from Data.Semigroup and Data.Monoid
- - - - -
6a9ef839 by Ben Gamari at 2023-08-03T19:39:55+00:00
hadrian: Allow haddock options to be passed via key-value settings
- - - - -
21 changed files:
- .gitlab-ci.yml
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/Cmm/ThreadSanitizer.hs
- 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/Core/InstEnv.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/CSE.hs
- compiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/Opt/Exitify.hs
- compiler/GHC/Core/Opt/FloatIn.hs
- compiler/GHC/Core/Opt/FloatOut.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/SetLevels.hs
- compiler/GHC/Core/Opt/Simplify/Env.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/WorkWrap.hs
- compiler/GHC/Core/Ppr.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6b06288b565548ab306f255158fc7d84c2c526d8...6a9ef839796f5eb3dc511857d7d4f58ffe4718c1
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6b06288b565548ab306f255158fc7d84c2c526d8...6a9ef839796f5eb3dc511857d7d4f58ffe4718c1
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/20230803/6ef12dbf/attachment-0001.html>
More information about the ghc-commits
mailing list