[commit: ghc] master: Improve sinking pass (ad15c2b)

git at git.haskell.org git at git.haskell.org
Thu Sep 12 18:51:46 CEST 2013


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

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

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

commit ad15c2b4bd37082ce989268b3d2f86a2cd34386a
Author: Jan Stolarek <jan.stolarek at p.lodz.pl>
Date:   Thu Sep 12 14:29:37 2013 +0100

    Improve sinking pass
    
    This commit does two things:
    
      * Allows duplicating of global registers and literals by inlining
        them. Previously we would only inline global register or literal
        if it was used only once.
    
      * Changes method of determining conflicts between a node and an
        assignment. New method has two advantages. It relies on
        DefinerOfRegs and UserOfRegs typeclasses, so if a set of registers
        defined or used by a node should ever change, `conflicts` function
        will use the changed definition. This definition also catches
        more cases than the previous one (namely CmmCall and CmmForeignCall)
        which is a step towards making it possible to run sinking pass
        before stack layout (currently this doesn't work).
    
    This patch also adds a lot of comments that are result of about two-week
    long investigation of how sinking pass works and why it does what it does.


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

ad15c2b4bd37082ce989268b3d2f86a2cd34386a
 compiler/cmm/CmmLayoutStack.hs |    5 +-
 compiler/cmm/CmmPipeline.hs    |  140 +++++++++++++++++++++++++++++++++++++---
 compiler/cmm/CmmSink.hs        |   97 +++++++++++++++++++++-------
 3 files changed, 208 insertions(+), 34 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 ad15c2b4bd37082ce989268b3d2f86a2cd34386a



More information about the ghc-commits mailing list