[commit: ghc] master: Fix #12076 by inlining trivial expressions in CorePrep. (11ff1df)

git at git.haskell.org git at git.haskell.org
Thu Jun 9 04:23:57 UTC 2016


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

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

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

commit 11ff1df8a7c25485c9c7508d65bcb380e592010d
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


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

11ff1df8a7c25485c9c7508d65bcb380e592010d
 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 11ff1df8a7c25485c9c7508d65bcb380e592010d


More information about the ghc-commits mailing list