summaryrefslogtreecommitdiff
path: root/ghc/compiler/codeGen
diff options
context:
space:
mode:
authorsimonm <unknown>1999-03-26 10:29:08 +0000
committersimonm <unknown>1999-03-26 10:29:08 +0000
commitd4e0cee2445d9845bb7b0a0687bad84ff32bac28 (patch)
tree84274c869fa1d08c8a16cc66b5bfa1cd23ad9e98 /ghc/compiler/codeGen
parente1db55d8bd07c79bae30f548e597f709dd029155 (diff)
downloadhaskell-d4e0cee2445d9845bb7b0a0687bad84ff32bac28.tar.gz
[project @ 1999-03-26 10:29:02 by simonm]
More profiling fixes.
Diffstat (limited to 'ghc/compiler/codeGen')
-rw-r--r--ghc/compiler/codeGen/CgUpdate.lhs9
1 files changed, 6 insertions, 3 deletions
diff --git a/ghc/compiler/codeGen/CgUpdate.lhs b/ghc/compiler/codeGen/CgUpdate.lhs
index 9164a2edef..1eec8f6be9 100644
--- a/ghc/compiler/codeGen/CgUpdate.lhs
+++ b/ghc/compiler/codeGen/CgUpdate.lhs
@@ -11,7 +11,7 @@ module CgUpdate ( pushUpdateFrame, reserveSeqFrame, pushSeqFrame ) where
import CgMonad
import AbsCSyn
-import Constants ( uF_SIZE, sCC_UF_SIZE, sEQ_FRAME_SIZE )
+import Constants ( uF_SIZE, sCC_UF_SIZE, sEQ_FRAME_SIZE, sCC_SEQ_FRAME_SIZE )
import PrimRep ( PrimRep(..) )
import CgStackery ( allocUpdateFrame )
import CgUsages ( getSpRelOffset )
@@ -71,13 +71,16 @@ args_sp. When the scrutinee comes around to pushing a return address,
it will also push the SEQ frame, using pushSeqFrame.
\begin{code}
+seq_frame_size | opt_SccProfilingOn = sCC_SEQ_FRAME_SIZE
+ | otherwise = sEQ_FRAME_SIZE
+
reserveSeqFrame :: EndOfBlockInfo -> EndOfBlockInfo
reserveSeqFrame (EndOfBlockInfo args_sp (CaseAlts amode stuff))
- = EndOfBlockInfo (args_sp + sEQ_FRAME_SIZE) (SeqFrame amode stuff)
+ = EndOfBlockInfo (args_sp + seq_frame_size) (SeqFrame amode stuff)
pushSeqFrame :: VirtualSpOffset -> FCode VirtualSpOffset
pushSeqFrame args_sp
= getSpRelOffset args_sp `thenFC` \ sp_rel ->
absC (CMacroStmt PUSH_SEQ_FRAME [CAddr sp_rel]) `thenC`
- returnFC (args_sp - sEQ_FRAME_SIZE)
+ returnFC (args_sp - seq_frame_size)
\end{code}