X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcodeGen%2FCgTailCall.lhs;h=60a856177c41e470c3328e32b7d2613ae11a2807;hb=f8f4cb3f3a46e0495917a927cefe906531b7b38e;hp=e4f79a7aa6bde56706eb66fe7ea5d47d12abfd7e;hpb=0ee0be109fd00ec629f7a2ad6a597885a0c9d5b4;p=ghc-hetmet.git diff --git a/compiler/codeGen/CgTailCall.lhs b/compiler/codeGen/CgTailCall.lhs index e4f79a7..60a8561 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