[commit: nofib] master: Set -O2 via NoFibHcOpts instead of individual Makefiles. (a3b0f2b)

git at git.haskell.org git at git.haskell.org
Sat Jun 16 17:29:34 UTC 2018


Repository : ssh://git@git.haskell.org/nofib

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a3b0f2b2cff8babbb85cbbe1e7515905ffb444a8/nofib

>---------------------------------------------------------------

commit a3b0f2b2cff8babbb85cbbe1e7515905ffb444a8
Author: klebinger.andreas at gmx.at <klebinger.andreas at gmx.at>
Date:   Sat Jun 16 12:37:41 2018 -0400

    Set -O2 via NoFibHcOpts instead of individual Makefiles.
    
    We set -O2 in NoFibHcOpts which is then applied to all benchmarks run.
    
    Adding -O2 in individual benchmarks is therefore redundant.
    It also leads to issues when testing performance flags via
    EXTRA_HC_OPTS.
    Individual Makefiles attach -O2 last. This means all
    flags set by -O2 could not be disabled with -fno-<flag> as they
    were reenabled by the later -O2 switch.
    
    Test Plan: Using
    
    Reviewers: bgamari, jmct, O26 nofib
    
    Differential Revision: https://phabricator.haskell.org/D4829


>---------------------------------------------------------------

a3b0f2b2cff8babbb85cbbe1e7515905ffb444a8
 real/eff/S/Makefile                  | 2 +-
 shootout/binary-trees/Makefile       | 2 +-
 shootout/fannkuch-redux/Makefile     | 3 ++-
 shootout/fasta/Makefile              | 2 +-
 shootout/k-nucleotide/Makefile       | 2 +-
 shootout/n-body/Makefile             | 2 +-
 shootout/pidigits/Makefile           | 1 -
 shootout/reverse-complement/Makefile | 2 +-
 shootout/spectral-norm/Makefile      | 2 +-
 smp/threads005/Main.hs               | 2 --
 smp/threads006/Main.hs               | 1 -
 11 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/real/eff/S/Makefile b/real/eff/S/Makefile
index dd62b77..50c3e71 100644
--- a/real/eff/S/Makefile
+++ b/real/eff/S/Makefile
@@ -1,7 +1,7 @@
 TOP = ../../..
 include $(TOP)/mk/boilerplate.mk
 
-SRC_HC_OPTS += -fglasgow-exts -package transformers -package mtl -O2
+SRC_HC_OPTS += -fglasgow-exts -package transformers -package mtl
 
 include $(TOP)/mk/target.mk
 
diff --git a/shootout/binary-trees/Makefile b/shootout/binary-trees/Makefile
index 8a27f6d..6d944e8 100644
--- a/shootout/binary-trees/Makefile
+++ b/shootout/binary-trees/Makefile
@@ -8,5 +8,5 @@ SLOW_OPTS = 20  # official shootout setting
 
 # The benchmark game also uses -fllvm, which we can't since it might
 # not be available on the developer's machine.
-HC_OPTS += -XBangPatterns -O2 -funbox-strict-fields
+HC_OPTS += -XBangPatterns -funbox-strict-fields
 SRC_RUNTEST_OPTS += +RTS -K128M -H -RTS
diff --git a/shootout/fannkuch-redux/Makefile b/shootout/fannkuch-redux/Makefile
index facb262..729955f 100644
--- a/shootout/fannkuch-redux/Makefile
+++ b/shootout/fannkuch-redux/Makefile
@@ -8,4 +8,5 @@ SLOW_OPTS = 12  # official shootout setting
 
 # The benchmark game also uses -fllvm, which we can't since it might
 # not be available on the developer's machine.
-HC_OPTS += -XBangPatterns -O2
+HC_OPTS += -XBangPatterns
+
diff --git a/shootout/fasta/Makefile b/shootout/fasta/Makefile
index 97a8b17..e61f95c 100644
--- a/shootout/fasta/Makefile
+++ b/shootout/fasta/Makefile
@@ -13,7 +13,7 @@ SLOW_OPTS = 25000000  # official shootout setting
 
 # The benchmark game also uses -fllvm, which we can't since it might
 # not be available on the developer's machine.
-HC_OPTS += -O2 -XBangPatterns -XOverloadedStrings -package bytestring
+HC_OPTS += -XBangPatterns -XOverloadedStrings -package bytestring
 
 #------------------------------------------------------------------
 # Create output to validate against
diff --git a/shootout/k-nucleotide/Makefile b/shootout/k-nucleotide/Makefile
index a37cbad..8e1e714 100644
--- a/shootout/k-nucleotide/Makefile
+++ b/shootout/k-nucleotide/Makefile
@@ -9,7 +9,7 @@ SLOW_OPTS = 25000000  # official shootout setting
 
 # The benchmark game also uses -fllvm, which we can't since it might
 # not be available on the developer's machine.
-HC_OPTS += -O2 -XBangPatterns -package bytestring
+HC_OPTS += -XBangPatterns -package bytestring
 
 #------------------------------------------------------------------
 # Create input
diff --git a/shootout/n-body/Makefile b/shootout/n-body/Makefile
index 1ea0b09..2290826 100644
--- a/shootout/n-body/Makefile
+++ b/shootout/n-body/Makefile
@@ -8,4 +8,4 @@ SLOW_OPTS = 50000000  # official shootout setting
 
 # The benchmark game also uses -fllvm, which we can't since it might
 # not be available on the developer's machine.
-HC_OPTS += -O2 -XBangPatterns -fexcess-precision
+HC_OPTS += -XBangPatterns -fexcess-precision
diff --git a/shootout/pidigits/Makefile b/shootout/pidigits/Makefile
index fa2edca..fb3fc93 100644
--- a/shootout/pidigits/Makefile
+++ b/shootout/pidigits/Makefile
@@ -8,4 +8,3 @@ SLOW_OPTS = 10000  # official shootout setting
 
 # The benchmark game also uses -fllvm, which we can't since it might
 # not be available on the developer's machine.
-HC_OPTS += -O2
diff --git a/shootout/reverse-complement/Makefile b/shootout/reverse-complement/Makefile
index c165f2f..0b51e16 100644
--- a/shootout/reverse-complement/Makefile
+++ b/shootout/reverse-complement/Makefile
@@ -13,7 +13,7 @@ SLOW_OPTS = 25000000  # official shootout setting
 
 # The benchmark game also uses -fllvm, which we can't since it might
 # not be available on the developer's machine.
-HC_OPTS += -O2 -XBangPatterns -funfolding-use-threshold=32 -XMagicHash \
+HC_OPTS += -XBangPatterns -funfolding-use-threshold=32 -XMagicHash \
 	-XUnboxedTuples
 
 #------------------------------------------------------------------
diff --git a/shootout/spectral-norm/Makefile b/shootout/spectral-norm/Makefile
index fd5dbfb..a0728d9 100644
--- a/shootout/spectral-norm/Makefile
+++ b/shootout/spectral-norm/Makefile
@@ -8,4 +8,4 @@ SLOW_OPTS = 5500  # official shootout setting
 
 # The benchmark game also uses -fllvm, which we can't since it might
 # not be available on the developer's machine.
-HC_OPTS += -XBangPatterns -XMagicHash -O2 -fexcess-precision
+HC_OPTS += -XBangPatterns -XMagicHash -fexcess-precision
diff --git a/smp/threads005/Main.hs b/smp/threads005/Main.hs
index 970b3e1..24bb719 100644
--- a/smp/threads005/Main.hs
+++ b/smp/threads005/Main.hs
@@ -1,5 +1,3 @@
-{-# OPTIONS_GHC -O2 #-}
-
 -- Program from GHC ticket #1589, to test scaling of the RTS with many threads.
 
 {-
diff --git a/smp/threads006/Main.hs b/smp/threads006/Main.hs
index 565213c..c92e312 100644
--- a/smp/threads006/Main.hs
+++ b/smp/threads006/Main.hs
@@ -1,4 +1,3 @@
-{-# OPTIONS_GHC -O2 #-}
 import System.IO
 import System.Environment
 import System.CPUTime



More information about the ghc-commits mailing list