~ chicken-core (chicken-5) ec3069d12920cefa4f5865b6ff11f105d3b1c33e


commit ec3069d12920cefa4f5865b6ff11f105d3b1c33e
Author:     unknown <felix@.(none)>
AuthorDate: Thu Nov 5 09:52:10 2009 +0100
Commit:     unknown <felix@.(none)>
CommitDate: Thu Nov 5 09:52:10 2009 +0100

    removed benchmark mode, added -O5

diff --git a/chicken.scm b/chicken.scm
index 9b2afd93..e3fffd7f 100644
--- a/chicken.scm
+++ b/chicken.scm
@@ -93,7 +93,13 @@
 		   [(4)
 		    (set! options
 		      (cons* 'optimize-leaf-routines 'inline 'local 'unsafe options) ) ]
-		   [else (compiler-warning 'usage "invalid optimization level ~S - ignored" (car rest))] )
+		   [else
+		    (when (>= level 5)
+		      (set! options 
+			(cons* 'disable-interrupts 'no-trace 'unsafe 'block
+			       'optimize-leaf-routines 'lambda-lift 'no-lambda-info
+			       'inline
+			       options) ) ) ] )
 		 (loop (cdr rest)) ) ]
 	      [(eq? 'debug-level o)
 	       (let ([level (string->number (car rest))])
@@ -103,13 +109,6 @@
 		   [(2) #f]
 		   [else (compiler-warning 'usage "invalid debug level ~S - ignored" (car rest))] )
 		 (loop (cdr rest)) ) ]
-	      [(eq? 'benchmark-mode o)
-	       (set! options 
-		 (cons* 'fixnum-arithmetic 'disable-interrupts 'no-trace 'unsafe
-			'optimize-leaf-routines 'block 'lambda-lift 'no-lambda-info
-			'inline
-			options) )
-	       (loop rest) ]
 	      [(memq o valid-compiler-options) (loop rest)]
 	      [(memq o valid-compiler-options-with-argument)
 	       (if (pair? rest)
diff --git a/csc.scm b/csc.scm
index 2b0834cd..c06fce9e 100644
--- a/csc.scm
+++ b/csc.scm
@@ -125,7 +125,7 @@
 (define-constant simple-options
   '(-explicit-use -no-trace -no-warnings -no-usual-integrations -optimize-leaf-routines -unsafe
     -block -disable-interrupts -fixnum-arithmetic -to-stdout -profile -raw -accumulate-profile
-    -check-syntax -case-insensitive -benchmark-mode -shared -compile-syntax -no-lambda-info
+    -check-syntax -case-insensitive -shared -compile-syntax -no-lambda-info
     -lambda-lift -dynamic -disable-stack-overflow-checks -local
     -emit-external-prototypes-first -inline -release -scrutinize
     -analyze-only -keep-shadowed-macros -inline-global -ignore-repository
@@ -147,7 +147,6 @@
     (-S "-scrutinize")
     (|-P| "-check-syntax")
     (|-V| "-version")
-    (|-Ob| "-benchmark-mode")
     (-f "-fixnum-arithmetic")
     (|-D| "-feature")
     (-i "-case-insensitive")
@@ -345,7 +344,7 @@ Usage: ~a FILENAME | OPTION ...
 
   Optimization options:
 
-    -O -O1 -O2 -O3 -O4 -optimize-level NUMBER
+    -O -O1 -O2 -O3 -O4 -O5 -optimize-level NUMBER
                                    enable certain sets of optimization options
     -optimize-leaf-routines        enable leaf routine optimization
     -N  -no-usual-integrations     standard procedures may be redefined
@@ -355,9 +354,6 @@ Usage: ~a FILENAME | OPTION ...
     -b  -block                     enable block-compilation
     -disable-interrupts            disable interrupts in compiled code
     -f  -fixnum-arithmetic         assume all numbers are fixnums
-    -Ob  -benchmark-mode           equivalent to '-block -optimize-level 4
-                                    -debug-level 0 -fixnum-arithmetic
-                                    -lambda-lift -inline -disable-interrupts'
     -lambda-lift                   perform lambda-lifting
     -unsafe-libraries              link with unsafe runtime system
     -disable-stack-overflow-checks disables detection of stack-overflows
@@ -641,6 +637,14 @@ EOF
 	       [(|-O2|) (set! rest (cons* "-optimize-level" "2" rest))]
 	       [(|-O3|) (set! rest (cons* "-optimize-level" "3" rest))]
 	       [(|-O4|) (set! rest (cons* "-optimize-level" "4" rest))]
+	       [(|-O5|)
+		(set! rest (cons* "-optimize-level" "5" rest))
+		(t-options "-unsafe-libraries")
+		(set! library-files unsafe-library-files)
+		(set! shared-library-files unsafe-shared-library-files)
+		(when (memq (build-platform) '(mingw32 cygwin gnu))
+		  (set! compile-options 
+		    (cons* "-O3" "-fomit-frame-pointer" compile-options)) ) ]
 	       [(-d0) (set! rest (cons* "-debug-level" "0" rest))]
 	       [(-d1) (set! rest (cons* "-debug-level" "1" rest))]
 	       [(-d2) (set! rest (cons* "-debug-level" "2" rest))]
diff --git a/manual/Using the compiler b/manual/Using the compiler
index 89dad9bb..2fdb5d77 100644
--- a/manual/Using the compiler	
+++ b/manual/Using the compiler	
@@ -26,8 +26,6 @@ Possible options are:
 
 ; -analyze-only : Stop compilation after first analysis pass.
 
-; -benchmark-mode : Equivalent to {{-no-trace -no-lambda-info -optimize-level 4}} {{-fixnum-arithmetic -disable-interrupts -block -inline -lambda-lift}}.
-
 ; -block : Enable block-compilation. When this option is specified, the compiler assumes that global variables are not modified outside this compilation-unit.  Specifically, toplevel bindings are not seen by {{eval}} and unused toplevel bindings are removed.
 
 ; -case-insensitive : Enables the reader to read symbols case insensitive. The default is to read case sensitive (in violation of R5RS).  This option registers the {{case-insensitive}} feature identifier.
@@ -169,6 +167,7 @@ Possible options are:
      -optimize-level 2          is currently the same as -optimize-level 1 -inline
      -optimize-level 3          is equivalent to -optimize-leaf-routines -local -inline
      -optimize-level 4          is equivalent to -optimize-leaf-routines -local -inline -unsafe
+     -optimize-level 5          is equivalent to -optimize-leaf-routines -block -inline -unsafe -lambda-lift -disable-interrupts -no-trace -no-lambda-info
 
 ; -output-file FILENAME : Specifies the pathname of the generated C file. Default is {{FILENAME.c}}.
 
Trap