[commit: ghc] wip/T10137: Refactor code generation for switch expression (4be8983)
git at git.haskell.org
git at git.haskell.org
Sun Mar 8 19:30:24 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T10137
Link : http://ghc.haskell.org/trac/ghc/changeset/4be8983d6a54605b4c6242f475203c441d94e9e2/ghc
>---------------------------------------------------------------
commit 4be8983d6a54605b4c6242f475203c441d94e9e2
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.
>---------------------------------------------------------------
4be8983d6a54605b4c6242f475203c441d94e9e2
compiler/cmm/CmmCreateSwitchPlans.hs | 75 ++++++++++
compiler/cmm/CmmNode.hs | 109 +-------------
compiler/cmm/CmmPipeline.hs | 6 +
compiler/cmm/CmmSwitch.hs | 267 +++++++++++++++++++++++++++++++++++
compiler/codeGen/StgCmmUtils.hs | 129 ++---------------
compiler/ghc.cabal.in | 2 +
compiler/ghc.mk | 1 +
7 files changed, 367 insertions(+), 222 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 4be8983d6a54605b4c6242f475203c441d94e9e2
More information about the ghc-commits
mailing list