[commit: ghc] master: Move the LDV code below the self-loop label (#8275) (ac31b79)

git at git.haskell.org git at git.haskell.org
Sun Dec 1 22:48:12 UTC 2013


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

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

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

commit ac31b79924e9330c577ea63af9b0f10f4fc6c8f6
Author: Patrick Palka <patrick at parcs.ath.cx>
Date:   Sun Dec 1 12:47:33 2013 -0500

    Move the LDV code below the self-loop label (#8275)


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

ac31b79924e9330c577ea63af9b0f10f4fc6c8f6
 compiler/codeGen/StgCmmBind.hs |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/codeGen/StgCmmBind.hs b/compiler/codeGen/StgCmmBind.hs
index 41e549e..64772c6 100644
--- a/compiler/codeGen/StgCmmBind.hs
+++ b/compiler/codeGen/StgCmmBind.hs
@@ -476,12 +476,12 @@ closureCodeBody top_lvl bndr cl_info cc args arity body fv_details
                 ; dflags <- getDynFlags
                 ; let node_points = nodeMustPointToIt dflags lf_info
                       node' = if node_points then Just node else Nothing
-                ; when node_points (ldvEnterClosure cl_info (CmmLocal node))
                 -- Emit new label that might potentially be a header
                 -- of a self-recursive tail call. See Note
                 -- [Self-recursive tail calls] in StgCmmExpr
                 ; loop_header_id <- newLabelC
                 ; emitLabel loop_header_id
+                ; when node_points (ldvEnterClosure cl_info (CmmLocal node))
                 -- Extend reader monad with information that
                 -- self-recursive tail calls can be optimized into local
                 -- jumps



More information about the ghc-commits mailing list