X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FsimplStg%2FSimplStg.lhs;h=e87877cb4c72f3a208fcd26327eea8909b3e1ecd;hb=0372ac231bd18e993a2533f784805046876d5527;hp=cc918b7a6f2b7f5d107cdc6b8ef063b8617929ef;hpb=3de583c7afcc4109995cb13be50d19ca86ddee62;p=ghc-hetmet.git diff --git a/ghc/compiler/simplStg/SimplStg.lhs b/ghc/compiler/simplStg/SimplStg.lhs index cc918b7..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])] -- output program... + -> 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 module_name us1 binds + = stgMassageForProfiling pkg_deps module_name us1 binds in end_pass us2 "ProfMassage" collected_CCs binds3