Adding pushing of hpc translation status through hi files.
[ghc-hetmet.git] / compiler / main / DynFlags.hs
index 896f136..d62013a 100644 (file)
@@ -676,6 +676,7 @@ data CoreToDo               -- These are diff core-to-core passes,
   | CoreCSE
   | CoreDoRuleCheck Int{-CompilerPhase-} String        -- Check for non-application of rules 
                                                -- matching this string
+  | CoreDoVectorisation
   | CoreDoNothing               -- Useful when building up 
   | CoreDoPasses [CoreToDo]     -- lists of these things
 
@@ -711,6 +712,7 @@ getCoreToDo dflags
     spec_constr   = dopt Opt_SpecConstr dflags
     liberate_case = dopt Opt_LiberateCase dflags
     rule_check    = ruleCheck dflags
+    vectorisation = dopt Opt_Vectorise dflags
 
     core_todo = 
      if opt_level == 0 then
@@ -738,6 +740,15 @@ getCoreToDo dflags
            MaxSimplifierIterations max_iter
        ],
 
+
+        -- We run vectorisation here for now, but we might also try to run
+        -- it later
+        runWhen vectorisation (CoreDoPasses [
+                  CoreDoVectorisation,
+                  CoreDoSimplify SimplGently
+                                  [NoCaseOfCase,
+                                   MaxSimplifierIterations max_iter]]),
+
        -- Specialisation is best done before full laziness
        -- so that overloaded functions have all their dictionary lambdas manifest
        CoreDoSpecialising,