<entry><option>-fasm</option></entry>
<entry>Use the native code generator</entry>
<entry>dynamic</entry>
- <entry>-fvia-C</entry>
- </row>
- <row>
- <entry><option>-fvia-C</option></entry>
- <entry>Compile via C</entry>
- <entry>dynamic</entry>
- <entry>-fasm</entry>
+ <entry>-fllvm</entry>
</row>
<row>
<entry><option>-fllvm</option></entry>
</term>
<listitem>
<para>Use GHC's native code generator rather than
- compiling via C. This will compile faster (up to twice as
- fast), but may produce code that is slightly slower than
- compiling via C. <option>-fasm</option> is the default.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
- <option>-fvia-C</option>
- <indexterm><primary><option>-fvia-C</option></primary></indexterm>
- </term>
- <listitem>
- <para>Compile via C instead of using the native code
- generator. This is the default on architectures for which GHC
- doesn't have a native code generator.</para>
+ compiling via LLVM.
+ <option>-fasm</option> is the default.</para>
</listitem>
</varlistentry>
<listitem>
<para>Compile via LLVM instead of using the native code
generator. This will generally take slightly longer than the
- native code generator to compile but quicker than compiling
- via C. Produced code is generally the same speed or faster
+ native code generator to compile.
+ Produced code is generally the same speed or faster
than the other two code generators. Compiling via LLVM
requires LLVM version 2.7 or later to be on the path.</para>
</listitem>
<para>Keep intermediate <literal>.hc</literal> files when
doing <literal>.hs</literal>-to-<literal>.o</literal>
compilations via C (NOTE: <literal>.hc</literal> files
- aren't generated when using the native code generator, you
- may need to use <option>-fvia-C</option> to force them
- to be produced).</para>
+ are only generated by unregisterised compilers).</para>
</listitem>
</varlistentry>
</varlistentry>
<varlistentry>
- <term>Compile via C and crank up GCC:</term>
- <listitem>
- <para>The native code-generator is designed to be quick, not
- mind-bogglingly clever. Better to let GCC have a go, as it
- tries much harder on register allocation, etc.</para>
-
- <para>So, when we want very fast code, we use: <option>-O
- -fvia-C</option>.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
<term>Overloaded functions are not your friend:</term>
<listitem>
<para>Haskell's overloading (using type classes) is elegant,
<para>We don't use a <option>-O*</option> flag for day-to-day
work. We use <option>-O</option> to get respectable speed;
e.g., when we want to measure something. When we want to go for
- broke, we tend to use <option>-O2 -fvia-C</option> (and we go for
+ broke, we tend to use <option>-O2</option> (and we go for
lots of coffee breaks).</para>
<para>The easiest way to see what <option>-O</option> (etc.)