[commit: ghc] master, wip/T11371: Always do the worker/wrapper split for NOINLINEs (1675d40)

git at git.haskell.org git at git.haskell.org
Sat Mar 9 07:08:46 UTC 2019


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

On branches: master,wip/T11371
Link       : http://ghc.haskell.org/trac/ghc/changeset/1675d40afe07b9c414eaa37d85819f37f8420118/ghc

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

commit 1675d40afe07b9c414eaa37d85819f37f8420118
Author: Sebastian Graf <sebastian.graf at kit.edu>
Date:   Tue Feb 19 13:52:11 2019 +0100

    Always do the worker/wrapper split for NOINLINEs
    
    Trac #10069 revealed that small NOINLINE functions didn't get split
    into worker and wrapper. This was due to `certainlyWillInline`
    saying that any unfoldings with a guidance of `UnfWhen` inline
    unconditionally. That isn't the case for NOINLINE functions, so we
    catch this case earlier now.
    
    Nofib results:
    
    --------------------------------------------------------------------------------
            Program         Allocs    Instrs
    --------------------------------------------------------------------------------
     fannkuch-redux          -0.3%      0.0%
                 gg          +0.0%     +0.1%
           maillist          -0.2%     -0.2%
            minimax           0.0%     -0.8%
    --------------------------------------------------------------------------------
                Min          -0.3%     -0.8%
                Max          +0.0%     +0.1%
     Geometric Mean          -0.0%     -0.0%
    
    Fixes #10069.
    
    -------------------------
    Metric Increase:
        T9233
    -------------------------


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

1675d40afe07b9c414eaa37d85819f37f8420118
 compiler/coreSyn/CoreUnfold.hs                     | 13 +++++----
 compiler/stranal/WorkWrap.hs                       | 31 ++++++++++++++++++++++
 testsuite/tests/profiling/should_run/all.T         |  2 +-
 testsuite/tests/simplCore/should_compile/T13543.hs |  2 +-
 .../tests/simplCore/should_compile/T4201.stdout    |  2 +-
 .../tests/simplCore/should_compile/T7360.stderr    | 10 +------
 testsuite/tests/simplCore/should_run/all.T         |  2 +-
 testsuite/tests/simplStg/should_compile/all.T      | 10 +------
 testsuite/tests/stranal/should_compile/T10069.hs   | 11 ++++++++
 .../tests/stranal/should_compile/T10069.stderr     |  1 +
 testsuite/tests/stranal/should_compile/all.T       |  1 +
 utils/genprimopcode/Main.hs                        |  8 +++++-
 12 files changed, 63 insertions(+), 30 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 1675d40afe07b9c414eaa37d85819f37f8420118


More information about the ghc-commits mailing list