diff options
author | Ian Lynagh <igloo@earth.li> | 2008-07-01 17:59:27 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2008-07-01 17:59:27 +0000 |
commit | 982f6e5405eadb41860772ad0fe13ce0980fad2f (patch) | |
tree | 557e1c844753cf47dcb167f703d1bc9fc66b3cd7 | |
parent | 4d7ac0e3227c408de20af4ef7898028863327492 (diff) | |
download | haskell-982f6e5405eadb41860772ad0fe13ce0980fad2f.tar.gz |
Add --slow (and --fast) options to validate
slow mode is 14% slower than normal. It uses -DDEBUG for the stage 2
compiler, and -XGenerics for the stage 2 compiler and the libraries.
I believe that most of the slowdown is actually caused by -XGenerics
rather than -DDEBUG.
-rw-r--r-- | mk/validate-settings.mk | 11 | ||||
-rw-r--r-- | validate | 28 |
2 files changed, 27 insertions, 12 deletions
diff --git a/mk/validate-settings.mk b/mk/validate-settings.mk index b49ba59a9a..83995e59f9 100644 --- a/mk/validate-settings.mk +++ b/mk/validate-settings.mk @@ -5,7 +5,8 @@ HADDOCK_DOCS = YES SRC_CC_OPTS = $(WERROR) SRC_HC_OPTS = $(WERROR) -H64m -O0 -fasm GhcStage1HcOpts = -O -fasm -GhcStage2HcOpts = -O0 -fasm $(ValidateHpcFlags) + +GhcStage2HcOpts = -O0 -fasm GhcLibHcOpts = -O -fasm -dcore-lint GhcLibWays = SplitObjs = NO @@ -13,3 +14,11 @@ NoFibWays = STRIP = : GhcBootLibs = YES +ifeq "$(ValidateHpc)" "YES" +GhcStage2HcOpts += -fhpc -hpcdir $(FPTOOLS_TOP_ABS)/testsuite/hpc_output/ +endif +ifeq "$(ValidateSlow)" "YES" +GhcStage2HcOpts += -XGenerics -DDEBUG +GhcLibHcOpts += -XGenerics +endif + @@ -6,13 +6,18 @@ # --testsuite-only: don't build the compiler, just run # the test suite # --hpc: build stage2 with -fhpc, and see how much of the -# compiler the test suite covers +# compiler the test suite covers. +# 2008-07-01: 63% slower than the default. +# --fast: Default. Opposite to --slow. +# --slow: Build stage2 with -DDEBUG. +# 2008-07-01: 14% slower than the default. set -e no_clean=0 testsuite_only=0 -hpc=0 +hpc=NO +slow=NO while [ $# -gt 0 ] do @@ -24,7 +29,13 @@ do testsuite_only=1 ;; --hpc) - hpc=1 + hpc=YES + ;; + --slow) + slow=YES + ;; + --fast) + slow=NO ;; *) echo "Bad argument: $1" >&2 @@ -59,15 +70,10 @@ sh boot thisdir=`utils/pwd/pwd forwardslash` -if [ "$hpc" = 1 ] -then - hpcflags="ValidateHpcFlags=-fhpc -hpcdir $thisdir/testsuite/hpc_output/" -fi - -make Validating=YES -j$threads ${hpcflags+"$hpcflags"} +make Validating=YES -j$threads ValidateHpc=$hpc ValidateSlow=$slow fi # testsuite-only -if [ "$hpc" = 1 ] +if [ "$hpc" = YES ] then # XXX With threads we'd need to give a different tix file to each thread # and then sum them up at the end @@ -79,7 +85,7 @@ fi make Validating=YES -C testsuite/tests/ghc-regress fast stage=2 CLEANUP=1 THREADS=$threads 2>&1 | tee testlog -if [ "$hpc" = 1 ] +if [ "$hpc" = YES ] then utils/hpc/hpc markup --hpcdir=. --srcdir=compiler --srcdir=testsuite/hpc_output --destdir=testsuite/hpc_output testsuite/hpc_output/ghc.tix fi |