Use DynFlags to work out if we are doing ticky ticky profiling
[ghc-hetmet.git] / compiler / codeGen / StgCmmTicky.hs
index 544f863..2e4b29e 100644 (file)
@@ -56,12 +56,13 @@ import CLabel
 import Module
 import Name
 import Id
-import StaticFlags
 import BasicTypes
 import FastString
 import Constants
 import Outputable
 
+import DynFlags
+
 -- Turgid imports for showTypeCategory
 import PrelNames
 import TcType
@@ -321,9 +322,9 @@ tickyAllocHeap hp
 -- Ticky utils
 
 ifTicky :: FCode () -> FCode ()
-ifTicky code
-  | opt_DoTickyProfiling = code
-  | otherwise           = nopC
+ifTicky code = do dflags <- getDynFlags
+                  if doingTickyProfiling dflags then code
+                                                else nopC
 
 -- All the ticky-ticky counters are declared "unsigned long" in C
 bumpTickyCounter :: LitString -> FCode ()