- Oct 30, 2024
-
-
This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci.
-
Based on !10588 Co-authored-by:
Sylvain Henry <sylvain@haskus.fr> Co-authored-by:
Andrei Borzenkov <root@sandwitch.dev> Co-authored-by:
Danil Berestov <goosedb@yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip -------------------------
-
- Oct 28, 2024
-
-
Alan Zimmerman authored
This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file.
-
- Oct 27, 2024
-
-
Alan Zimmerman authored
EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure
-
We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed.
-
This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13.
-
-
- Oct 26, 2024
-
-
It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.)
-
- Oct 25, 2024
-
-
Alan Zimmerman authored
EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp
-
See Note [Inferred contexts from method constraints] Co-authored-by:
Simon Peyton Jones <simon.peytonjones@gmail.com>
-
This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better.
-
This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By:
Jaro Reinders <jaro.reinders@gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot
-
See `Note [Pin evaluatedness on floats]`.
-
- Oct 24, 2024
-
-
The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397
-
Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases.
-
In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304
-
Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198
-
- Oct 22, 2024
-
-
This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406.
-
This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308.
-
unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212.
-
This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic.
-
-
This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project.
-
ghc/ghc!13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it.
-
The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR.
-
GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes.
-
- Oct 21, 2024
-
-
Luite Stegeman authored
This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645
-
This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly.
-
EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl
-
- Oct 20, 2024
-
-
Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396
-
This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083
-
EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings
-
By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332
-
- Oct 19, 2024
-
-
Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by:
Michael Peyton Jones <me@michaelpj.com> Co-authored-by:
Sylvain Henry <sylvain@haskus.fr> Co-authored-by:
Matthew Pickering <matthewtpickering@gmail.com>
-