[Git][ghc/ghc][wip/az/epa-remove-addepann-pat] 52 commits: driver: fix runWorkerLimit on wasm
Alan Zimmerman (@alanz)
gitlab at gitlab.haskell.org
Wed Oct 9 20:54:10 UTC 2024
Alan Zimmerman pushed to branch wip/az/epa-remove-addepann-pat at Glasgow Haskell Compiler / GHC
Commits:
ceca9efb by Cheng Shao at 2024-10-06T02:18:31+00:00
driver: fix runWorkerLimit on wasm
This commit fixes link-time unresolved symbol errors for sem_open etc
on wasm, by making runWorkerLimit always behave single-threaded. This
avoids introducing the jobserver logic into the final wasm module and
thus avoids referencing the posix semaphore symbols.
- - - - -
135fd1ac by Torsten Schmits at 2024-10-06T02:18:31+00:00
Parallelize getRootSummary computations in dep analysis downsweep
This reuses the upsweep step's infrastructure to process batches of
modules in parallel.
I benchmarked this by running `ghc -M` on two sets of 10,000 modules;
one with a linear dependency chain and the other with a binary tree.
Comparing different values for the number of modules per thread
suggested an optimum at `length targets `div` (n_cap * 2)`, with results
similar to this one (6 cores, 12 threads):
```
Benchmark 1: linear 1 jobs
Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s]
Range (min … max): 1.757 s … 1.793 s 2 runs
Benchmark 2: linear 6 jobs
Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms]
Range (min … max): 856.2 ms … 898.0 ms 3 runs
Benchmark 3: linear 12 jobs
Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms]
Range (min … max): 771.9 ms … 818.0 ms 3 runs
```
Results don't differ much when the batch size is reduced to a quarter
of that, but there's significant thread scheduling overhead for a size
of 1:
```
Benchmark 1: linear 1 jobs
Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s]
Range (min … max): 2.591 s … 2.632 s 2 runs
Benchmark 2: linear 6 jobs
Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s]
Range (min … max): 1.184 s … 1.194 s 2 runs
Benchmark 3: linear 12 jobs
Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s]
Range (min … max): 1.093 s … 1.101 s 2 runs
```
Larger batches also slightly worsen performance.
- - - - -
535a2117 by Daniel Díaz at 2024-10-06T09:51:46-04:00
Clarify the meaning of "exactly once" in LinearTypes
Solves documentaion issue #25084.
- - - - -
92f8939a by Krzysztof Gogolewski at 2024-10-06T09:52:22-04:00
Only allow (a => b) :: Constraint rather than CONSTRAINT rep
Fixes #25243
- - - - -
4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00
EPA: Remove unused hsCaseAnnsRest
We never populate it, so remove it.
- - - - -
5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00
rts: Fix invocation of __ieee_set_fp_control() on alpha-linux
Fixes the following error when building GHC on alpha-linux:
rts/posix/Signals.c: In function ‘initDefaultHandlers’:
rts/posix/Signals.c:709:5: error:
error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration]
709 | ieee_set_fp_control(0);
| ^~~~~~~~~~~~~~~~~~~
|
709 | ieee_set_fp_control(0);
|
- - - - -
c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00
Add changelog entries for !12479
- - - - -
bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00
javascript: Read fields of ObjectBlock lazily
When linking a module with a large dependency footprint too much of the
object files were forced during linking. This lead to a large amount of
memory taken up by thunks which would never be forced
On the PartialDownsweep test this halves the memory required (from 25G
to 13G).
Towards #25324
-------------------------
Metric Increase:
size_hello_obj
-------------------------
- - - - -
571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00
ci: Run the i386 validation job when i386 label is set
This is helpful when making changes to base and must update the
javascript and i386 base exports files.
- - - - -
e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00
Rewrite partitionByWorkerSize to avoid pattern match checker bug
With `-g3` the pattern match checker would warn about these incomplete
patterns. This affects the debug_info builds on CI.
```
Pattern match(es) are non-exhaustive
In an equation for ‘go’:
Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched:
(_:_) _ _
|
2514 | go [] small warnings = (small, warnings)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
```
Workaround for #25338
- - - - -
d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00
Remove the wrapper/coercion-passing logic for submultiplicity checks
Instead, we use a dedicated DelayedError, which is emitted
systematically on submultiplicity checks, but is suppressed if we can
indeed solve the submultiplicity constraint with a reflexivity
coercion.
This way, we don't have to return anything from `tcSubMult`, which now
looks like a regular constraint check, the rest is implementation
detail. This removes all of the strange boilerplate that I'd been
struggling with under the previous implementation. Even if
submultiplicity checks are not properly constraints, this way it's
contained entirely within a `WantedConstraint`. Much more pleasant.
Closes #25128.
- - - - -
1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00
AArch64: Implement switch/jump tables (#19912)
This improves the performance of Cmm switch statements (compared to a
chain of if statements.)
- - - - -
3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00
Fixes #25256, missing parens inside TH-printed pattern type signature
- - - - -
ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00
Better documentation for floatRange function
Closes #16479
- - - - -
ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00
Adjust progress message for hadrian to include cwd.
Fixes #25335
- - - - -
5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00
CCallConv test: Align argument types
The C calling convention / standard requires that arguments and their
values are of the same type.
- - - - -
c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00
hadrian: remove unused ghciWithDebugger field from flavour config
This patch removes the ghciWithDebugger field from flavour config
since it's actually not used anywhere.
- - - - -
9c9c790d by sheaf at 2024-10-07T19:27:23-04:00
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.
- - - - -
a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00
ci: RISCV64 cross-compile testing
This adds a validation job which tests that we can build a riscv64 cross
compiler and build a simple program using it. We do not currently run
the whole testsuite.
Towards #25254
Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com>
- - - - -
d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00
Remove unused accumulators in partition_errors
- - - - -
c0b075f6 by Alan Zimmerman at 2024-10-08T18:58:39+01:00
EPA: introduce EpAnnLam for lambda annotations
And remove `glAA` from `Parser.y`, it is the same as `glR`
- - - - -
e8ecb5de by Alan Zimmerman at 2024-10-08T18:58:39+01:00
EPA: Remove unused annotation from XOpApp
- - - - -
29ca35e5 by Alan Zimmerman at 2024-10-08T18:58:39+01:00
EPA: Use EpToken for XNPat and XNegApp
- - - - -
ec4df22c by Alan Zimmerman at 2024-10-08T18:58:39+01:00
EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens.
More removing [AddEpAnn] in favour of specific versions instead.
- - - - -
b8f6ba49 by Alan Zimmerman at 2024-10-08T18:58:39+01:00
EPA: Use specific annotation for MultiIf
Instead of [AddEpAnn]
- - - - -
4a9e2701 by Alan Zimmerman at 2024-10-08T18:59:38+01:00
EPA: Move annotations into FunRhs
- - - - -
49feb20f by Alan Zimmerman at 2024-10-08T18:59:41+01:00
EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig
- - - - -
53d0faf5 by Alan Zimmerman at 2024-10-08T18:59:41+01:00
EPA: Remove [AddEpAnn] from ArithSeq
- - - - -
51e23ba5 by Alan Zimmerman at 2024-10-08T18:59:41+01:00
EPA: Remove [AddEpAnn] from HsProc
- - - - -
4ad33ea7 by Alan Zimmerman at 2024-10-08T18:59:41+01:00
EPA: Remove [AddEpAnn] from HsStatic
- - - - -
e5359370 by Alan Zimmerman at 2024-10-08T18:59:41+01:00
EPA: Remove [AddEpAnn] from BindStmt
- - - - -
6ee0a7a6 by Alan Zimmerman at 2024-10-08T18:59:41+01:00
EPA: Remove [AddEpAnn] from TransStmt
- - - - -
1657f05f by Alan Zimmerman at 2024-10-08T18:59:41+01:00
EPA: Remove [AddEpAnn] from HsTypedSplice
- - - - -
0b5fdf2e by Alan Zimmerman at 2024-10-08T18:59:41+01:00
EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr
- - - - -
ebf9683c by Alan Zimmerman at 2024-10-08T18:59:41+01:00
EPA: Remove [AddEpAnn] from LazyPat
- - - - -
e34e6271 by Alan Zimmerman at 2024-10-08T18:59:41+01:00
EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat
- - - - -
4c55ab1c by Alan Zimmerman at 2024-10-08T18:59:41+01:00
EPA: Remove [AddEpAnn] from HsFieldBind
- - - - -
b7b71dc3 by Alan Zimmerman at 2024-10-08T18:59:41+01:00
EPA: Remove [AddEpAnn] from PatSynBind
- - - - -
72d3fdce by Alan Zimmerman at 2024-10-08T18:59:41+01:00
EPA: Remove [AddEpAnn] from IPBind
- - - - -
05504c43 by Alan Zimmerman at 2024-10-08T18:59:41+01:00
EPA: Remove [AddEpAnn] from FixSig
- - - - -
a28a708b by Alan Zimmerman at 2024-10-08T18:59:42+01:00
EPA: Remove [AddEpAnn] from activation rules
- - - - -
06ac81c2 by Alan Zimmerman at 2024-10-08T18:59:42+01:00
EPA: Remove [AddEpann] from SpecInstSig
- - - - -
4bcfc373 by Alan Zimmerman at 2024-10-08T18:59:42+01:00
EPA: Remove [AddEpAnn] from MinimalSig
- - - - -
af2f742a by Alan Zimmerman at 2024-10-08T18:59:42+01:00
EPA: Remove [AddEpAnn] from SCCFunSig
- - - - -
473a9014 by Alan Zimmerman at 2024-10-08T18:59:42+01:00
EPA: Remove [AddEpAnn] from CompleteMatchSig
- - - - -
aaead9fd by Alan Zimmerman at 2024-10-08T18:59:42+01:00
EPA: Remove [AddEpAnn] from AnnSig
As used in PatSynSig, ClassOpSig, TypeSig
- - - - -
7383e529 by Alan Zimmerman at 2024-10-08T18:59:42+01:00
EPA: Remove [AddEpAnn] from IEThingAbs
- - - - -
4a46995d by Alan Zimmerman at 2024-10-08T18:59:42+01:00
EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith
- - - - -
a3915584 by Alan Zimmerman at 2024-10-08T19:51:12+01:00
EPA: Remove [AddEpAnn] from IEModuleContents
- - - - -
7c73c371 by Alan Zimmerman at 2024-10-09T21:14:40+01:00
EPA: Remove [AddEpAnn] from HsOpTy
- - - - -
603ee523 by Alan Zimmerman at 2024-10-09T21:17:19+01:00
EPA: Remove [AddEpAnn] for various binders
- - - - -
c2356993 by Alan Zimmerman at 2024-10-09T21:53:30+01:00
EPA: Remove [AddEpAnn] for HsIParamTy
- - - - -
27 changed files:
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Hs/Binds.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Dump.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/ImpExp.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Syn/Type.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Arrows.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Errors/Ppr.hs
- compiler/GHC/HsToCore/Errors/Types.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Match.hs
- compiler/GHC/HsToCore/Pmc/Desugar.hs
- compiler/GHC/HsToCore/Utils.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/Lexer.x
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/86fde81222b2f4dbfc0240d378cb9cba3460c68d...c2356993e32da823db815cf909b3b3fd92dfe11c
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/86fde81222b2f4dbfc0240d378cb9cba3460c68d...c2356993e32da823db815cf909b3b3fd92dfe11c
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/20241009/370ffe3f/attachment-0001.html>
More information about the ghc-commits
mailing list