blob: 7ae8b4b160df4a56cf0b15de91964860a346f67c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
module Settings.Flavours.Benchmark (benchmarkFlavour) where
import qualified Data.Set as Set
import Expression
import Flavour
import Oracles.Flag
import {-# SOURCE #-} Settings.Default
-- Please update doc/flavours.md when changing this file.
benchmarkFlavour :: Flavour
benchmarkFlavour = defaultFlavour
{ name = "bench"
, extraArgs = benchmarkArgs
, libraryWays = pure $ Set.fromList [vanilla]
, rtsWays = Set.fromList <$> mconcat [pure [vanilla], targetSupportsThreadedRts ? pure [threaded]] }
benchmarkArgs :: Args
benchmarkArgs = sourceArgs SourceArgs
{ hsDefault = pure ["-O", "-H64m"]
, hsLibrary = pure ["-O2"]
-- TODO: We should really pass -O2 when notStage0. Otherwise, we aren't
-- really measuring the overhead of a potential new optimisation we want
-- to benchmark. This has to happen in sync with the Makefile build, though.
, hsCompiler = mconcat [stage0 ? arg "-O2", notStage0 ? arg "-O0"]
, hsGhc = pure ["-O2"] }
|