[commit: ghc] wip/T10137: Refactor code generation for switch expression (3698409)

git at git.haskell.org git at git.haskell.org
Sun Mar 8 16:12:10 UTC 2015


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

On branch  : wip/T10137
Link       : http://ghc.haskell.org/trac/ghc/changeset/369840962a79ad71f8aa5d1fea59660cd558d3a7/ghc

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

commit 369840962a79ad71f8aa5d1fea59660cd558d3a7
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Sun Mar 8 17:09:46 2015 +0100

    Refactor code generation for switch expression
    
    This (work-in-progress, Notes-lacking) commit:
     * Moves the planning of a switch statement from the Stg → Cmm
       transformation to a separate Cmm → Cmm phase.
     * Separates the algorithm that does the planning from the code that
       that implements it on Cmm Graphs.
     * Is already smarter, i.e. will not break the range in the middle of a
       dense (and hence jump-table-suitable) part.


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

369840962a79ad71f8aa5d1fea59660cd558d3a7
 compiler/cmm/CmmCreateSwitchPlans.hs  |  75 ++++++++++++++++++++
 compiler/cmm/CmmNode.hs               | 109 ++--------------------------
 compiler/cmm/CmmPipeline.hs           |   6 ++
 compiler/codeGen/StgCmmUtils.hs       | 129 +++-------------------------------
 compiler/ghc.cabal.in                 |   2 +
 compiler/ghc.mk                       |   1 +
 testsuite/tests/driver/recomp013/B.hs |   2 +-
 7 files changed, 101 insertions(+), 223 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 369840962a79ad71f8aa5d1fea59660cd558d3a7


More information about the ghc-commits mailing list