[commit: ghc] master: Enable -funbox-small-strict-fields by default (ade1ae9)
Johan Tibell
johan.tibell at gmail.com
Tue Apr 30 17:44:57 CEST 2013
Repository : http://darcs.haskell.org/ghc.git/
On branch : master
https://github.com/ghc/ghc/commit/ade1ae97ed52c493ec415c1601dace39b64071dd
>---------------------------------------------------------------
commit ade1ae97ed52c493ec415c1601dace39b64071dd
Author: Johan Tibell <johan.tibell at gmail.com>
Date: Fri Apr 26 11:14:01 2013 -0700
Enable -funbox-small-strict-fields by default
The flag shows no real impact on nofib benchmarks and GHC itself,
which is expected given the small number of strict but not already
unpacked fields in the source of these programs. However, the flag
allows us to omit most of the UNPACK pragmas that are so common in
source code today.
>---------------------------------------------------------------
compiler/main/DynFlags.hs | 1 +
docs/users_guide/using.xml | 11 ++++++-----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 33eae5a..905c0d8 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -2767,6 +2767,7 @@ optLevelFlags
, ([1,2], Opt_FullLaziness)
, ([1,2], Opt_Specialise)
, ([1,2], Opt_FloatIn)
+ , ([1,2], Opt_UnboxSmallStrictFields)
, ([2], Opt_LiberateCase)
, ([2], Opt_SpecConstr)
diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml
index be7e3da..9c6fbf7 100644
--- a/docs/users_guide/using.xml
+++ b/docs/users_guide/using.xml
@@ -1901,11 +1901,12 @@ f "2" = 2
<indexterm><primary>constructor fields, strict</primary></indexterm>
</term>
<listitem>
- <para>This option causes all constructor fields which are
- marked strict (i.e. “!”) and which
- representation is smaller or equal to the size of a
- pointer to be unpacked, if possible. It is equivalent to
- adding an <literal>UNPACK</literal> pragma (see <xref
+ <para><emphasis>On by default.</emphasis>. This option
+ causes all constructor fields which are marked strict
+ (i.e. “!”) and which representation is smaller
+ or equal to the size of a pointer to be unpacked, if
+ possible. It is equivalent to adding an
+ <literal>UNPACK</literal> pragma (see <xref
linkend="unpack-pragma"/>) to every strict constructor
field that fulfils the size restriction.
</para>
More information about the ghc-commits
mailing list