[commit: ghc] cardinality: More fixes to cardinality analysis (600e7fa)

Simon Peyton Jones simonpj at microsoft.com
Tue Mar 19 17:18:09 CET 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : cardinality

https://github.com/ghc/ghc/commit/600e7fac59e5c514e5642751a520e9f822c47529

>---------------------------------------------------------------

commit 600e7fac59e5c514e5642751a520e9f822c47529
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Mar 19 16:17:08 2013 +0000

    More fixes to cardinality analysis
    
    * Deal with RHSs by using collectBinders, just as we now
      do in the typing rules, rather than by making a
      "vanillaCallDmd". The latter doesn't work well because
         - vanillaCallDmd should be C1(C1(...C1(U))), but
         - that gives used-once usage to the lambda binders of the
           RHS which isn't right
      Better just to decompose the RHS
    
    * Remove the letrec-bound binders in dmdAnalRhs, since we
      can't compute a sensible demand for them anyway, and
      we don't want them messing up the fixpoint
    
    * Use the new Demand.isWeakDmd (rather than isStrictDmd) when
      splitting the environment (an optimisation to speed up fixpointing)
      in dmdFix.
    
    * Remove dead code

 compiler/basicTypes/Demand.lhs |  43 ++++++++--
 compiler/stranal/DmdAnal.lhs   | 183 +++++++++++++----------------------------
 2 files changed, 89 insertions(+), 137 deletions(-)


Diff suppressed because of size. To see it, use:

    git show 600e7fac59e5c514e5642751a520e9f822c47529



More information about the ghc-commits mailing list