Commit ad8457f9 authored by Jan Stolarek's avatar Jan Stolarek

Remove -ddump-simpl-phases flag

parent d0d9dc04
......@@ -240,7 +240,6 @@ data DumpFlag
| Opt_D_dump_core_pipeline -- TODO FIXME: dump after simplifier stats
| Opt_D_dump_simpl
| Opt_D_dump_simpl_iterations
| Opt_D_dump_simpl_phases
| Opt_D_dump_spec
| Opt_D_dump_prep
| Opt_D_dump_stg
......@@ -614,7 +613,6 @@ data DynFlags = DynFlags {
optLevel :: Int, -- ^ Optimisation level
simplPhases :: Int, -- ^ Number of simplifier phases
maxSimplIterations :: Int, -- ^ Max simplifier iterations
shouldDumpSimplPhase :: Maybe String,
ruleCheck :: Maybe String,
strictnessBefore :: [Int], -- ^ Additional demand analysis
......@@ -1351,7 +1349,6 @@ defaultDynFlags mySettings =
optLevel = 0,
simplPhases = 2,
maxSimplIterations = 4,
shouldDumpSimplPhase = Nothing,
ruleCheck = Nothing,
maxRelevantBinds = Just 6,
simplTickFactor = 100,
......@@ -2366,7 +2363,6 @@ dynamic_flags = [
, Flag "ddump-core-pipeline" (setDumpFlag Opt_D_dump_core_pipeline)
, Flag "ddump-simpl" (setDumpFlag Opt_D_dump_simpl)
, Flag "ddump-simpl-iterations" (setDumpFlag Opt_D_dump_simpl_iterations)
, Flag "ddump-simpl-phases" (OptPrefix setDumpSimplPhases)
, Flag "ddump-spec" (setDumpFlag Opt_D_dump_spec)
, Flag "ddump-prep" (setDumpFlag Opt_D_dump_prep)
, Flag "ddump-stg" (setDumpFlag Opt_D_dump_stg)
......@@ -3334,15 +3330,10 @@ forceRecompile = do dfs <- liftEwM getCmdLineState
when (force_recomp dfs) (setGeneralFlag Opt_ForceRecomp)
where
force_recomp dfs = isOneShot (ghcMode dfs)
setVerboseCore2Core :: DynP ()
setVerboseCore2Core = do setDumpFlag' Opt_D_verbose_core2core
upd (\dfs -> dfs { shouldDumpSimplPhase = Nothing })
setDumpSimplPhases :: String -> DynP ()
setDumpSimplPhases s = do forceRecompile
upd (\dfs -> dfs { shouldDumpSimplPhase = Just spec })
where
spec = case s of { ('=' : s') -> s'; _ -> s }
setVerboseCore2Core :: DynP ()
setVerboseCore2Core = setDumpFlag' Opt_D_verbose_core2core
setVerbosity :: Maybe Int -> DynP ()
setVerbosity mb_n = upd (\dfs -> dfs{ verbosity = mb_n `orElse` 3 })
......
......@@ -11,7 +11,7 @@ module CoreMonad (
CoreToDo(..), runWhen, runMaybe,
SimplifierMode(..),
FloatOutSwitches(..),
dumpSimplPhase, pprPassDetails,
pprPassDetails,
-- * Plugins
PluginPass, Plugin(..), CommandLineOption,
......@@ -94,7 +94,6 @@ import UniqSupply
import UniqFM ( UniqFM, mapUFM, filterUFM )
import MonadUtils
import Util ( split )
import ListSetOps ( runs )
import Data.List
import Data.Ord
......@@ -336,7 +335,7 @@ data CoreToDo -- These are diff core-to-core passes,
\begin{code}
coreDumpFlag :: CoreToDo -> Maybe DumpFlag
coreDumpFlag (CoreDoSimplify {}) = Just Opt_D_dump_simpl_phases
coreDumpFlag (CoreDoSimplify {}) = Just Opt_D_verbose_core2core
coreDumpFlag (CoreDoPluginPass {}) = Just Opt_D_dump_core_pipeline
coreDumpFlag CoreDoFloatInwards = Just Opt_D_verbose_core2core
coreDumpFlag (CoreDoFloatOutwards {}) = Just Opt_D_verbose_core2core
......@@ -354,10 +353,10 @@ coreDumpFlag CoreDesugarOpt = Just Opt_D_dump_ds
coreDumpFlag CoreTidy = Just Opt_D_dump_simpl
coreDumpFlag CorePrep = Just Opt_D_dump_prep
coreDumpFlag CoreDoPrintCore = Nothing
coreDumpFlag (CoreDoRuleCheck {}) = Nothing
coreDumpFlag CoreDoNothing = Nothing
coreDumpFlag (CoreDoPasses {}) = Nothing
coreDumpFlag CoreDoPrintCore = Nothing
coreDumpFlag (CoreDoRuleCheck {}) = Nothing
coreDumpFlag CoreDoNothing = Nothing
coreDumpFlag (CoreDoPasses {}) = Nothing
instance Outputable CoreToDo where
ppr (CoreDoSimplify _ _) = ptext (sLit "Simplifier")
......@@ -452,33 +451,6 @@ runMaybe :: Maybe a -> (a -> CoreToDo) -> CoreToDo
runMaybe (Just x) f = f x
runMaybe Nothing _ = CoreDoNothing
dumpSimplPhase :: DynFlags -> SimplifierMode -> Bool
dumpSimplPhase dflags mode
| Just spec_string <- shouldDumpSimplPhase dflags
= match_spec spec_string
| otherwise
= dopt Opt_D_verbose_core2core dflags
where
match_spec :: String -> Bool
match_spec spec_string
= or $ map (and . map match . split ':')
$ split ',' spec_string
match :: String -> Bool
match "" = True
match s = case reads s of
[(n,"")] -> phase_num n
_ -> phase_name s
phase_num :: Int -> Bool
phase_num n = case sm_phase mode of
Phase k -> n == k
_ -> False
phase_name :: String -> Bool
phase_name s = s `elem` sm_names mode
\end{code}
......
......@@ -601,9 +601,11 @@ simplifyPgmIO pass@(CoreDoSimplify max_iterations mode)
= do { (termination_msg, it_count, counts_out, guts')
<- do_iteration us 1 [] binds rules
; Err.dumpIfSet dflags (dump_phase && dopt Opt_D_dump_simpl_stats dflags)
; Err.dumpIfSet dflags (dopt Opt_D_verbose_core2core dflags &&
dopt Opt_D_dump_simpl_stats dflags)
"Simplifier statistics for following pass"
(vcat [text termination_msg <+> text "after" <+> ppr it_count <+> text "iterations",
(vcat [text termination_msg <+> text "after" <+> ppr it_count
<+> text "iterations",
blankLine,
pprSimplCount counts_out])
......@@ -612,7 +614,6 @@ simplifyPgmIO pass@(CoreDoSimplify max_iterations mode)
where
dflags = hsc_dflags hsc_env
print_unqual = mkPrintUnqualified dflags rdr_env
dump_phase = dumpSimplPhase dflags mode
simpl_env = mkSimplEnv mode
active_rule = activeRule simpl_env
......@@ -733,7 +734,7 @@ dump_end_iteration :: DynFlags -> PrintUnqualified -> Int
dump_end_iteration dflags print_unqual iteration_no counts binds rules
= dumpPassResult dflags print_unqual mb_flag hdr pp_counts binds rules
where
mb_flag | dopt Opt_D_dump_simpl_iterations dflags = Just Opt_D_dump_simpl_phases
mb_flag | dopt Opt_D_dump_simpl_iterations dflags = Just Opt_D_dump_simpl_iterations
| otherwise = Nothing
-- Show details if Opt_D_dump_simpl_iterations is on
......
......@@ -335,17 +335,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-ddump-simpl-phases</option>:
<indexterm><primary><option>-ddump-simpl-phases</option></primary></indexterm>
</term>
<listitem>
<para>Show the output of each run of the simplifier. Used when even
<option>-dverbose-core2core</option> doesn't cut it.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-ddump-simpl-iterations</option>:
......
......@@ -2869,12 +2869,6 @@
<entry>dynamic</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-ddump-simpl-phases</option></entry>
<entry>Dump output from each simplifier phase</entry>
<entry>dynamic</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-ddump-simpl-iterations</option></entry>
<entry>Dump output from each simplifier iteration</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