[commit: ghc] ghc-8.0: Fix #12076 by inlining trivial expressions in CorePrep. (2a9767e)

git at git.haskell.org git at git.haskell.org
Sun Aug 7 11:59:28 UTC 2016


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

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/2a9767ed596679ddf21b7edfa9fc6410443c2a01/ghc

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

commit 2a9767ed596679ddf21b7edfa9fc6410443c2a01
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Mon May 16 21:05:24 2016 -0700

    Fix #12076 by inlining trivial expressions in CorePrep.
    
    Summary:
    This mostly follows the plan detailed by the discussion
    Simon and I had, with one difference: instead of grabbing
    the free variables of the trivial expressions to get the
    embedded Ids, we just use getIdFromTrivialExpr_maybe to extract
    out the Id.  If there is no Id, the expression cannot
    refer to a function (as there are no literal functions)
    and thus we do not need to saturate.
    
    Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>
    
    Test Plan: validate
    
    Reviewers: simonpj, austin, bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2309
    
    GHC Trac Issues: #12076
    
    (cherry picked from commit 11ff1df8a7c25485c9c7508d65bcb380e592010d)


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

2a9767ed596679ddf21b7edfa9fc6410443c2a01
 compiler/basicTypes/BasicTypes.hs                  |   1 +
 compiler/coreSyn/CoreArity.hs                      |   4 +-
 compiler/coreSyn/CorePrep.hs                       | 126 +++++++++++++++++++--
 compiler/coreSyn/CoreUtils.hs                      |  25 +++-
 compiler/main/TidyPgm.hs                           |   4 +-
 .../tests/simplCore/should_compile/T12076lit.hs    |  19 ++++
 .../tests/simplCore/should_compile/T12076sat.hs    |   9 ++
 testsuite/tests/simplCore/should_compile/all.T     |   4 +-
 8 files changed, 172 insertions(+), 20 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 2a9767ed596679ddf21b7edfa9fc6410443c2a01


More information about the ghc-commits mailing list