[commit: ghc] master: Don't explicitly refer to nodeReg in ldvEnterClosure (6178f6e)

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


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

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

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

commit 6178f6e162a3a2f2e9f7103d7ca94bbed16b39ec
Author: Patrick Palka <patrick at parcs.ath.cx>
Date:   Sun Dec 1 12:44:14 2013 -0500

    Don't explicitly refer to nodeReg in ldvEnterClosure


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

6178f6e162a3a2f2e9f7103d7ca94bbed16b39ec
 compiler/codeGen/StgCmmBind.hs |    4 ++--
 compiler/codeGen/StgCmmProf.hs |   11 ++++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/compiler/codeGen/StgCmmBind.hs b/compiler/codeGen/StgCmmBind.hs
index 11b411d..41e549e 100644
--- a/compiler/codeGen/StgCmmBind.hs
+++ b/compiler/codeGen/StgCmmBind.hs
@@ -476,7 +476,7 @@ 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)
+                ; 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
@@ -561,7 +561,7 @@ thunkCode cl_info fv_details _cc node arity body
   = do { dflags <- getDynFlags
        ; let node_points = nodeMustPointToIt dflags (closureLFInfo cl_info)
              node'       = if node_points then Just node else Nothing
-        ; ldvEnterClosure cl_info -- NB: Node always points when profiling
+        ; ldvEnterClosure cl_info (CmmLocal node) -- NB: Node always points when profiling
 
         -- Heap overflow check
         ; entryHeapCheck cl_info node' arity [] $ do
diff --git a/compiler/codeGen/StgCmmProf.hs b/compiler/codeGen/StgCmmProf.hs
index 5044d76..e8a2a10 100644
--- a/compiler/codeGen/StgCmmProf.hs
+++ b/compiler/codeGen/StgCmmProf.hs
@@ -328,11 +328,12 @@ ldvRecordCreate closure = do dflags <- getDynFlags
 -- The closure is not IND or IND_OLDGEN because neither is considered for LDV
 -- profiling.
 --
-ldvEnterClosure :: ClosureInfo -> FCode ()
-ldvEnterClosure closure_info = do dflags <- getDynFlags
-                                  let tag = funTag dflags closure_info
-                                  ldvEnter (cmmOffsetB dflags (CmmReg nodeReg) (-tag))
-        -- don't forget to substract node's tag
+ldvEnterClosure :: ClosureInfo -> CmmReg -> FCode ()
+ldvEnterClosure closure_info node_reg = do
+    dflags <- getDynFlags
+    let tag = funTag dflags closure_info
+    -- don't forget to substract node's tag
+    ldvEnter (cmmOffsetB dflags (CmmReg node_reg) (-tag))
 
 ldvEnter :: CmmExpr -> FCode ()
 -- Argument is a closure pointer



More information about the ghc-commits mailing list