projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use DynFlags to work out if we are doing ticky ticky profiling
[ghc-hetmet.git]
/
compiler
/
codeGen
/
CgTicky.hs
diff --git
a/compiler/codeGen/CgTicky.hs
b/compiler/codeGen/CgTicky.hs
index
5422127
..
27af446
100644
(file)
--- a/
compiler/codeGen/CgTicky.hs
+++ b/
compiler/codeGen/CgTicky.hs
@@
-69,6
+69,8
@@
import PrelNames
import TcType
import TyCon
import TcType
import TyCon
+import DynFlags
+
import Data.Maybe
-----------------------------------------------------------------------------
import Data.Maybe
-----------------------------------------------------------------------------
@@
-298,9
+300,9
@@
tickyAllocHeap hp
-- Ticky utils
ifTicky :: Code -> Code
-- 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
addToMemLbl :: Width -> CLabel -> Int -> CmmStmt
addToMemLbl rep lbl n = addToMem rep (CmmLit (CmmLabel lbl)) n