From: sewardj Date: Tue, 20 Jun 2000 15:31:33 +0000 (+0000) Subject: [project @ 2000-06-20 15:31:33 by sewardj] X-Git-Tag: Approximately_9120_patches~4162 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=11c9fdd38fbed1deb6c88a68c2712d51bc50a0e2;p=ghc-hetmet.git [project @ 2000-06-20 15:31:33 by sewardj] Force binds with coreBindsSize after every simplifier iteration. Significantly reduces space use, especially with -O. This could probably be done more cleanly. --- diff --git a/ghc/compiler/simplCore/SimplCore.lhs b/ghc/compiler/simplCore/SimplCore.lhs index 4d2d4fd..11b14f1 100644 --- a/ghc/compiler/simplCore/SimplCore.lhs +++ b/ghc/compiler/simplCore/SimplCore.lhs @@ -26,7 +26,7 @@ import Rules ( RuleBase, ProtoCoreRule(..), pprProtoCoreRule, prepareLocalRuleB import CoreUnfold import PprCore ( pprCoreBindings ) import OccurAnal ( occurAnalyseBinds ) -import CoreUtils ( exprIsTrivial, etaReduceExpr ) +import CoreUtils ( exprIsTrivial, etaReduceExpr, coreBindsSize ) import Simplify ( simplTopBinds, simplExpr ) import SimplUtils ( findDefault, simplBinders ) import SimplMonad @@ -283,6 +283,9 @@ simplifyPgm (imported_rule_ids, rule_lhs_fvs) | otherwise = empty iteration us iteration_no counts binds + -- Try and force thunks off the binds; significantly reduces + -- space usage, especially with -O. JRS, 000620. + | let sz = coreBindsSize binds in sz == sz = do { -- Occurrence analysis let { tagged_binds = _scc_ "OccAnal" occurAnalyseBinds binds } ;