import TcType
import TyCon
+import DynFlags
+
import Data.Maybe
-----------------------------------------------------------------------------
= ifTicky $ do { bumpTickyCounter (sLit "RET_OLD_ctr")
; bumpHistogram (sLit "RET_OLD_hst") arity }
tickyReturnNewCon arity
- | not opt_DoTickyProfiling = nopC
- | otherwise
= ifTicky $ do { bumpTickyCounter (sLit "RET_NEW_ctr")
; bumpHistogram (sLit "RET_NEW_hst") arity }
-- Ticky utils
ifTicky :: Code -> Code
-ifTicky code
- | opt_DoTickyProfiling = code
- | otherwise = nopC
+ifTicky code = do dflags <- getDynFlags
+ if doingTickyProfiling dflags then code
+ else nopC
addToMemLbl :: Width -> CLabel -> Int -> CmmStmt
addToMemLbl rep lbl n = addToMem rep (CmmLit (CmmLabel lbl)) n