[Git][ghc/ghc][wip/nested-cpr-2019] 33 commits: core-spec: Modify file paths according to new module hierarchy

Sebastian Graf gitlab at gitlab.haskell.org
Wed May 27 16:30:08 UTC 2020



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


Commits:
ede24126 by Takenobu Tani at 2020-05-27T00:13:55-04:00
core-spec: Modify file paths according to new module hierarchy

This patch updates file paths according to new module hierarchy [1]:

  * GHC/Core.hs                <= coreSyn/CoreSyn.hs
  * GHC/Core/Coercion.hs       <= types/Coercion.hs
  * GHC/Core/Coercion/Axiom.hs <= types/CoAxiom.hs
  * GHC/Core/Coercion/Opt.hs   <= types/OptCoercion.hs
  * GHC/Core/DataCon.hs        <= basicTypes/DataCon.hs
  * GHC/Core/FamInstEnv.hs     <= types/FamInstEnv.hs
  * GHC/Core/Lint.hs           <= coreSyn/CoreLint.hs
  * GHC/Core/Subst.hs          <= coreSyn/CoreSubst.hs
  * GHC/Core/TyCo/Rep.hs       <= types/TyCoRep.hs
  * GHC/Core/TyCon.hs          <= types/TyCon.hs
  * GHC/Core/Type.hs           <= types/Type.hs
  * GHC/Core/Unify.hs          <= types/Unify.hs
  * GHC/Types/Literal.hs       <= basicTypes/Literal.hs
  * GHC/Types/Var.hs           <= basicTypes/Var.hs

[1]: https://gitlab.haskell.org/ghc/ghc/-/wikis/Make-GHC-codebase-more-modular

[skip ci]

- - - - -
04750304 by Ben Gamari at 2020-05-27T00:14:33-04:00
eventlog: Fix racy flushing

Previously no attempt was made to avoid multiple threads writing their
capability-local eventlog buffers to the eventlog writer simultaneously.
This could result in multiple eventlog streams being interleaved. Fix
this by documenting that the EventLogWriter's write() and flush()
functions may be called reentrantly and fix the default writer to
protect its FILE* by a mutex.

Fixes #18210.

- - - - -
d6203f24 by Joshua Price at 2020-05-27T00:15:17-04:00
Make `identifier` parse unparenthesized `->` (#18060)

- - - - -
2eabe61c by Sebastian Graf at 2020-05-27T18:29:58+02:00
Nested CPR

- - - - -
f69d654e by Sebastian Graf at 2020-05-27T18:29:58+02:00
Move tests from stranal to cpranal

- - - - -
f6f67aa7 by Sebastian Graf at 2020-05-27T18:29:58+02:00
Accept FacState

- - - - -
8f37b25c by Sebastian Graf at 2020-05-27T18:29:58+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.

- - - - -
a29e5b3f by Sebastian Graf at 2020-05-27T18:29:58+02:00
Consider unboxing effects of WW better and get rid of hack

- - - - -
9373a877 by Sebastian Graf at 2020-05-27T18:29:58+02:00
stuff

- - - - -
503b3fc0 by Sebastian Graf at 2020-05-27T18:29:58+02:00
Debug output

- - - - -
4b2145d2 by Sebastian Graf at 2020-05-27T18:29:58+02:00
A slew of testsuite changes

- - - - -
f9e60261 by Sebastian Graf at 2020-05-27T18:29:58+02:00
Fix T1600

- - - - -
aece58ba by Sebastian Graf at 2020-05-27T18:29:58+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.

- - - - -
772ef520 by Sebastian Graf at 2020-05-27T18:29:58+02:00
Fix primop termination

- - - - -
7c883ae9 by Sebastian Graf at 2020-05-27T18:29:58+02:00
Test for DataCon wrapper CPR

- - - - -
10f52230 by Sebastian Graf at 2020-05-27T18:29:58+02:00
Fix CPR of bottoming functions/primops

- - - - -
d6171905 by Sebastian Graf at 2020-05-27T18:29:58+02:00
Fix DataConWrapperCpr and accept other test outputs

- - - - -
aa4568f9 by Sebastian Graf at 2020-05-27T18:29:58+02:00
Accept two more changed test outputs

- - - - -
50f84626 by Sebastian Graf at 2020-05-27T18:29:58+02:00
Update CaseBinderCPR with a new function

- - - - -
ea7ec31c by Sebastian Graf at 2020-05-27T18:29:58+02:00
Don't give the case binder the CPR property

- - - - -
8d214ac7 by Sebastian Graf at 2020-05-27T18:29:58+02:00
Prune CPR sigs to constant depth on all bindings

- - - - -
fcd805a1 by Sebastian Graf at 2020-05-27T18:29:58+02:00
Use variable length coding for ConTags

- - - - -
943c365e by Sebastian Graf at 2020-05-27T18:29:58+02:00
Accept testuite output

- - - - -
e2c34b5d by Sebastian Graf at 2020-05-27T18:29:58+02:00
Don't attach CPR sigs to expandable bindings; transform their unfoldings instead

- - - - -
4d593ea4 by Sebastian Graf at 2020-05-27T18:29:58+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`.

- - - - -
4d1b3a93 by Sebastian Graf at 2020-05-27T18:29:58+02:00
A more modular and configurable approach to optimistic case binder CPR

- - - - -
101c4954 by Sebastian Graf at 2020-05-27T18:29:58+02:00
Fix T9291

- - - - -
50bb0d16 by Sebastian Graf at 2020-05-27T18:29:58+02:00
Document -fcase-binder-cpr-depth in the user's guide

- - - - -
2f47a43a by Sebastian Graf at 2020-05-27T18:29:58+02:00
Rebase woes

- - - - -
ae2fb002 by Sebastian Graf at 2020-05-27T18:29:58+02:00
Testsuite changes

- - - - -
06182f53 by Sebastian Graf at 2020-05-27T18:29:58+02:00
Refactoring around cprAnalBind

- - - - -
d4711127 by Sebastian Graf at 2020-05-27T18:29:58+02:00
Fix case binder CPR by not looking into unfoldings of case binders

- - - - -
22b55364 by Sebastian Graf at 2020-05-27T18:29:58+02:00
Regard all arity 0 bindings (incl. DataCon apps) as thunks

- - - - -


30 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/WorkWrap.hs
- compiler/GHC/Core/Opt/WorkWrap/Utils.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/Data/Maybe.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Tidy.hs
- compiler/GHC/Parser.y
- compiler/GHC/Types/Cpr.hs
- compiler/GHC/Types/Demand.hs
- compiler/GHC/Types/Id/Info.hs
- compiler/GHC/Types/Id/Make.hs
- docs/core-spec/CoreLint.ott
- docs/core-spec/CoreSyn.ott
- docs/core-spec/README
- docs/core-spec/core-spec.mng
- docs/core-spec/core-spec.pdf
- docs/users_guide/runtime_control.rst
- docs/users_guide/using-optimisation.rst
- includes/rts/EventLogWriter.h
- libraries/integer-gmp/src/GHC/Integer/Type.hs
- rts/eventlog/EventLogWriter.c
- testsuite/tests/stranal/sigs/CaseBinderCPR.hs → testsuite/tests/cpranal/sigs/CaseBinderCPR.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a324360bdcc55e8825f04425969fd2d4b1c501df...22b553642c0b8aabfa62096fd9851073f38416b2

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a324360bdcc55e8825f04425969fd2d4b1c501df...22b553642c0b8aabfa62096fd9851073f38416b2
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/20200527/ffc15058/attachment-0001.html>


More information about the ghc-commits mailing list