Move some flags from the Makefile into module pragmas
authorIan Lynagh <igloo@earth.li>
Thu, 10 Jul 2008 12:48:27 +0000 (12:48 +0000)
committerIan Lynagh <igloo@earth.li>
Thu, 10 Jul 2008 12:48:27 +0000 (12:48 +0000)
compiler/Makefile
compiler/utils/Binary.hs
compiler/utils/Encoding.hs
compiler/utils/FastMutInt.lhs
compiler/utils/FastString.lhs
compiler/utils/StringBuffer.lhs

index ea3e07b..ea02562 100644 (file)
@@ -645,14 +645,6 @@ endif
 
 # basicTypes/SrcLoc_HC_OPTS    = -funbox-strict-fields
 
-# We always optimise some low-level modules, otherwise performance of
-# a non-optimised compiler is severely affected.
-utils/Binary_HC_OPTS           += -O -funbox-strict-fields
-utils/FastMutInt_HC_OPTS       += -O
-utils/Encoding_HC_OPTS         += -O
-utils/StringBuffer_HC_OPTS     += -O -funbox-strict-fields
-utils/FastString_HC_OPTS       += -O -funbox-strict-fields
-
 # ---- Profiling ----
 #simplCore/Simplify_HC_OPTS = -auto-all
 #simplCore/SimplEnv_HC_OPTS = -auto-all
index 3d20609..80d10cb 100644 (file)
@@ -1,4 +1,8 @@
 {-# OPTIONS -cpp #-}
+{-# OPTIONS_GHC -O -funbox-strict-fields #-}
+-- We always optimise this, otherwise performance of a non-optimised
+-- compiler is severely affected
+
 --
 -- (c) The University of Glasgow 2002-2006
 --
index f2659e6..c790f38 100644 (file)
@@ -1,3 +1,7 @@
+{-# OPTIONS_GHC -O #-}
+-- We always optimise this, otherwise performance of a non-optimised
+-- compiler is severely affected
+
 -- -----------------------------------------------------------------------------
 --
 -- (c) The University of Glasgow, 1997-2006
index 00aba34..e8ea58c 100644 (file)
@@ -1,10 +1,14 @@
+\begin{code}
 {-# OPTIONS -cpp #-}
+{-# OPTIONS_GHC -O #-}
+-- We always optimise this, otherwise performance of a non-optimised
+-- compiler is severely affected
+
 --
 -- (c) The University of Glasgow 2002-2006
 --
 -- Unboxed mutable Ints
 
-\begin{code}
 module FastMutInt(
        FastMutInt, newFastMutInt,
        readFastMutInt, writeFastMutInt,
index ac79b5b..f338002 100644 (file)
@@ -2,6 +2,10 @@
 % (c) The University of Glasgow, 1997-2006
 %
 \begin{code}
+{-# OPTIONS_GHC -O -funbox-strict-fields #-}
+-- We always optimise this, otherwise performance of a non-optimised
+-- compiler is severely affected
+
 {-
 FastString:     A compact, hash-consed, representation of character strings.
                 Comparison is O(1), and you can get a Unique from them.
index d51c800..3b2a3df 100644 (file)
@@ -6,6 +6,10 @@
 Buffers for scanning string input stored in external arrays.
 
 \begin{code}
+{-# OPTIONS_GHC -O -funbox-strict-fields #-}
+-- We always optimise this, otherwise performance of a non-optimised
+-- compiler is severely affected
+
 module StringBuffer
        (
         StringBuffer(..),