[project @ 2003-02-04 15:09:38 by simonpj]
[ghc-hetmet.git] / ghc / compiler / simplCore / SimplCore.lhs
index 9acfd81..c7e484f 100644 (file)
@@ -43,7 +43,6 @@ import LiberateCase   ( liberateCase )
 import SAT             ( doStaticArgs )
 import Specialise      ( specProgram)
 import SpecConstr      ( specConstrProgram)
-import UsageSPInf       ( doUsageSPInf )
 import DmdAnal         ( dmdAnalPgm )
 import WorkWrap                ( wwTopBinds )
 #ifdef OLD_STRICTNESS
@@ -118,7 +117,7 @@ simplifyExpr dflags expr
 
        ; us <-  mkSplitUniqSupply 's'
 
-       ; let env              = emptySimplEnv (SimplPhase 0) [] emptyVarSet
+       ; let env              = emptySimplEnv SimplGently [] emptyVarSet
              (expr', _counts) = initSmpl dflags us (simplExprGently env expr)
 
        ; dumpIfSet_dyn dflags Opt_D_dump_simpl "Simplified expression"
@@ -173,8 +172,6 @@ doCorePass dfs rb us binds CoreDoOldStrictness
 #endif
 doCorePass dfs rb us binds CoreDoPrintCore             
    = _scc_ "PrintCore"     noStats dfs (printCore binds)
-doCorePass dfs rb us binds CoreDoUSPInf             
-   = _scc_ "CoreUsageSPInf" noStats dfs (doUsageSPInf dfs us binds)
 doCorePass dfs rb us binds CoreDoGlomBinds             
    = noStats dfs (glomBinds dfs binds)
 doCorePass dfs rb us binds (CoreDoRuleCheck phase pat)
@@ -362,6 +359,11 @@ simplExprGently :: SimplEnv -> CoreExpr -> SimplM CoreExpr
 --     alone leaves tons of crud.
 -- Used (a) for user expressions typed in at the interactive prompt
 --     (b) the LHS and RHS of a RULE
+--
+-- The name 'Gently' suggests that the SimplifierMode is SimplGently,
+-- and in fact that is so.... but the 'Gently' in simplExprGently doesn't
+-- enforce that; it just simplifies the expression twice
+
 simplExprGently env expr
   = simplExpr env (occurAnalyseGlobalExpr expr)        `thenSmpl` \ expr1 ->
     simplExpr env (occurAnalyseGlobalExpr expr1)