<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -263,6 +263,8 @@ data DynFlag
    -- optimisation opts
    | Opt_Strictness
    | Opt_FullLaziness
+   | Opt_FloatIn
+   | Opt_Specialise
    | Opt_StaticArgumentTransformation
    | Opt_CSE
    | Opt_LiberateCase
@@ -890,6 +892,8 @@ optLevelFlags
     , ([1,2],   Opt_Strictness)
     , ([1,2],   Opt_CSE)
     , ([1,2],   Opt_FullLaziness)
+    , ([1,2],   Opt_Specialise)
+    , ([1,2],   Opt_FloatIn)
 
     , ([2],     Opt_LiberateCase)
     , ([2],     Opt_SpecConstr)
@@ -1051,6 +1055,8 @@ getCoreToDo dflags
     max_iter      = maxSimplIterations dflags
     strictness    = dopt Opt_Strictness dflags
     full_laziness = dopt Opt_FullLaziness dflags
+    do_specialise = dopt Opt_Specialise dflags
+    do_float_in   = dopt Opt_FloatIn dflags
     cse           = dopt Opt_CSE dflags
     spec_constr   = dopt Opt_SpecConstr dflags
     liberate_case = dopt Opt_LiberateCase dflags
@@ -1125,7 +1131,7 @@ getCoreToDo dflags
 
         -- Specialisation is best done before full laziness
         -- so that overloaded functions have all their dictionary lambdas manifest
-        CoreDoSpecialising,
+        runWhen do_specialise CoreDoSpecialising,
 
         runWhen full_laziness (CoreDoFloatOutwards constantsOnlyFloatOutSwitches),
       		-- Was: gentleFloatOutSwitches	
@@ -1136,7 +1142,7 @@ getCoreToDo dflags
 		-- 	    rewrite's allocation by 19%, and made  0.0% difference
 		-- 	    to any other nofib benchmark
 
-        CoreDoFloatInwards,
+        runWhen do_float_in CoreDoFloatInwards,
 
         simpl_phases,
 
@@ -1177,7 +1183,7 @@ getCoreToDo dflags
                 -- succeed in commoning up things floated out by full laziness.
                 -- CSE used to rely on the no-shadowing invariant, but it doesn't any more
 
-        CoreDoFloatInwards,
+        runWhen do_float_in CoreDoFloatInwards,
 
         maybe_rule_check 0,
 
@@ -1689,6 +1695,8 @@ fFlags = [
   ( &quot;warn-wrong-do-bind&quot;,               Opt_WarnWrongDoBind, const Supported ),
   ( &quot;print-explicit-foralls&quot;,           Opt_PrintExplicitForalls, const Supported ),
   ( &quot;strictness&quot;,                       Opt_Strictness, const Supported ),
+  ( &quot;specialise&quot;,                       Opt_Specialise, const Supported ),
+  ( &quot;float-in&quot;,                         Opt_FloatIn, const Supported ),
   ( &quot;static-argument-transformation&quot;,   Opt_StaticArgumentTransformation, const Supported ),
   ( &quot;full-laziness&quot;,                    Opt_FullLaziness, const Supported ),
   ( &quot;liberate-case&quot;,                    Opt_LiberateCase, const Supported ),</diff>
      <filename>compiler/main/DynFlags.hs</filename>
    </modified>
    <modified>
      <diff>@@ -1371,6 +1371,13 @@
 	    &lt;/row&gt;
 
 	    &lt;row&gt;
+	      &lt;entry&gt;&lt;option&gt;-fspecialise&lt;/option&gt;&lt;/entry&gt;
+	      &lt;entry&gt;Turn on specialisation of overloaded functions. Implied by &lt;option&gt;-O&lt;/option&gt;.&lt;/entry&gt;
+	      &lt;entry&gt;dynamic&lt;/entry&gt;
+	      &lt;entry&gt;-fno-specialise&lt;/entry&gt;
+	    &lt;/row&gt;
+
+	    &lt;row&gt;
 	      &lt;entry&gt;&lt;option&gt;-ffull-laziness&lt;/option&gt;&lt;/entry&gt;
 	      &lt;entry&gt;Turn on full laziness (floating bindings outwards). Implied by &lt;option&gt;-O&lt;/option&gt;.&lt;/entry&gt;
 	      &lt;entry&gt;dynamic&lt;/entry&gt;
@@ -1378,12 +1385,19 @@
 	    &lt;/row&gt;
 
 	    &lt;row&gt;
-	      &lt;entry&gt;&lt;option&gt;-frewrite-rules&lt;/option&gt;&lt;/entry&gt;
+	      &lt;entry&gt;&lt;option&gt;-ffloat-in&lt;/option&gt;&lt;/entry&gt;
+	      &lt;entry&gt;Turn on the float-in transformation. Implied by &lt;option&gt;-O&lt;/option&gt;.&lt;/entry&gt;
+	      &lt;entry&gt;dynamic&lt;/entry&gt;
+	      &lt;entry&gt;-fno-float-in&lt;/entry&gt;
+	    &lt;/row&gt;
+
+	    &lt;row&gt;
+	      &lt;entry&gt;&lt;option&gt;-fenable-rewrite-rules&lt;/option&gt;&lt;/entry&gt;
 	      &lt;entry&gt;Switch on all rewrite rules (including rules
 	      generated by automatic specialisation of overloaded functions).
 	      Implied by &lt;option&gt;-O&lt;/option&gt;. &lt;/entry&gt;
 	      &lt;entry&gt;dynamic&lt;/entry&gt;
-	      &lt;entry&gt;&lt;option&gt;-fno-rewrite-rules&lt;/option&gt;&lt;/entry&gt;
+	      &lt;entry&gt;&lt;option&gt;-fno-enable-rewrite-rules&lt;/option&gt;&lt;/entry&gt;
 	    &lt;/row&gt;
 
 	    &lt;row&gt;</diff>
      <filename>docs/users_guide/flags.xml</filename>
    </modified>
    <modified>
      <diff>@@ -1667,6 +1667,26 @@ f &quot;2&quot;    = 2
 
 	&lt;varlistentry&gt;
 	  &lt;term&gt;
+            &lt;option&gt;-fno-float-in&lt;/option&gt;
+            &lt;indexterm&gt;&lt;primary&gt;&lt;option&gt;-fno-float-in&lt;/option&gt;&lt;/primary&gt;&lt;/indexterm&gt;
+          &lt;/term&gt;
+	  &lt;listitem&gt;
+	    &lt;para&gt;Turns off the float-in transformation.&lt;/para&gt;
+	  &lt;/listitem&gt;
+	&lt;/varlistentry&gt;
+
+	&lt;varlistentry&gt;
+	  &lt;term&gt;
+            &lt;option&gt;-fno-specialise&lt;/option&gt;
+            &lt;indexterm&gt;&lt;primary&gt;&lt;option&gt;-fno-specialise&lt;/option&gt;&lt;/primary&gt;&lt;/indexterm&gt;
+          &lt;/term&gt;
+	  &lt;listitem&gt;
+	    &lt;para&gt;Turns off the automatic specialisation of overloaded functions.&lt;/para&gt;
+	  &lt;/listitem&gt;
+	&lt;/varlistentry&gt;
+
+	&lt;varlistentry&gt;
+	  &lt;term&gt;
             &lt;option&gt;-fspec-constr&lt;/option&gt;
             &lt;indexterm&gt;&lt;primary&gt;&lt;option&gt;-fspec-constr&lt;/option&gt;&lt;/primary&gt;&lt;/indexterm&gt;
           &lt;/term&gt;</diff>
      <filename>docs/users_guide/using.xml</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>145678a4d0e6fd408ab06811d3d63080a0b6283a</id>
    </parent>
  </parents>
  <author>
    <name>Simon Peyton Jones</name>
    <email>simonpj@microsoft.com</email>
  </author>
  <url>http://github.com/ghc-hq/ghc/commit/eb7bcde0e7e630afe8657f7d2d4e70c357b72629</url>
  <id>eb7bcde0e7e630afe8657f7d2d4e70c357b72629</id>
  <committed-date>2009-10-20T00:42:29-07:00</committed-date>
  <authored-date>2009-10-20T00:42:29-07:00</authored-date>
  <message>Add flags -fno-specialise, -fno-float-in, and document them

It turned out that we lacked flags to switch off these two passes,
so I added them.</message>
  <tree>781835b7a37f3a299b37c0db41ff04ac61470d26</tree>
  <committer>
    <name>Simon Peyton Jones</name>
    <email>simonpj@microsoft.com</email>
  </committer>
</commit>
