[commit: ghc] master: Implement CallArity analysis (cdceadf)

git at git.haskell.org git at git.haskell.org
Mon Feb 10 13:53:14 UTC 2014


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

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

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

commit cdceadf365335fdee5ffa8e6364f7fb00bc4b0f7
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Tue Jan 28 10:15:00 2014 +0000

    Implement CallArity analysis
    
    This analysis finds out if a let-bound expression with lower manifest
    arity than type arity is always called with more arguments, as in that
    case eta-expansion is allowed and often viable. The analysis is very
    much tailored towards the code generated when foldl is implemented via
    foldr; without this analysis doing so would be a very bad idea!
    
    There are other ways to improve foldr/builder-fusion to cope with foldl,
    if any of these are implemented then this step can probably be moved to
    -O2 to save some compilation times. The current impact of adding this
    phase is just below +2% (measured running GHC's "make").


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

cdceadf365335fdee5ffa8e6364f7fb00bc4b0f7
 compiler/basicTypes/Id.lhs        |    9 +
 compiler/basicTypes/IdInfo.lhs    |   12 +-
 compiler/coreSyn/CoreArity.lhs    |    3 +-
 compiler/coreSyn/PprCore.lhs      |   12 +-
 compiler/ghc.cabal.in             |    1 +
 compiler/main/DynFlags.hs         |    5 +
 compiler/simplCore/CallArity.hs   |  459 +++++++++++++++++++++++++++++++++++++
 compiler/simplCore/CoreMonad.lhs  |    3 +
 compiler/simplCore/SimplCore.lhs  |   10 +
 compiler/simplCore/SimplUtils.lhs |    4 +-
 10 files changed, 508 insertions(+), 10 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 cdceadf365335fdee5ffa8e6364f7fb00bc4b0f7


More information about the ghc-commits mailing list