Commit 140fb024 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

Add a new static flag -fno-opt-coercion

This just disables the coercion optimiser, mainly for measurements in the paper
parent 224b5e66
......@@ -185,6 +185,7 @@ isStaticFlag f =
"fsimple-list-literals",
"fruntime-types",
"fno-pre-inlining",
"fno-opt-coercion",
"fexcess-precision",
"static",
"fhardwire-lib-paths",
......
......@@ -24,7 +24,7 @@ module StaticFlags (
opt_PprCols,
opt_PprCaseAsLet,
opt_PprStyle_Debug, opt_TraceLevel,
opt_NoDebugOutput,
opt_NoDebugOutput,
-- Suppressing boring aspects of core dumps
opt_SuppressAll,
......@@ -52,6 +52,7 @@ module StaticFlags (
opt_CprOff,
opt_SimplNoPreInlining,
opt_SimplExcessPrecision,
opt_NoOptCoercion,
opt_MaxWorkerArgs,
-- Unfolding control
......@@ -266,7 +267,6 @@ opt_Fuel = lookup_def_int "-dopt-fuel" maxBound
opt_NoDebugOutput :: Bool
opt_NoDebugOutput = lookUp (fsLit "-dno-debug-output")
-- profiling opts
opt_SccProfilingOn :: Bool
opt_SccProfilingOn = lookUp (fsLit "-fscc-profiling")
......@@ -320,6 +320,9 @@ opt_SimplNoPreInlining = lookUp (fsLit "-fno-pre-inlining")
opt_SimplExcessPrecision :: Bool
opt_SimplExcessPrecision = lookUp (fsLit "-fexcess-precision")
opt_NoOptCoercion :: Bool
opt_NoOptCoercion = lookUp (fsLit "-fno-opt-coercion")
-- Unfolding control
-- See Note [Discounts and thresholds] in CoreUnfold
......
......@@ -19,6 +19,7 @@ import Var
import VarSet
import VarEnv
import PrelNames
import StaticFlags ( opt_NoOptCoercion )
import Util
import Outputable
\end{code}
......@@ -50,7 +51,9 @@ mkCoPredTy in the ForAll case, where this note appears.
optCoercion :: TvSubst -> Coercion -> NormalCo
-- ^ optCoercion applies a substitution to a coercion,
-- *and* optimises it to reduce its size
optCoercion env co = opt_co env False co
optCoercion env co
| opt_NoOptCoercion = substTy env co
| otherwise = opt_co env False co
type NormalCo = Coercion
-- Invariants:
......
......@@ -1550,6 +1550,13 @@ phase <replaceable>n</replaceable></entry>
<entry>-</entry>
</row>
<row>
<entry><option>-fno-opt-coercion</option></entry>
<entry>Turn off the coercion optimiser</entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-feager-blackholing</option></entry>
<entry>Turn on <link linkend="parallel-compile-options">eager blackholing</link></entry>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment