[commit: ghc] master: Make worker/wrapper work on INLINEABLE things (9cf5906)

git at git.haskell.org git at git.haskell.org
Thu Aug 28 11:11:55 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/9cf5906b692c31b7ec67856b0859cb0e33770651/ghc

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

commit 9cf5906b692c31b7ec67856b0859cb0e33770651
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri May 9 11:15:33 2014 +0100

    Make worker/wrapper work on INLINEABLE things
    
    This fixes a long-standing bug: Trac #6056.  The trouble was that
    INLINEABLE "used up" the unfolding for the Id, so it couldn't be
    worker/wrapper'd by the strictness analyser.
    
    This patch allows the w/w to go ahead, and makes the *worker* INLINEABLE
    instead, so it can later be specialised.
    
    However, that doesn't completely solve the problem, because the dictionary
    argument (which the specialiser treats specially) may be strict and
    hence unpacked by w/w, so now the worker won't be specilialised after all.
    
    Solution: never unpack dictionary arguments, which is done by the isClassTyCon
              test in WwLib.deepSplitProductType_maybe


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

9cf5906b692c31b7ec67856b0859cb0e33770651
 compiler/coreSyn/CoreUnfold.lhs | 51 +++++++++++++++++-----
 compiler/stranal/WorkWrap.lhs   | 95 +++++++++++++++++++++++++----------------
 compiler/stranal/WwLib.lhs      | 20 +++++++++
 3 files changed, 119 insertions(+), 47 deletions(-)

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

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 9cf5906b692c31b7ec67856b0859cb0e33770651


More information about the ghc-commits mailing list