0.8.14.13: Step SBCL, step!
[sbcl.git] / src / compiler / policies.lisp
1 ;;;; aimed optimization qualities
2
3 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; more information.
5 ;;;;
6 ;;;; This software is derived from the CMU CL system, which was
7 ;;;; written at Carnegie Mellon University and released into the
8 ;;;; public domain. The software is in the public domain and is
9 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
10 ;;;; files for more information.
11
12 (in-package "SB!C")
13
14 (define-optimization-quality type-check
15     (cond ((= safety 0) 0)
16           ;; FIXME: It is duplicated in PROBABLE-TYPE-CHECK-P and in
17           ;; some other places.
18
19           ((and (<= speed safety)
20                 (<= space safety)
21                 (<= compilation-speed safety))
22            3)
23           (t 2))
24   ("no" "maybe" "fast" "full"))
25
26 (define-optimization-quality let-convertion
27     (if (<= debug speed) 3 0)
28   ("off" "maybe" "on" "on"))
29
30 (define-optimization-quality verify-arg-count
31     (if (zerop safety) 0 3)
32   ("no" "maybe" "yes" "yes"))
33
34 (define-optimization-quality merge-tail-calls
35     (if (or (> space debug)
36             (> speed debug))
37         3
38         0)
39   ("no" "maybe" "yes" "yes"))
40
41 (define-optimization-quality insert-debug-catch
42     (if (> debug (max speed space))
43         3
44         0)
45   ("no" "maybe" "yes" "yes"))
46
47 (define-optimization-quality recognize-self-calls
48     (if (> (max speed space) debug)
49         3
50         0)
51   ("no" "maybe" "yes" "yes"))
52
53 (define-optimization-quality stack-allocate-dynamic-extent
54     (if (and (> (max speed space) (max debug safety))
55              (< safety 3))
56         3
57         0)
58   ("no" "maybe" "yes" "yes"))
59
60 (define-optimization-quality float-accuracy
61     3
62   ("degraded" "full" "full" "full"))
63
64 (define-optimization-quality insert-step-conditions
65     (if (> debug (max speed space))
66         debug
67         0)
68   ("no" "no" "partial" "full"))