summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Stolarek <jan.stolarek@p.lodz.pl>2014-11-05 13:37:25 +0100
committerJan Stolarek <jan.stolarek@p.lodz.pl>2014-11-06 11:58:02 +0100
commitad8457f93807e3b7a9a24867ed69dc93662a29e3 (patch)
treeaa7ba2c35bfbc4e021410a35cc30816124b31197
parentd0d9dc040b54cfd9ced12c5c260ae143fe4e7ec0 (diff)
downloadhaskell-ad8457f93807e3b7a9a24867ed69dc93662a29e3.tar.gz
Remove -ddump-simpl-phases flag
-rw-r--r--compiler/main/DynFlags.hs15
-rw-r--r--compiler/simplCore/CoreMonad.lhs40
-rw-r--r--compiler/simplCore/SimplCore.lhs9
-rw-r--r--docs/users_guide/debugging.xml11
-rw-r--r--docs/users_guide/flags.xml6
5 files changed, 14 insertions, 67 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 1ca19c10cc..495f000bf8 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -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 })
diff --git a/compiler/simplCore/CoreMonad.lhs b/compiler/simplCore/CoreMonad.lhs
index 3405f52ed3..b5479ec8d2 100644
--- a/compiler/simplCore/CoreMonad.lhs
+++ b/compiler/simplCore/CoreMonad.lhs
@@ -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}
diff --git a/compiler/simplCore/SimplCore.lhs b/compiler/simplCore/SimplCore.lhs
index 8908cb3ced..4456f6e934 100644
--- a/compiler/simplCore/SimplCore.lhs
+++ b/compiler/simplCore/SimplCore.lhs
@@ -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
diff --git a/docs/users_guide/debugging.xml b/docs/users_guide/debugging.xml
index 513034599a..07e2a4be4e 100644
--- a/docs/users_guide/debugging.xml
+++ b/docs/users_guide/debugging.xml
@@ -337,17 +337,6 @@
<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>:
<indexterm><primary><option>-ddump-simpl-iterations</option></primary></indexterm>
</term>
diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml
index affe194c7d..6e005d57ce 100644
--- a/docs/users_guide/flags.xml
+++ b/docs/users_guide/flags.xml
@@ -2870,12 +2870,6 @@
<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>
<entry>dynamic</entry>