Switch on the strictness analyser. There is a very old paper about GHC's
strictness analyser, <ulinkurl="http://research.microsoft.com/en-us/um/people/simonpj/papers/simple-strictnes-analyser.ps.gz">Measuring the effectiveness of a simple strictness analyser</ulink>, but the current one is quite a bit different.
<para><emphasis>Off by default, but enabled by -O2.</emphasis>
Turn on call-pattern specialisation; see <ulinkurl="http://research.microsoft.com/en-us/um/people/simonpj/papers/spec-constr/index.htm">Call-pattern specialisation for Haskell programs</ulink>.</para>
<para>Turn on the static argument transformation.</para>
TODO: Document optimisation
<para>Turn on the static argument transformation, which turns a recursive function into a non-recursive one with a local recursive loop. See Chapter 7 of <ulinkurl="http://research.microsoft.com/en-us/um/people/simonpj/papers/santos-thesis.ps.gz">Andre Santos's PhD thesis</ulink></para>
Float let-bindings inwards, nearer their binding site. See <ulinkurl="http://research.microsoft.com/en-us/um/people/simonpj/papers/float.ps.gz">Let-floating: moving bindings to give faster programs (ICFP'96)</ulink>.
<para>Turns off the full laziness optimisation (also known as
let-floating). Full laziness increases sharing, which can lead
<para><emphasis>On by default.</emphasis>
Run the full laziness optimisation (also known as
let-floating), which floats let-bindings outside enclosing lambdas, in the hope they will be thereby be computed less often.
See <ulinkurl="http://research.microsoft.com/en-us/um/people/simonpj/papers/float.ps.gz">Let-floating: moving bindings to give faster programs (ICFP'96)</ulink>.
<para> Usually GHC black-holes a thunk only when it switches threads. This flag makes it do so
as soon as the thunk is entered. See <ulinkurl="http://research.microsoft.com/en-us/um/people/simonpj/papers/parallel/">Haskell on a shared-memory multiprocessor</ulink>.
</para>
TODO: Document optimisation
</listitem>
</varlistentry>
...
...
@@ -2079,11 +2071,9 @@ f "2" = 2
<para>The difference between this and
<option>-funfolding-creation-threshold</option> is that this one
determines if a function definition will be inlined at a call
site. The other option determines if a function definition will
be kept around to begin with for potential inlining.</para>
TODO: Is above para correct?
determines if a function definition will be inlined <emphasis>at a call
site</emphasis>. The other option determines if a function definition will
be kept around at all for potential inlining.</para>