diff options
author | Ian Lynagh <igloo@earth.li> | 2012-07-24 20:26:52 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-07-24 20:41:06 +0100 |
commit | 229e9fc585b3003f2c26cbcf39f71a87514cd43d (patch) | |
tree | 8214619d18d6d4024dee307435ff9e46d4ee5dbb /compiler/codeGen/CgStackery.lhs | |
parent | 4b18cc53a81634951cc72aa5c3e2123688b6f512 (diff) | |
download | haskell-229e9fc585b3003f2c26cbcf39f71a87514cd43d.tar.gz |
Make -fscc-profiling a dynamic flag
All the flags that 'ways' imply are now dynamic
Diffstat (limited to 'compiler/codeGen/CgStackery.lhs')
-rw-r--r-- | compiler/codeGen/CgStackery.lhs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/compiler/codeGen/CgStackery.lhs b/compiler/codeGen/CgStackery.lhs index a869795caa..217586a9d1 100644 --- a/compiler/codeGen/CgStackery.lhs +++ b/compiler/codeGen/CgStackery.lhs @@ -38,6 +38,7 @@ import OldCmm import OldCmmUtils import CLabel import Constants +import DynFlags import Util import OrdList import Outputable @@ -286,7 +287,8 @@ pushSpecUpdateFrame lbl updatee code when debugIsOn $ do { EndOfBlockInfo _ sequel <- getEndOfBlockInfo ; ; MASSERT(case sequel of { OnStack -> True; _ -> False}) } - ; allocStackTop (fixedHdrSize + + ; dflags <- getDynFlags + ; allocStackTop (fixedHdrSize dflags + sIZEOF_StgUpdateFrame_NoHdr `quot` wORD_SIZE) ; vsp <- getVirtSp ; setStackFrame vsp @@ -311,14 +313,16 @@ emitPushUpdateFrame = emitSpecPushUpdateFrame mkUpdInfoLabel emitSpecPushUpdateFrame :: CLabel -> CmmExpr -> CmmExpr -> Code emitSpecPushUpdateFrame lbl frame_addr updatee = do + dflags <- getDynFlags stmtsC [ -- Set the info word CmmStore frame_addr (mkLblExpr lbl) , -- And the updatee - CmmStore (cmmOffsetB frame_addr off_updatee) updatee ] + CmmStore (cmmOffsetB frame_addr (off_updatee dflags)) updatee ] initUpdFrameProf frame_addr -off_updatee :: ByteOff -off_updatee = fixedHdrSize*wORD_SIZE + oFFSET_StgUpdateFrame_updatee +off_updatee :: DynFlags -> ByteOff +off_updatee dflags + = fixedHdrSize dflags * wORD_SIZE + oFFSET_StgUpdateFrame_updatee \end{code} |