diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-03-17 14:49:39 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-03-17 14:49:39 +0000 |
commit | f8f4cb3f3a46e0495917a927cefe906531b7b38e (patch) | |
tree | d73d7f883bda109e68dca56cc9ab6e5258aa8e6d /compiler/codeGen/CgTailCall.lhs | |
parent | 0ee0be109fd00ec629f7a2ad6a597885a0c9d5b4 (diff) | |
download | haskell-f8f4cb3f3a46e0495917a927cefe906531b7b38e.tar.gz |
FIX biographical profiling (#3039, probably #2297)
Since we introduced pointer tagging, we no longer always enter a
closure to evaluate it. However, the biographical profiler relies on
closures being entered in order to mark them as "used", so we were
getting spurious amounts of data attributed to VOID. It turns out
there are various places that need to be fixed, and I think at least
one of them was also wrong before pointer tagging (CgCon.cgReturnDataCon).
Diffstat (limited to 'compiler/codeGen/CgTailCall.lhs')
-rw-r--r-- | compiler/codeGen/CgTailCall.lhs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/codeGen/CgTailCall.lhs b/compiler/codeGen/CgTailCall.lhs index e4f79a7aa6..60a856177c 100644 --- a/compiler/codeGen/CgTailCall.lhs +++ b/compiler/codeGen/CgTailCall.lhs @@ -35,6 +35,7 @@ import Id import StgSyn import PrimOp import Outputable +import StaticFlags import Control.Monad @@ -183,7 +184,10 @@ performTailCall fun_info arg_amodes pending_assts untag_node = CmmAssign nodeReg (cmmUntag (CmmReg nodeReg)) -- Test if closure is a constructor maybeSwitchOnCons enterClosure eob - | EndOfBlockInfo _ (CaseAlts lbl _ _) <- eob + | EndOfBlockInfo _ (CaseAlts lbl _ _) <- eob, + not opt_SccProfilingOn + -- we can't shortcut when profiling is on, because we have + -- to enter a closure to mark it as "used" for LDV profiling = do { is_constr <- newLabelC -- Is the pointer tagged? -- Yes, jump to switch statement |