diff options
Diffstat (limited to 'compiler/codeGen')
-rw-r--r-- | compiler/codeGen/StgCmmBind.hs | 4 | ||||
-rw-r--r-- | 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 11b411d161..41e549e636 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 5044d763a4..e8a2a10fdd 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 |