[commit: ghc] master: Don't track free variables in STG syntax by default (47bbc70)

git at git.haskell.org git at git.haskell.org
Mon Nov 19 16:49:47 UTC 2018


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

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

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

commit 47bbc709cb221e32310c6e28eb2f33acf78488c7
Author: Sebastian Graf <sebastian.graf at kit.edu>
Date:   Mon Nov 19 17:48:44 2018 +0100

    Don't track free variables in STG syntax by default
    
    Summary:
    Currently, `CoreToStg` annotates `StgRhsClosure`s with their set of non-global
    free variables.  This free variable information is only needed in the final
    code generation step (i.e. `StgCmm.codeGen`), which leads to transformations
    such as `StgCse` and `StgUnarise` having to maintain this information.
    
    This is tiresome and unnecessary, so this patch introduces a trees-to-grow-like
    approach that only introduces the free variable set into the syntax tree in the
    code gen pass, along with a free variable analysis on STG terms to generate
    that information.
    
    Fixes #15754.
    
    Reviewers: simonpj, osa1, bgamari, simonmar
    
    Reviewed By: osa1
    
    Subscribers: rwbarton, carter
    
    GHC Trac Issues: #15754
    
    Differential Revision: https://phabricator.haskell.org/D5324


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

47bbc709cb221e32310c6e28eb2f33acf78488c7
 compiler/basicTypes/VarSet.hs                      |   5 +-
 compiler/codeGen/StgCmm.hs                         |  14 +-
 compiler/codeGen/StgCmmBind.hs                     |  20 +-
 compiler/codeGen/StgCmmBind.hs-boot                |   4 +-
 compiler/codeGen/StgCmmExpr.hs                     |  26 +-
 compiler/ghc.cabal.in                              |   1 +
 compiler/main/DynFlags.hs                          |   8 +-
 compiler/main/HscMain.hs                           |   4 +-
 compiler/simplStg/StgCse.hs                        |  12 +-
 compiler/simplStg/StgStats.hs                      |   8 +-
 compiler/simplStg/UnariseStg.hs                    |  23 +-
 compiler/stgSyn/CoreToStg.hs                       | 295 ++++++---------------
 compiler/stgSyn/StgFVs.hs                          | 125 +++++++++
 compiler/stgSyn/StgSyn.hs                          | 224 +++++++++-------
 compiler/utils/UniqDSet.hs                         |   7 +-
 .../simplCore/should_compile/noinline01.stderr     |   8 +-
 16 files changed, 408 insertions(+), 376 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 47bbc709cb221e32310c6e28eb2f33acf78488c7


More information about the ghc-commits mailing list