[Git][ghc/ghc][wip/nested-cpr-2019] 38 commits: Revert "Specify kind variables for inferred kinds in base."

Sebastian Graf gitlab at gitlab.haskell.org
Tue May 26 11:41:50 UTC 2020



Sebastian Graf pushed to branch wip/nested-cpr-2019 at Glasgow Haskell Compiler / GHC


Commits:
013d7120 by Ben Gamari at 2020-05-25T09:48:17-04:00
Revert "Specify kind variables for inferred kinds in base."

As noted in !3132, this has rather severe knock-on consequences in
user-code. We'll need to revisit this before merging something along
these lines.

This reverts commit 9749fe1223d182b1f8e7e4f7378df661c509f396.

- - - - -
4c4312ed by Ben Gamari at 2020-05-25T09:48:53-04:00
Coverage: Drop redundant ad-hoc boot module check

To determine whether the module is a boot module
Coverage.addTicksToBinds was checking for a `boot` suffix in the module
source filename. This is quite ad-hoc and shouldn't be necessary; the
callsite in `deSugar` already checks that the module isn't a boot
module.

- - - - -
1abf3c84 by Ben Gamari at 2020-05-25T09:48:53-04:00
Coverage: Make tickBoxCount strict

This could otherwise easily cause a leak of (+) thunks.

- - - - -
b2813750 by Ben Gamari at 2020-05-25T09:48:53-04:00
Coverage: Make ccIndices strict

This just seems like a good idea.

- - - - -
02e278eb by Ben Gamari at 2020-05-25T09:48:53-04:00
Coverage: Don't produce ModBreaks if not HscInterpreted

emptyModBreaks contains a bottom and consequently it's important that we
don't use it unless necessary.

- - - - -
b8c014ce by Ben Gamari at 2020-05-25T09:48:53-04:00
Coverage: Factor out addMixEntry

- - - - -
53814a64 by Zubin Duggal at 2020-05-26T03:03:24-04:00
Add info about typeclass evidence to .hie files

See `testsuite/tests/hiefile/should_run/HieQueries.hs` and
`testsuite/tests/hiefile/should_run/HieQueries.stdout` for an example of this

We add two new fields, `EvidenceVarBind` and `EvidenceVarUse` to the
`ContextInfo` associated with an Identifier. These are associated with the
appropriate identifiers for the evidence variables collected when we come across
`HsWrappers`, `TcEvBinds` and `IPBinds` while traversing the AST.

Instance dictionary and superclass selector dictionaries from `tcg_insts` and
classes defined in `tcg_tcs` are also recorded in the AST as originating from
their definition span

This allows us to save a complete picture of the evidence constructed by the
constraint solver, and will let us report this to the user, enabling features
like going to the instance definition from the invocation of a class method(or
any other method taking a constraint) and finding all usages of a particular
instance.

Additionally,

- Mark NodeInfo with an origin so we can differentiate between bindings
  origininating in the source vs those in ghc
- Along with typeclass evidence info, also include information on Implicit
  Parameters
- Add a few utility functions to HieUtils in order to query the new info

Updates haddock submodule

- - - - -
6604906c by Sebastian Graf at 2020-05-26T03:04:04-04:00
Make WorkWrap.Lib.isWorkerSmallEnough aware of the old arity

We should allow a wrapper with up to 82 parameters when the original
function had 82 parameters to begin with.

I verified that this made no difference on NoFib, but then again
it doesn't use huge records...

Fixes #18122.

- - - - -
cf772f19 by Sylvain Henry at 2020-05-26T03:04:45-04:00
Enhance Note [About units] for Backpack

- - - - -
0baa1b68 by Sebastian Graf at 2020-05-26T13:41:42+02:00
Nested CPR

- - - - -
b1d3e5bf by Sebastian Graf at 2020-05-26T13:41:42+02:00
Move tests from stranal to cpranal

- - - - -
00a5eaff by Sebastian Graf at 2020-05-26T13:41:42+02:00
Accept FacState

- - - - -
8999468c by Sebastian Graf at 2020-05-26T13:41:42+02:00
Factor Cpr and Termination into a joint lattice

As a result, we don't even have to export Termination from Cpr. Neat!

Also I realised there is a simpler and more sound way to generate and
unleash CPR signatures.

- - - - -
b796c131 by Sebastian Graf at 2020-05-26T13:41:42+02:00
Consider unboxing effects of WW better and get rid of hack

- - - - -
3dad9697 by Sebastian Graf at 2020-05-26T13:41:42+02:00
stuff

- - - - -
5fedeafa by Sebastian Graf at 2020-05-26T13:41:42+02:00
Debug output

- - - - -
ed8a958a by Sebastian Graf at 2020-05-26T13:41:42+02:00
A slew of testsuite changes

- - - - -
f4cbdbb4 by Sebastian Graf at 2020-05-26T13:41:42+02:00
Fix T1600

- - - - -
cc7a7d00 by Sebastian Graf at 2020-05-26T13:41:42+02:00
Inline `decodeDoubleInteger` and constant-fold `decodeDouble_Int64#` instead

Currently, `decodeDoubleInteger` is known-key so that it can be
recognised in constant folding. But that is very brittle and doesn't
survive worker/wrapper, which we even do for
`NOINLINE`/`CONSTANT_FOLDED` things since #13143.
Also it is a trade-off: The implementation of `decodeDoubleInteger`
allocates an `Integer` box that never cancels aways if we don't inline
it.

Hence we recognise the `decodeDouble_Int64#` primop instead in constant
folding, so that we can inline `decodeDoubleInteger`.

You may wonder how this affects performance of code using
`integer-simple`; Apparently, according to @hsyl20 this is not a concern
since we will hopefully land !2231 soon.

Fixes #18092.

- - - - -
2ed3162b by Sebastian Graf at 2020-05-26T13:41:42+02:00
Fix primop termination

- - - - -
ff024fbd by Sebastian Graf at 2020-05-26T13:41:42+02:00
Test for DataCon wrapper CPR

- - - - -
ee6d3cf8 by Sebastian Graf at 2020-05-26T13:41:42+02:00
Fix CPR of bottoming functions/primops

- - - - -
c7048a24 by Sebastian Graf at 2020-05-26T13:41:42+02:00
Fix DataConWrapperCpr and accept other test outputs

- - - - -
0372f4ce by Sebastian Graf at 2020-05-26T13:41:42+02:00
Accept two more changed test outputs

- - - - -
beaf2d7e by Sebastian Graf at 2020-05-26T13:41:42+02:00
Update CaseBinderCPR with a new function

- - - - -
c6e512af by Sebastian Graf at 2020-05-26T13:41:42+02:00
Don't give the case binder the CPR property

- - - - -
fcf53cc6 by Sebastian Graf at 2020-05-26T13:41:42+02:00
Prune CPR sigs to constant depth on all bindings

- - - - -
943183a6 by Sebastian Graf at 2020-05-26T13:41:42+02:00
Use variable length coding for ConTags

- - - - -
2df33d63 by Sebastian Graf at 2020-05-26T13:41:42+02:00
Accept testuite output

- - - - -
1dd01bfe by Sebastian Graf at 2020-05-26T13:41:42+02:00
Don't attach CPR sigs to expandable bindings; transform their unfoldings instead

- - - - -
47bb131d by Sebastian Graf at 2020-05-26T13:41:42+02:00
Revert "Don't give the case binder the CPR property"

This reverts commit 910edd76d5fe68b58c74f3805112f9faef4f2788.

It seems we broke too much with this change. We lost our big win in
`fish`.

- - - - -
6f6ed3bc by Sebastian Graf at 2020-05-26T13:41:42+02:00
A more modular and configurable approach to optimistic case binder CPR

- - - - -
fe7bf0f3 by Sebastian Graf at 2020-05-26T13:41:42+02:00
Fix T9291

- - - - -
70675708 by Sebastian Graf at 2020-05-26T13:41:42+02:00
Document -fcase-binder-cpr-depth in the user's guide

- - - - -
9a320289 by Sebastian Graf at 2020-05-26T13:41:42+02:00
Rebase woes

- - - - -
acb6be14 by Sebastian Graf at 2020-05-26T13:41:42+02:00
Testsuite changes

- - - - -
b045dd05 by Sebastian Graf at 2020-05-26T13:41:42+02:00
Refactoring around cprAnalBind

- - - - -
a324360b by Sebastian Graf at 2020-05-26T13:41:42+02:00
Fix case binder CPR by not looking into unfoldings of case binders

- - - - -


25 changed files:

- compiler/GHC/Core/Make.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Opt/CprAnal.hs
- compiler/GHC/Core/Opt/SetLevels.hs
- compiler/GHC/Core/Opt/Simplify.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/WorkWrap.hs
- compiler/GHC/Core/Opt/WorkWrap/Utils.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/Data/Maybe.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/HsToCore/Coverage.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Ext/Binary.hs
- compiler/GHC/Iface/Ext/Debug.hs
- compiler/GHC/Iface/Ext/Types.hs
- compiler/GHC/Iface/Ext/Utils.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Tidy.hs
- compiler/GHC/Types/Cpr.hs
- compiler/GHC/Types/Demand.hs
- compiler/GHC/Types/Id/Info.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2594ade04814abc16db74367265be92acc82c94a...a324360bdcc55e8825f04425969fd2d4b1c501df

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2594ade04814abc16db74367265be92acc82c94a...a324360bdcc55e8825f04425969fd2d4b1c501df
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/20200526/fc8cb0e0/attachment-0001.html>


More information about the ghc-commits mailing list