[project @ 1996-06-30 15:56:44 by partain]
[ghc-hetmet.git] / ghc / compiler / simplCore / SimplCore.lhs
index dffde6b..e2f3a7d 100644 (file)
@@ -8,7 +8,8 @@
 
 module SimplCore ( core2core ) where
 
-import Ubiq{-uitous-}
+IMP_Ubiq(){-uitous-}
+IMPORT_1_3(IO(hPutStr,stderr))
 
 import AnalFBWW                ( analFBWW )
 import Bag             ( isEmptyBag, foldBag )
@@ -35,13 +36,14 @@ import CoreSyn
 import CoreUnfold
 import CoreUtils       ( substCoreBindings, manifestlyWHNF )
 import ErrUtils                ( ghcExit )
+import FiniteMap       ( FiniteMap )
 import FloatIn         ( floatInwards )
 import FloatOut                ( floatOutwards )
 import FoldrBuildWW    ( mkFoldrBuildWW )
 import Id              ( idType, toplevelishId, idWantsToBeINLINEd,
                          unfoldingUnfriendlyId,
                          nullIdEnv, addOneToIdEnv, delOneFromIdEnv,
-                         lookupIdEnv, IdEnv(..),
+                         lookupIdEnv, SYN_IE(IdEnv),
                          GenId{-instance Outputable-}
                        )
 import IdInfo          ( mkUnfolding )
@@ -49,12 +51,11 @@ import LiberateCase ( liberateCase )
 import MagicUFs                ( MagicUnfoldingFun )
 import Maybes          ( maybeToBool )
 import Outputable      ( Outputable(..){-instance * (,) -} )
-import PprCore         ( pprCoreBinding, GenCoreExpr{-instance Outputable-} )
+import PprCore
 import PprStyle                ( PprStyle(..) )
 import PprType         ( GenType{-instance Outputable-}, GenTyVar{-ditto-} )
 import Pretty          ( ppShow, ppAboves, ppAbove, ppCat, ppStr )
 import SAT             ( doStaticArgs )
-import SCCauto         ( addAutoCostCentres )
 import SimplMonad      ( zeroSimplCount, showSimplCount, SimplCount )
 import SimplPgm                ( simplifyPgm )
 import SimplVar                ( leastItCouldCost )
@@ -89,8 +90,7 @@ core2core :: [CoreToDo]                       -- spec of what core-to-core passes to do
              SpecialiseData)           --  specialisation data
 
 core2core core_todos module_name ppr_style us local_tycons tycon_specs binds
-  = _scc_ "Core2Core"
-    if null core_todos then -- very rare, I suspect...
+  = if null core_todos then -- very rare, I suspect...
        -- well, we still must do some renumbering
        return (
        (substCoreBindings nullIdEnv nullTyVarEnv binds us,
@@ -242,16 +242,9 @@ core2core core_todos module_name ppr_style us local_tycons tycon_specs binds
               end_pass False us2 binds2 inline_env spec_data simpl_stats "Deforestation" }
 #endif
 
-         CoreDoAutoCostCentres
-           -> _scc_ "AutoSCCs"
-              begin_pass "AutoSCCs" >>
-              case (addAutoCostCentres module_name binds) of { binds2 ->
-              end_pass False us2 binds2 inline_env spec_data simpl_stats "AutoSCCs" }
-
          CoreDoPrintCore       -- print result of last pass
            -> end_pass True us2 binds inline_env spec_data simpl_stats "Print"
 
-
     -------------------------------------------------
 
     begin_pass
@@ -328,7 +321,7 @@ calcInlinings scc_s_OK inline_env_so_far top_binds
       where
        pp_det NoUnfoldingDetails   = ppStr "_N_"
 --LATER:       pp_det (IWantToBeINLINEd _) = ppStr "INLINE"
-       pp_det (GenForm _ _ expr guide)
+       pp_det (GenForm _ expr guide)
          = ppAbove (ppr PprDebug guide) (ppr PprDebug expr)
        pp_det other                = ppStr "???"