[project @ 2001-07-31 10:06:25 by sewardj]
[ghc-hetmet.git] / ghc / compiler / main / DriverState.hs
index e9e8aec..719ca5d 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $Id: DriverState.hs,v 1.49 2001/07/17 15:28:30 simonpj Exp $
+-- $Id: DriverState.hs,v 1.51 2001/07/31 10:06:25 sewardj Exp $
 --
 -- Settings for the driver
 --
@@ -143,7 +143,7 @@ GLOBAL_VAR(v_minus_o2_for_C,            False, Bool)
 GLOBAL_VAR(v_MaxSimplifierIterations,   4,     Int)
 GLOBAL_VAR(v_StgStats,                  False, Bool)
 GLOBAL_VAR(v_UsageSPInf,               False, Bool)  -- Off by default
-GLOBAL_VAR(v_Strictness,               True,  Bool)
+GLOBAL_VAR(v_Strictness,               False {-True-},  Bool)
 GLOBAL_VAR(v_CPR,                      True,  Bool)
 GLOBAL_VAR(v_CSE,                      True,  Bool)
 
@@ -243,9 +243,17 @@ buildCoreToDo = do
        ]),
 
        CoreDoSimplify (isAmongSimpl [
-          MaxSimplifierIterations 2
+          MaxSimplifierIterations 3
                -- No -finline-phase: allow all Ids to be inlined now
                -- This gets foldr inlined before strictness analysis
+               --
+               -- At least 3 iterations because otherwise we land up with
+               -- huge dead expressions because of an infelicity in the 
+               -- simpifier.   
+               --      let k = BIG in foldr k z xs
+               -- ==>  let k = BIG in letrec go = \xs -> ...(k x).... in go xs
+               -- ==>  let k = BIG in letrec go = \xs -> ...(BIG x).... in go xs
+               -- Don't stop now!
        ]),
 
        if cpr        then CoreDoCPResult   else CoreDoNothing,