diff options
Diffstat (limited to 'compiler/codeGen/StgCmmBind.hs')
| -rw-r--r-- | compiler/codeGen/StgCmmBind.hs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/compiler/codeGen/StgCmmBind.hs b/compiler/codeGen/StgCmmBind.hs index 9bf57b1cb4..3ae25b4652 100644 --- a/compiler/codeGen/StgCmmBind.hs +++ b/compiler/codeGen/StgCmmBind.hs @@ -565,12 +565,15 @@ setupUpdate closure_info node body then do tickyUpdateFrameOmitted; body else do tickyPushUpdateFrame - --dflags <- getDynFlags - let es = [CmmReg (CmmLocal node), mkLblExpr mkUpdInfoLabel] - --if not opt_SccProfilingOn && dopt Opt_EagerBlackHoling dflags - -- then pushUpdateFrame es body -- XXX black hole - -- else pushUpdateFrame es body - pushUpdateFrame es body + dflags <- getDynFlags + let + bh = blackHoleOnEntry closure_info && + not opt_SccProfilingOn && dopt Opt_EagerBlackHoling dflags + + lbl | bh = mkBHUpdInfoLabel + | otherwise = mkUpdInfoLabel + + pushUpdateFrame [CmmReg (CmmLocal node), mkLblExpr lbl] body | otherwise -- A static closure = do { tickyUpdateBhCaf closure_info @@ -579,7 +582,7 @@ setupUpdate closure_info node body then do -- Blackhole the (updatable) CAF: { upd_closure <- link_caf True ; pushUpdateFrame [CmmReg (CmmLocal upd_closure), - mkLblExpr mkUpdInfoLabel] body } -- XXX black hole + mkLblExpr mkBHUpdInfoLabel] body } else do {tickyUpdateFrameOmitted; body} } |
