Commit 62f6cc1d authored by rl@cse.unsw.edu.au's avatar rl@cse.unsw.edu.au
Browse files

Don't dump simplifier iterations with -dverbose-core2core

SimonPJ says this is the correct behaviour. We still have
-ddump-simpl-iterations.
parent 617e9a89
...@@ -17,7 +17,7 @@ A ``lint'' pass to check for Core correctness ...@@ -17,7 +17,7 @@ A ``lint'' pass to check for Core correctness
module CoreLint ( module CoreLint (
lintCoreBindings, lintCoreBindings,
lintUnfolding, lintUnfolding,
showPass, endPass showPass, endPass, endIteration
) where ) where
#include "HsVersions.h" #include "HsVersions.h"
...@@ -62,7 +62,14 @@ and do Core Lint when necessary. ...@@ -62,7 +62,14 @@ and do Core Lint when necessary.
\begin{code} \begin{code}
endPass :: DynFlags -> String -> DynFlag -> [CoreBind] -> IO [CoreBind] endPass :: DynFlags -> String -> DynFlag -> [CoreBind] -> IO [CoreBind]
endPass dflags pass_name dump_flag binds endPass = dumpAndLint dumpIfSet_core
endIteration :: DynFlags -> String -> DynFlag -> [CoreBind] -> IO [CoreBind]
endIteration = dumpAndLint dumpIfSet_dyn
dumpAndLint :: (DynFlags -> DynFlag -> String -> SDoc -> IO ())
-> DynFlags -> String -> DynFlag -> [CoreBind] -> IO [CoreBind]
dumpAndLint dump dflags pass_name dump_flag binds
= do = do
-- Report result size if required -- Report result size if required
-- This has the side effect of forcing the intermediate to be evaluated -- This has the side effect of forcing the intermediate to be evaluated
...@@ -70,7 +77,7 @@ endPass dflags pass_name dump_flag binds ...@@ -70,7 +77,7 @@ endPass dflags pass_name dump_flag binds
(text " Result size =" <+> int (coreBindsSize binds)) (text " Result size =" <+> int (coreBindsSize binds))
-- Report verbosely, if required -- Report verbosely, if required
dumpIfSet_core dflags dump_flag pass_name (pprCoreBindings binds) dump dflags dump_flag pass_name (pprCoreBindings binds)
-- Type check -- Type check
lintCoreBindings dflags pass_name binds lintCoreBindings dflags pass_name binds
......
...@@ -37,7 +37,7 @@ import Simplify ( simplTopBinds, simplExpr ) ...@@ -37,7 +37,7 @@ import Simplify ( simplTopBinds, simplExpr )
import SimplEnv ( SimplEnv, simplBinders, mkSimplEnv, setInScopeSet ) import SimplEnv ( SimplEnv, simplBinders, mkSimplEnv, setInScopeSet )
import SimplMonad import SimplMonad
import ErrUtils ( dumpIfSet, dumpIfSet_dyn, showPass ) import ErrUtils ( dumpIfSet, dumpIfSet_dyn, showPass )
import CoreLint ( endPass ) import CoreLint ( endPass, endIteration )
import FloatIn ( floatInwards ) import FloatIn ( floatInwards )
import FloatOut ( floatOutwards ) import FloatOut ( floatOutwards )
import FamInstEnv import FamInstEnv
...@@ -497,7 +497,7 @@ simplifyPgm mode switches hsc_env us imp_rule_base guts ...@@ -497,7 +497,7 @@ simplifyPgm mode switches hsc_env us imp_rule_base guts
-- Dump the result of this iteration -- Dump the result of this iteration
dumpIfSet_dyn dflags Opt_D_dump_simpl_iterations herald dumpIfSet_dyn dflags Opt_D_dump_simpl_iterations herald
(pprSimplCount counts') ; (pprSimplCount counts') ;
endPass dflags herald Opt_D_dump_simpl_iterations binds'' ; endIteration dflags herald Opt_D_dump_simpl_iterations binds'' ;
-- Loop -- Loop
do_iteration us2 (iteration_no + 1) all_counts binds'' do_iteration us2 (iteration_no + 1) all_counts binds''
......
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