[commit: ghc] wip/exceptions-note, wip/hadrian-import-packages, wip/splice-parsing, wip/trac-16270: Use O2 on stage1 for faster overall build times with make. (92c7e70)

git at git.haskell.org git at git.haskell.org
Sat Feb 2 08:59:21 UTC 2019


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

On branches: wip/exceptions-note,wip/hadrian-import-packages,wip/splice-parsing,wip/trac-16270
Link       : http://ghc.haskell.org/trac/ghc/changeset/92c7e70ff3135b79485be2d36cfac3d2441c29df/ghc

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

commit 92c7e70ff3135b79485be2d36cfac3d2441c29df
Author: klebinger.andreas at gmx.at <klebinger.andreas at gmx.at>
Date:   Thu Jan 24 20:20:39 2019 +0100

    Use O2 on stage1 for faster overall build times with make.
    
    Build times when using the quick flavour:
    
    stage1 opt | time (wall) | time (user)
         -O1   |        13m  |        53m
         -O2   |        13m  |        51m
    So even when we compile stage2 with -O0 (quick)
    using -O2 on stage1 is already faster.
    
    The difference is even bigger when freezing
    stage1 and doing multiple builds or compiling
    stage2 with optimizations.


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

92c7e70ff3135b79485be2d36cfac3d2441c29df
 mk/flavours/bench-cross-ncg.mk | 2 +-
 mk/flavours/bench.mk           | 2 +-
 mk/flavours/devel2.mk          | 2 +-
 mk/flavours/perf.mk            | 2 +-
 mk/flavours/prof.mk            | 2 +-
 mk/flavours/quick-cross-ncg.mk | 2 +-
 mk/flavours/quick.mk           | 2 +-
 mk/flavours/quickest.mk        | 2 +-
 mk/flavours/validate.mk        | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/mk/flavours/bench-cross-ncg.mk b/mk/flavours/bench-cross-ncg.mk
index 6b686af..0d42938 100644
--- a/mk/flavours/bench-cross-ncg.mk
+++ b/mk/flavours/bench-cross-ncg.mk
@@ -1,5 +1,5 @@
 SRC_HC_OPTS        = -O -H64m
-GhcStage1HcOpts    = -O
+GhcStage1HcOpts    = -O2
 GhcStage2HcOpts    = -O0
 GhcLibHcOpts       = -O2
 BUILD_PROF_LIBS    = NO
diff --git a/mk/flavours/bench.mk b/mk/flavours/bench.mk
index 0a7cf80..73015aa 100644
--- a/mk/flavours/bench.mk
+++ b/mk/flavours/bench.mk
@@ -1,5 +1,5 @@
 SRC_HC_OPTS        = -O -H64m
-GhcStage1HcOpts    = -O
+GhcStage1HcOpts    = -O2
 GhcStage2HcOpts    = -O0
 GhcLibHcOpts       = -O2
 BUILD_PROF_LIBS    = NO
diff --git a/mk/flavours/devel2.mk b/mk/flavours/devel2.mk
index 34808a3..dc8be47 100644
--- a/mk/flavours/devel2.mk
+++ b/mk/flavours/devel2.mk
@@ -1,5 +1,5 @@
 SRC_HC_OPTS        = -O -H64m
-GhcStage1HcOpts    = -O
+GhcStage1HcOpts    = -O2
 GhcStage2HcOpts    = -O0 -DDEBUG
 GhcLibHcOpts       = -O -dcore-lint
 BUILD_PROF_LIBS    = NO
diff --git a/mk/flavours/perf.mk b/mk/flavours/perf.mk
index 06fcc24..ec314bd 100644
--- a/mk/flavours/perf.mk
+++ b/mk/flavours/perf.mk
@@ -1,5 +1,5 @@
 SRC_HC_OPTS        = -O -H64m
-GhcStage1HcOpts    = -O
+GhcStage1HcOpts    = -O2
 GhcStage2HcOpts    = -O2
 GhcLibHcOpts       = -O2
 BUILD_PROF_LIBS    = YES
diff --git a/mk/flavours/prof.mk b/mk/flavours/prof.mk
index 67f89e6..c7e0e28 100644
--- a/mk/flavours/prof.mk
+++ b/mk/flavours/prof.mk
@@ -1,5 +1,5 @@
 SRC_HC_OPTS        = -O0 -H64m
-GhcStage1HcOpts    = -O
+GhcStage1HcOpts    = -O2
 GhcStage2HcOpts    = -O
 GhcLibHcOpts       = -O
 BUILD_PROF_LIBS    = YES
diff --git a/mk/flavours/quick-cross-ncg.mk b/mk/flavours/quick-cross-ncg.mk
index 97352cc..5ca88c0 100644
--- a/mk/flavours/quick-cross-ncg.mk
+++ b/mk/flavours/quick-cross-ncg.mk
@@ -1,5 +1,5 @@
 SRC_HC_OPTS        = -O0 -H64m
-GhcStage1HcOpts    = -O
+GhcStage1HcOpts    = -O2
 GhcStage2HcOpts    = -O0
 GhcLibHcOpts       = -O
 BUILD_PROF_LIBS    = NO
diff --git a/mk/flavours/quick.mk b/mk/flavours/quick.mk
index 735de6a..30322cd 100644
--- a/mk/flavours/quick.mk
+++ b/mk/flavours/quick.mk
@@ -1,5 +1,5 @@
 SRC_HC_OPTS        = -O0 -H64m
-GhcStage1HcOpts    = -O
+GhcStage1HcOpts    = -O2
 GhcStage2HcOpts    = -O0
 GhcLibHcOpts       = -O
 BUILD_PROF_LIBS    = NO
diff --git a/mk/flavours/quickest.mk b/mk/flavours/quickest.mk
index 61e091c..5204acb 100644
--- a/mk/flavours/quickest.mk
+++ b/mk/flavours/quickest.mk
@@ -1,5 +1,5 @@
 SRC_HC_OPTS        = -O0 -H64m
-GhcStage1HcOpts    = -O
+GhcStage1HcOpts    = -O2
 GhcStage2HcOpts    = -O0
 GhcLibHcOpts       = -O0
 BUILD_PROF_LIBS    = NO
diff --git a/mk/flavours/validate.mk b/mk/flavours/validate.mk
index 2ff7c20..a1470cd 100644
--- a/mk/flavours/validate.mk
+++ b/mk/flavours/validate.mk
@@ -1,6 +1,6 @@
 SRC_HC_OPTS        = -O0 -H64m
 SRC_HC_OPTS_STAGE1 = -fllvm-fill-undef-with-garbage   # See Trac 11487
-GhcStage1HcOpts    = -O -DDEBUG
+GhcStage1HcOpts    = -O2 -DDEBUG
 GhcStage2HcOpts    = -O -dcore-lint -dno-debug-output
 GhcLibHcOpts       = -O -dcore-lint -dno-debug-output
 BUILD_PROF_LIBS    = NO



More information about the ghc-commits mailing list