X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FsimplStg%2FSimplStg.lhs;h=09ab87329b0bae079ed8c96304b02a5f11651eb1;hp=e87877cb4c72f3a208fcd26327eea8909b3e1ecd;hb=7fc749a43b4b6b85d234fa95d4928648259584f4;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1 diff --git a/compiler/simplStg/SimplStg.lhs b/compiler/simplStg/SimplStg.lhs index e87877c..09ab873 100644 --- a/compiler/simplStg/SimplStg.lhs +++ b/compiler/simplStg/SimplStg.lhs @@ -4,6 +4,13 @@ \section[SimplStg]{Driver for simplifying @STG@ programs} \begin{code} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module SimplStg ( stg2stg ) where #include "HsVersions.h" @@ -16,7 +23,6 @@ import StgLint ( lintStgBindings ) import StgStats ( showStgStats ) import SRT ( computeSRTs ) -import Packages ( HomeModules ) import DynFlags ( DynFlags(..), DynFlag(..), dopt, StgToDo(..), getStgToDo ) import Id ( Id ) @@ -28,13 +34,12 @@ 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 pkg_deps module_name binds +stg2stg dflags module_name binds = do { showPass dflags "Stg2Stg" ; us <- mkSplitUniqSupply 'g' @@ -74,7 +79,8 @@ stg2stg dflags pkg_deps module_name binds {-# SCC "ProfMassage" #-} let (collected_CCs, binds3) - = stgMassageForProfiling pkg_deps module_name us1 binds + = stgMassageForProfiling this_pkg module_name us1 binds + this_pkg = thisPackage dflags in end_pass us2 "ProfMassage" collected_CCs binds3