[commit: ghc] wip/D4327: WIP: Add likelyhood to alternatives from stg onwards (adc3415)

git at git.haskell.org git at git.haskell.org
Tue Mar 13 17:57:34 UTC 2018


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

On branch  : wip/D4327
Link       : http://ghc.haskell.org/trac/ghc/changeset/adc3415f14aa090c54c68149dcb1d99f19132a83/ghc

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

commit adc3415f14aa090c54c68149dcb1d99f19132a83
Author: Andreas Klebinger <klebinger.andreas at gmx.at>
Date:   Tue Mar 13 13:54:53 2018 -0400

    WIP: Add likelyhood to alternatives from stg onwards
    
    Summary:
    Adds a Freq value to Stg/Cmm cases/switches/conditionals.
    
    Currently only generates these values by checking alternatives for
    bottom expressions.
    
    They are passed along to the backend where they affect conditional generation
    slightly.
    
    As it stands runtime improvements seem to be less than expected. This might only be worth merging once we have more branch weights available.
    
    Reviewers: hvr, goldfire, bgamari, simonmar, simonpj, erikd
    
    Reviewed By: simonpj
    
    Subscribers: simonpj, rwbarton, thomie, carter
    
    GHC Trac Issues: #14672
    
    Differential Revision: https://phabricator.haskell.org/D4327


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

adc3415f14aa090c54c68149dcb1d99f19132a83
 compiler/basicTypes/BasicTypes.hs       | 107 ++++++++++++++++-
 compiler/basicTypes/MkId.hs             |  18 +--
 compiler/cmm/CmmImplementSwitchPlans.hs |  19 +--
 compiler/cmm/CmmParse.y                 |   9 +-
 compiler/cmm/CmmSwitch.hs               | 201 +++++++++++++++++++++++---------
 compiler/cmm/PprC.hs                    |  10 +-
 compiler/cmm/PprCmm.hs                  |  29 +++--
 compiler/codeGen/StgCmmBind.hs          |   2 +-
 compiler/codeGen/StgCmmExpr.hs          |  49 ++++----
 compiler/codeGen/StgCmmMonad.hs         |   6 +-
 compiler/codeGen/StgCmmPrim.hs          |  28 +++--
 compiler/codeGen/StgCmmProf.hs          |   1 +
 compiler/codeGen/StgCmmUtils.hs         | 118 ++++++++++++-------
 compiler/llvmGen/LlvmCodeGen/CodeGen.hs |  27 ++++-
 compiler/main/DynFlags.hs               |  16 ++-
 compiler/main/ErrUtils.hs               |   9 +-
 compiler/nativeGen/PPC/CodeGen.hs       |   6 +-
 compiler/nativeGen/SPARC/CodeGen.hs     |   6 +-
 compiler/nativeGen/X86/CodeGen.hs       |   6 +-
 compiler/simplStg/StgCse.hs             |  12 +-
 compiler/simplStg/StgStats.hs           |   2 +-
 compiler/simplStg/UnariseStg.hs         |  38 +++---
 compiler/stgSyn/CoreToStg.hs            | 111 ++++++++++--------
 compiler/stgSyn/StgLint.hs              |  12 +-
 compiler/stgSyn/StgSyn.hs               |  14 ++-
 docs/users_guide/debugging.rst          |   9 +-
 docs/users_guide/using-optimisation.rst |  16 +++
 27 files changed, 615 insertions(+), 266 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 adc3415f14aa090c54c68149dcb1d99f19132a83


More information about the ghc-commits mailing list