opt_UF_KeenessFactor,
opt_UF_CheapOp,
opt_UF_DearOp,
- opt_UF_NoRepLit,
-- misc opts
opt_CompilingPrelude,
-- Each run of the simplifier can take a different
-- set of simplifier-specific flags.
| CoreDoFloatInwards
- | CoreDoFullLaziness
+ | CoreDoFloatOutwards Bool -- True <=> float lambdas to top level
| CoreLiberateCase
| CoreDoPrintCore
| CoreDoStaticArgs
= MaxSimplifierIterations Int
| SimplInlinePhase Int
| DontApplyRules
+ | NoCaseOfCase
| SimplLetToCase
\end{code}
opt_SimplPedanticBottoms = lookUp SLIT("-fpedantic-bottoms")
-- Unfolding control
-opt_UF_HiFileThreshold = lookup_def_int "-funfolding-interface-threshold" (30::Int)
-opt_UF_CreationThreshold = lookup_def_int "-funfolding-creation-threshold" (30::Int)
+opt_UF_HiFileThreshold = lookup_def_int "-funfolding-interface-threshold" (45::Int)
+opt_UF_CreationThreshold = lookup_def_int "-funfolding-creation-threshold" (45::Int)
opt_UF_UseThreshold = lookup_def_int "-funfolding-use-threshold" (8::Int) -- Discounts can be big
opt_UF_ScrutConDiscount = lookup_def_int "-funfolding-con-discount" (2::Int)
opt_UF_FunAppDiscount = lookup_def_int "-funfolding-fun-discount" (6::Int) -- It's great to inline a fn
opt_UF_PrimArgDiscount = lookup_def_int "-funfolding-prim-discount" (1::Int)
-opt_UF_KeenessFactor = lookup_def_float "-funfolding-keeness-factor" (2.0::Float)
+opt_UF_KeenessFactor = lookup_def_float "-funfolding-keeness-factor" (1.0::Float)
-opt_UF_CheapOp = ( 0 :: Int) -- Only one instruction; and the args are charged for
+opt_UF_CheapOp = ( 1 :: Int) -- Only one instruction; and the args are charged for
opt_UF_DearOp = ( 4 :: Int)
-opt_UF_NoRepLit = ( 20 :: Int) -- Strings can be pretty big
opt_ProduceS = lookup_str "-S="
opt_ReportCompile = lookUp SLIT("-freport-compile")
simpl_sep opts defaultSimplSwitches core_td stg_td
"-ffloat-inwards" -> CORE_TD(CoreDoFloatInwards)
- "-ffull-laziness" -> CORE_TD(CoreDoFullLaziness)
+ "-ffloat-outwards" -> CORE_TD(CoreDoFloatOutwards False)
+ "-ffloat-outwards-full" -> CORE_TD(CoreDoFloatOutwards True)
"-fliberate-case" -> CORE_TD(CoreLiberateCase)
"-fcse" -> CORE_TD(CoreCSE)
"-fprint-core" -> CORE_TD(CoreDoPrintCore)
= firstJust [ matchSwInt opt "-fmax-simplifier-iterations" MaxSimplifierIterations
, matchSwInt opt "-finline-phase" SimplInlinePhase
, matchSwBool opt "-fno-rules" DontApplyRules
+ , matchSwBool opt "-fno-case-of-case" NoCaseOfCase
, matchSwBool opt "-flet-to-case" SimplLetToCase
]
tagOf_SimplSwitch (MaxSimplifierIterations _) = ILIT(2)
tagOf_SimplSwitch DontApplyRules = ILIT(3)
tagOf_SimplSwitch SimplLetToCase = ILIT(4)
+tagOf_SimplSwitch NoCaseOfCase = ILIT(5)
-- If you add anything here, be sure to change lAST_SIMPL_SWITCH_TAG, too!
-lAST_SIMPL_SWITCH_TAG = 4
+lAST_SIMPL_SWITCH_TAG = 5
\end{code}
%************************************************************************