X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FsimplCore%2FSimplCore.lhs;h=5b52d2d2d72eb7bd79a741ec732d81f7e554fae2;hb=0ac253aac15a6d5bcfa54be310531203a5456a0a;hp=9a4c1eb289a6bf0c3b13161342dc80561b9755c5;hpb=4e94e62917cc4cf5b4711b398f01e1b980cd4a5d;p=ghc-hetmet.git diff --git a/compiler/simplCore/SimplCore.lhs b/compiler/simplCore/SimplCore.lhs index 9a4c1eb..5b52d2d 100644 --- a/compiler/simplCore/SimplCore.lhs +++ b/compiler/simplCore/SimplCore.lhs @@ -161,7 +161,7 @@ doCorePass CoreDoWorkerWrapper = {-# SCC "WorkWrap" #-} trBindsU ww doCorePass CoreDoSpecialising = {-# SCC "Specialise" #-} trBindsU specProgram doCorePass CoreDoSpecConstr = {-# SCC "SpecConstr" #-} trBindsU specConstrProgram doCorePass CoreDoGlomBinds = trBinds glomBinds -doCorePass CoreDoVectorisation = {-# SCC "Vectorise" #-} vectorise +doCorePass (CoreDoVectorisation be) = {-# SCC "Vectorise" #-} vectorise be doCorePass CoreDoPrintCore = observe printCore doCorePass (CoreDoRuleCheck phase pat) = ruleCheck phase pat doCorePass CoreDoNothing = observe (\ _ _ -> return ()) @@ -284,7 +284,8 @@ prepareRules :: HscEnv -- (b) Rules are now just orphan rules prepareRules hsc_env@(HscEnv { hsc_dflags = dflags, hsc_HPT = hpt }) - guts@(ModGuts { mg_binds = binds, mg_deps = deps, mg_rules = local_rules }) + guts@(ModGuts { mg_binds = binds, mg_deps = deps + , mg_rules = local_rules, mg_rdr_env = rdr_env }) us = do { let -- Simplify the local rules; boringly, we need to make an in-scope set -- from the local binders, to avoid warnings from Simplify.simplVar @@ -317,7 +318,8 @@ prepareRules hsc_env@(HscEnv { hsc_dflags = dflags, hsc_HPT = hpt }) imp_rule_base = extendRuleBaseList hpt_rule_base rules_for_imps ; dumpIfSet_dyn dflags Opt_D_dump_rules "Transformation rules" - (vcat [text "Local rules", pprRules better_rules, + (withPprStyle (mkUserStyle (mkPrintUnqualified dflags rdr_env) AllTheWay) $ + vcat [text "Local rules", pprRules better_rules, text "", text "Imported rules", pprRuleBase imp_rule_base]) @@ -493,15 +495,13 @@ simplifyPgm mode switches hsc_env us imp_rule_base guts -- iteration_no is the number of the iteration we are -- about to begin, with '1' for the first | iteration_no > max_iterations -- Stop if we've run out of iterations - = do { - when (debugIsOn && (max_iterations > 2)) $ - hPutStr stderr ("NOTE: Simplifier still going after " ++ - show max_iterations ++ - " iterations; bailing out. Size = " ++ show (coreBindsSize binds) ++ "\n" ) + = WARN(debugIsOn && (max_iterations > 2), + text ("Simplifier still going after " ++ + show max_iterations ++ + " iterations; bailing out. Size = " ++ show (coreBindsSize binds) ++ "\n" )) -- Subtract 1 from iteration_no to get the -- number of iterations we actually completed - ; return ("Simplifier bailed out", iteration_no - 1, counts, binds) - } + return ("Simplifier bailed out", iteration_no - 1, counts, binds) -- Try and force thunks off the binds; significantly reduces -- space usage, especially with -O. JRS, 000620.