[project @ 1999-06-24 11:28:26 by simonpj]
authorsimonpj <unknown>
Thu, 24 Jun 1999 11:28:32 +0000 (11:28 +0000)
committersimonpj <unknown>
Thu, 24 Jun 1999 11:28:32 +0000 (11:28 +0000)
Nuke -fcase-elim; sometimes things fail if you dont have it (Sergeys message)

ghc/compiler/main/CmdLineOpts.lhs
ghc/compiler/simplCore/Simplify.lhs
ghc/driver/ghc.lprl

index 8652480..eac02db 100644 (file)
@@ -99,7 +99,6 @@ module CmdLineOpts (
        opt_UnboxStrictFields,
        opt_SimplNoPreInlining,
        opt_SimplDoEtaReduction,
-       opt_SimplDoCaseElim,
        opt_SimplDoLambdaEtaExpansion,
        opt_SimplCaseOfCase,
        opt_SimplCaseMerge,
@@ -407,7 +406,6 @@ opt_SimplNoPreInlining              = lookUp SLIT("-fno-pre-inlining")
        -- NoPreInlining is there just to see how bad things
        -- get if you don't do it!
 opt_SimplDoEtaReduction                = lookUp SLIT("-fdo-eta-reduction")
-opt_SimplDoCaseElim            = lookUp SLIT("-fdo-case-elim")
 opt_SimplDoLambdaEtaExpansion  = lookUp SLIT("-fdo-lambda-eta-expansion")
 opt_SimplCaseOfCase            = lookUp SLIT("-fcase-of-case")
 opt_SimplCaseMerge             = lookUp SLIT("-fcase-merge")
index 9de7090..fe1dec4 100644 (file)
@@ -11,7 +11,6 @@ module Simplify ( simplTopBinds, simplExpr ) where
 import CmdLineOpts     ( intSwitchSet,
                          opt_SccProfilingOn, opt_PprStyle_Debug, opt_SimplDoEtaReduction,
                          opt_SimplNoPreInlining, opt_DictsStrict, opt_SimplPedanticBottoms,
-                         opt_SimplDoCaseElim,
                          SimplifierSwitch(..)
                        )
 import SimplMonad
@@ -991,8 +990,12 @@ rebuild scrut (Select _ bndr alts se cont)
 --     other problems
        )
 
-    && opt_SimplDoCaseElim
-  =    -- Get rid of the case altogether
+--    && opt_SimplDoCaseElim
+--     [June 99; don't test this flag.  The code generator dies if it sees
+--             case (\x.e) of f -> ...  
+--     so better to always do it
+
+=      -- Get rid of the case altogether
        -- See the extensive notes on case-elimination below
        -- Remember to bind the binder though!
     tick (CaseElim bndr)               `thenSmpl_` (
index 95eae3b..6509e54 100644 (file)
@@ -702,7 +702,6 @@ sub setupOptimiseFlags {
        '-ffoldr-build-on',
 
         '-fdo-eta-reduction',
-       '-fdo-case-elim',
        '-fdo-lambda-eta-expansion',
        '-fcase-of-case',
        '-fcase-merge',