Commit a3b0f2b2 authored by Andreas Klebinger's avatar Andreas Klebinger Committed by Ben Gamari

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
parent 22240ca8
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
......@@ -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
......@@ -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
......@@ -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
......
......@@ -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
......
......@@ -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
......@@ -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
......@@ -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
#------------------------------------------------------------------
......
......@@ -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
{-# OPTIONS_GHC -O2 #-}
-- Program from GHC ticket #1589, to test scaling of the RTS with many threads.
{-
......
{-# OPTIONS_GHC -O2 #-}
import System.IO
import System.Environment
import System.CPUTime
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment