diff options
author | Ian Lynagh <igloo@earth.li> | 2012-07-24 20:26:52 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-07-24 20:41:06 +0100 |
commit | 229e9fc585b3003f2c26cbcf39f71a87514cd43d (patch) | |
tree | 8214619d18d6d4024dee307435ff9e46d4ee5dbb /compiler/codeGen/CodeGen.lhs | |
parent | 4b18cc53a81634951cc72aa5c3e2123688b6f512 (diff) | |
download | haskell-229e9fc585b3003f2c26cbcf39f71a87514cd43d.tar.gz |
Make -fscc-profiling a dynamic flag
All the flags that 'ways' imply are now dynamic
Diffstat (limited to 'compiler/codeGen/CodeGen.lhs')
-rw-r--r-- | compiler/codeGen/CodeGen.lhs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/codeGen/CodeGen.lhs b/compiler/codeGen/CodeGen.lhs index c9b2bf8ab0..29193137a7 100644 --- a/compiler/codeGen/CodeGen.lhs +++ b/compiler/codeGen/CodeGen.lhs @@ -104,7 +104,7 @@ mkModuleInit dflags cost_centre_info this_mod hpc_info ; whenC (opt_Hpc) $ hpcTable this_mod hpc_info - ; whenC (opt_SccProfilingOn) $ do + ; whenC (dopt Opt_SccProfilingOn dflags) $ do initCostCentres cost_centre_info -- For backwards compatibility: user code may refer to this @@ -128,11 +128,11 @@ code-generator.) initCostCentres :: CollectedCCs -> Code -- Emit the declarations, and return code to register them initCostCentres (local_CCs, ___extern_CCs, singleton_CCSs) - | not opt_SccProfilingOn = nopC - | otherwise - = do { mapM_ emitCostCentreDecl local_CCs - ; mapM_ emitCostCentreStackDecl singleton_CCSs - } + = do dflags <- getDynFlags + if not (dopt Opt_SccProfilingOn dflags) + then nopC + else do mapM_ emitCostCentreDecl local_CCs + mapM_ emitCostCentreStackDecl singleton_CCSs \end{code} %************************************************************************ |