Commits on Source (39)
-
Fixes #25561
2d3a0a70 -
This fixes a bug introduced by the fix to #16610
bfacc086 -
Simon Peyton Jones authored
Two small changes * In GHC.Data.Unboxed, never omit interface pragmas. In "fast builds" one might omit them generally, but doing so gives very bad performance for code that imports this module. * In GHC.Hs.Dump don't do type-class specialisation. For some reason it goes mad and generates vast amounts of useless code. See #25463.
80f0e02d -
Simon Peyton Jones authored
Refactor Lint for two reasons: * To improve performance * To prepare for type-lets The big changes are all in GHC.Core.Lint: * Change the main APIs: * `lintType` returns nothing rather than returning a `LintedType`; * `lintCoercion` return nothing rather than returning a `LintedCoercion` Reason: these functions did a lot of allocation to return a substituted type/coercion that was often discarded, or used only to extract its kind. Instead we now return nothing, and, when needed, extract the kind and substitute. * Applications are treated as a whole, by `lintApp`. By treating multiple arguments all at once we avoid performing multiple substitutions, each substituting a single type variable. This can make an absolutely huge difference. Overall this led to a pretty massive rewrite of Lint, with many smaller changes. Smaller chnages elsewhere * Rename `GHC.Core.TyCo.Subst.getSubstInScope` to `substInScopeSet` for consistency * Define and use `GHC.Core.Type.liftedTypeOrConstraintKind` Performance. This MR someimtes gives gives a very large improvement in compile time, when Lint is on. here is a selection of changes over 5% in perf/compiler (with -dcore-lint) T25196 -97.0% T14766 -89.7% T14683 -74.4% T5631 -60.9% T20261 -56.7% T18923 -17.6% T13035 -15.8% T6048 -15.8% CoOpt_Read -14.4% T9630 -10.9% T5642 -7.3% Eliminating the egregious offenders is a big win. However, in some cases the compiler allocation /increases/. Here ae the changes over 1%: T9961 1.5% T8095 2.8% T14052 3.9% T12545 4.5% T14052Type 5.5% T5030 8.0% T5321Fun 8.3% T3064 12.7% CoOpt_Singletons 15.6% T9198 16.0% LargeRecord 18.1% I looked at the two biggest increases in compile-time bytes allocated. Interestingly, they both show substantial *decreases* in actual compile time, due to much smaller GC times. I'm honestly not sure either why the allocation increases, or why the GC time decreases; but I'm going to take the win! T9198 Baseline With patch No Lint Alloc 44.6M 44.6M Mut time 0.23s 0.22s GC time 0.21s 0.21s With Lint Alloc 309M 360M Mut time 1.51s 0.85s GC time 2.97s 0.25s ------------------- LargeRecord Baseline With patch No Lint Alloc 1.37G 1.37G Mut time 2.33s 2.33s GC time 2.40s 2.42s With Lint Alloc 3.4G 4.0G Mut time 6.02s 5.68s GC time 3.67s 3.03s IMPORTANT NOTE: These changes don't show up in CI because in CI the tests in perf/compiler are all run with -dcore-lint switched off. I gathered this data with some manual runs.
175a1355 -
See #25494.
8ef2dad6 -
This both more directly captures the intent and also fixes #25580.
e86b1b20 -
Fixes #25581.
430d965a -
Fixes #25518.
267098ad -
First step towards merging ghc-bignum and ghc-prim into ghc-internal. After this patch, ghc-bignum is deprecated and is just a shallow package reexporting modules from ghc-internal and base. Use those directly instead. Move `gmp` submodule into ghc-internal directory.
3f7ebc58 -
Significantly improves performance of deriving Show instances by avoiding using the very polymorphic `.` operator in favour of inlining its definition. We were generating tons of applications of it, each which had 3 type arguments! Improves on #9557 ------------------------- Metric Decrease: InstanceMatching T12707 T3294 ------------------------
ee0150c2 -
This eta expansion was introduced with the initial commit for Linear types. I believe this isn't needed any longer. My guess is it is an artifact from the initial linear types implementation: data constructors are linear, but they shouldn't need to be eta expanded to be used as higher order functions. I suppose in the early days this wasn't true. For instance, this works now: data T x = T x f = \(x :: forall y. y -> T y) -> x True f T -- ok! T is linear, but can be passed where an unrestricted higher order function is expected. I recall there being some magic around to make this work for data constructors... Since this works, there's no need to eta_expand the data constructors in the derived Data instances.
8b266671 -
Zubin authored6d90f514
-
Zubin authored4b671a3d
-
Zubin authoredea3ac859
-
Zubin authoredbe70f529
Showing
- .gitlab-ci.yml 2 additions, 1 deletion.gitlab-ci.yml
- .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py 1 addition, 1 deletion.gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py
- .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py 3 additions, 1 deletion.gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
- .gitmodules 1 addition, 1 deletion.gitmodules
- compiler/GHC/Builtin/Names.hs 3 additions, 6 deletionscompiler/GHC/Builtin/Names.hs
- compiler/GHC/Core.hs 3 additions, 2 deletionscompiler/GHC/Core.hs
- compiler/GHC/Core/Coercion.hs 3 additions, 3 deletionscompiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Lint.hs 767 additions, 684 deletionscompiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/Arity.hs 3 additions, 3 deletionscompiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs 2 additions, 2 deletionscompiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/SpecConstr.hs 2 additions, 2 deletionscompiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/Specialise.hs 3 additions, 3 deletionscompiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/SimpleOpt.hs 5 additions, 5 deletionscompiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/Subst.hs 1 addition, 1 deletioncompiler/GHC/Core/Subst.hs
- compiler/GHC/Core/TyCo/Rep.hs 6 additions, 5 deletionscompiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/TyCo/Subst.hs 12 additions, 10 deletionscompiler/GHC/Core/TyCo/Subst.hs
- compiler/GHC/Core/Type.hs 10 additions, 8 deletionscompiler/GHC/Core/Type.hs
- compiler/GHC/CoreToStg/Prep.hs 1 addition, 1 deletioncompiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Data/Unboxed.hs 7 additions, 0 deletionscompiler/GHC/Data/Unboxed.hs
- compiler/GHC/Driver/Config/Core/Rules.hs 2 additions, 3 deletionscompiler/GHC/Driver/Config/Core/Rules.hs
This diff is collapsed.