X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcodeGen%2FCgTicky.hs;h=27af4461b1906af2a42d33f61a6535f727499c1f;hb=fd12b167cd246087858d50ab66840274ef609f79;hp=5422127ae516b198264f47af48cf760adc66af51;hpb=306fac3f65c2e68e6c320a9db221d126c989fad2;p=ghc-hetmet.git diff --git a/compiler/codeGen/CgTicky.hs b/compiler/codeGen/CgTicky.hs index 5422127..27af446 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