diff options
author | Ian Lynagh <igloo@earth.li> | 2008-12-09 23:01:57 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2008-12-09 23:01:57 +0000 |
commit | aedb94f5f220b5e442b23ecc445fd38c8d9b6ba0 (patch) | |
tree | de4bfff938b4bbb833143d2a773a77b6760626e6 /compiler/profiling | |
parent | ee2623c8841a3a26c37bd7695a7db7be5d7e3a7f (diff) | |
download | haskell-aedb94f5f220b5e442b23ecc445fd38c8d9b6ba0.tar.gz |
Make some profiling flags dynamic
In particular:
-fauto-sccs-on-all-toplevs -auto-all -no-auto-all
-fauto-sccs-on-exported-toplevs -auto -no-auto
-fauto-sccs-on-individual-cafs -caf-all -no-caf-all
Diffstat (limited to 'compiler/profiling')
-rw-r--r-- | compiler/profiling/SCCfinal.lhs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/profiling/SCCfinal.lhs b/compiler/profiling/SCCfinal.lhs index 9e8b1b4466..8c3b62574d 100644 --- a/compiler/profiling/SCCfinal.lhs +++ b/compiler/profiling/SCCfinal.lhs @@ -28,7 +28,6 @@ module SCCfinal ( stgMassageForProfiling ) where import StgSyn -import StaticFlags ( opt_AutoSccsOnIndividualCafs ) import CostCentre -- lots of things import Id import Name @@ -40,24 +39,26 @@ import UniqSupply ( uniqFromSupply ) import VarSet import ListSetOps ( removeDups ) import Outputable +import DynFlags \end{code} \begin{code} stgMassageForProfiling - :: PackageId + :: DynFlags + -> PackageId -> Module -- module name -> UniqSupply -- unique supply -> [StgBinding] -- input -> (CollectedCCs, [StgBinding]) -stgMassageForProfiling this_pkg mod_name us stg_binds +stgMassageForProfiling dflags this_pkg mod_name us stg_binds = let ((local_ccs, extern_ccs, cc_stacks), stg_binds2) = initMM mod_name us (do_top_bindings stg_binds) (fixed_ccs, fixed_cc_stacks) - = if opt_AutoSccsOnIndividualCafs + = if dopt Opt_AutoSccsOnIndividualCafs dflags then ([],[]) -- don't need "all CAFs" CC -- (for Prelude, we use PreludeCC) else ([all_cafs_cc], [all_cafs_ccs]) @@ -121,7 +122,7 @@ stgMassageForProfiling this_pkg mod_name us stg_binds | noCCSAttached no_cc || currentOrSubsumedCCS no_cc = do -- Top level CAF without a cost centre attached -- Attach CAF cc (collect if individual CAF ccs) - caf_ccs <- if opt_AutoSccsOnIndividualCafs + caf_ccs <- if dopt Opt_AutoSccsOnIndividualCafs dflags then let cc = mkAutoCC binder modl CafCC ccs = mkSingletonCCS cc -- careful: the binder might be :Main.main, |