X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FsimplStg%2FSimplStg.lhs;h=e87877cb4c72f3a208fcd26327eea8909b3e1ecd;hb=ca49225cd41123ab6ce229040a93cc4b993b190a;hp=bdb8c761c8d99583d8f5d4e5e600d99fa9639b72;hpb=ef5b4b146aa172d8ac10f39b5eb3d7a0f948d8f1;p=ghc-hetmet.git diff --git a/ghc/compiler/simplStg/SimplStg.lhs b/ghc/compiler/simplStg/SimplStg.lhs index bdb8c76..e87877c 100644 --- a/ghc/compiler/simplStg/SimplStg.lhs +++ b/ghc/compiler/simplStg/SimplStg.lhs @@ -16,9 +16,9 @@ import StgLint ( lintStgBindings ) import StgStats ( showStgStats ) import SRT ( computeSRTs ) -import CmdLineOpts ( DynFlags, DynFlag(..), dopt, - StgToDo(..), dopt_StgToDo - ) +import Packages ( HomeModules ) +import DynFlags ( DynFlags(..), DynFlag(..), dopt, StgToDo(..), + getStgToDo ) import Id ( Id ) import Module ( Module ) import ErrUtils ( doIfSet_dyn, dumpIfSet_dyn, showPass ) @@ -28,12 +28,13 @@ import Outputable \begin{code} stg2stg :: DynFlags -- includes spec of what stg-to-stg passes to do + -> HomeModules -> Module -- module name (profiling only) -> [StgBinding] -- input... -> IO ( [(StgBinding,[(Id,[Id])])] -- output program... , CollectedCCs) -- cost centre information (declared and used) -stg2stg dflags module_name binds +stg2stg dflags pkg_deps module_name binds = do { showPass dflags "Stg2Stg" ; us <- mkSplitUniqSupply 'g' @@ -44,8 +45,7 @@ stg2stg dflags module_name binds -- Do the main business! ; (processed_binds, _, cost_centres) - <- foldl_mn do_stg_pass (binds', us', ccs) - (dopt_StgToDo dflags) + <- foldl_mn do_stg_pass (binds', us', ccs) (getStgToDo dflags) ; let srt_binds = computeSRTs processed_binds @@ -71,10 +71,10 @@ stg2stg dflags module_name binds end_pass us2 "StgStats" ccs binds StgDoMassageForProfiling -> - _scc_ "ProfMassage" + {-# SCC "ProfMassage" #-} let (collected_CCs, binds3) - = stgMassageForProfiling dflags module_name us1 binds + = stgMassageForProfiling pkg_deps module_name us1 binds in end_pass us2 "ProfMassage" collected_CCs binds3