Use DynFlags to work out if we are doing ticky ticky profiling
[ghc-hetmet.git] / compiler / main / DynFlags.hs
index b5cfb23..3f975cd 100644 (file)
@@ -35,6 +35,7 @@ module DynFlags (
         updOptLevel,
         setTmpDir,
         setPackageName,
+        doingTickyProfiling,
 
         -- ** Parsing DynFlags
         parseDynamicFlags,
@@ -517,6 +518,11 @@ isNoLink :: GhcLink -> Bool
 isNoLink NoLink = True
 isNoLink _      = False
 
+-- Is it worth evaluating this Bool and caching it in the DynFlags value
+-- during initDynFlags?
+doingTickyProfiling :: DynFlags -> Bool
+doingTickyProfiling dflags = WayTicky `elem` wayNames dflags
+
 data PackageFlag
   = ExposePackage  String
   | HidePackage    String