summaryrefslogtreecommitdiff
path: root/compiler/codeGen/CgTicky.hs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-12-18 16:19:28 +0000
committerIan Lynagh <igloo@earth.li>2008-12-18 16:19:28 +0000
commitfd12b167cd246087858d50ab66840274ef609f79 (patch)
tree8558630ebdc5d2a1d35c1c9f2cefa324639d8f5b /compiler/codeGen/CgTicky.hs
parent840295515da399bd63d1ad789cda97007c96e93b (diff)
downloadhaskell-fd12b167cd246087858d50ab66840274ef609f79.tar.gz
Use DynFlags to work out if we are doing ticky ticky profiling
We used to use StaticFlags
Diffstat (limited to 'compiler/codeGen/CgTicky.hs')
-rw-r--r--compiler/codeGen/CgTicky.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/codeGen/CgTicky.hs b/compiler/codeGen/CgTicky.hs
index 5422127ae5..27af4461b1 100644
--- a/compiler/codeGen/CgTicky.hs
+++ b/compiler/codeGen/CgTicky.hs
@@ -69,6 +69,8 @@ import PrelNames
import TcType
import TyCon
+import DynFlags
+
import Data.Maybe
-----------------------------------------------------------------------------
@@ -298,9 +300,9 @@ tickyAllocHeap hp
-- 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