projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tweak rts ghc.mk for bootstrapping
[ghc-hetmet.git]
/
compiler
/
codeGen
/
CgTailCall.lhs
diff --git
a/compiler/codeGen/CgTailCall.lhs
b/compiler/codeGen/CgTailCall.lhs
index
6f8fd04
..
60a8561
100644
(file)
--- a/
compiler/codeGen/CgTailCall.lhs
+++ b/
compiler/codeGen/CgTailCall.lhs
@@
-35,6
+35,7
@@
import Id
import StgSyn
import PrimOp
import Outputable
import StgSyn
import PrimOp
import Outputable
+import StaticFlags
import Control.Monad
import Control.Monad
@@
-108,7
+109,8
@@
performTailCall fun_info arg_amodes pending_assts
| otherwise = noStmts
; EndOfBlockInfo sp _ <- getEndOfBlockInfo
| otherwise = noStmts
; EndOfBlockInfo sp _ <- getEndOfBlockInfo
- ; case (getCallMethod fun_name fun_has_cafs lf_info (length arg_amodes)) of
+ ; dflags <- getDynFlags
+ ; case (getCallMethod dflags fun_name fun_has_cafs lf_info (length arg_amodes)) of
-- Node must always point to things we enter
EnterIt -> do
-- Node must always point to things we enter
EnterIt -> do
@@
-182,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
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
= do { is_constr <- newLabelC
-- Is the pointer tagged?
-- Yes, jump to switch statement