[commit: ghc] cardinality: Re-do dmdAnalRhs, to deal with the let-up/let-down issue (d291b3f)

Simon Peyton Jones simonpj at microsoft.com
Thu Mar 21 17:04:56 CET 2013


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

On branch  : cardinality

https://github.com/ghc/ghc/commit/d291b3fed8f6561389956fb53c4809d7eb4b3111

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

commit d291b3fed8f6561389956fb53c4809d7eb4b3111
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu Mar 21 12:40:15 2013 +0000

    Re-do dmdAnalRhs, to deal with the let-up/let-down issue
    
    Here is the plan (not properly commented in the code yet)
    
    * We must do let-down, even for thunks, for strictness
    
    * But to get use-once cardinality on thunks we need
      let-up
          f y = let v = y+1 in v+v
      We want use-once on y.
    
    Solution: the new splitFVs in dmdAnalRhs, which sends strictness
    info down into the body but keeps usage info for the binding
    site only.

 compiler/basicTypes/Demand.lhs |  15 ++++-
 compiler/stranal/DmdAnal.lhs   | 133 +++++++++++++++++++----------------------
 2 files changed, 74 insertions(+), 74 deletions(-)


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

    git show d291b3fed8f6561389956fb53c4809d7eb4b3111



More information about the ghc-commits mailing list