1.0.10.44: BUFFER-P, not BUFFERP
[sbcl.git] / src / compiler / policies.lisp
blobdc31e4f2560e486c65c5690e2590caa56e2b34ae
1 ;;;; aimed optimization qualities
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.
12 (in-package "SB!C")
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 ((and (<= speed safety)
19 (<= space safety)
20 (<= compilation-speed safety))
22 (t 2))
23 ("no" "maybe" "fast" "full"))
25 (define-optimization-quality check-tag-existence
26 (cond ((= safety 0) 0)
27 (t 3))
28 ("no" "maybe" "yes" "yes"))
30 (define-optimization-quality let-conversion
31 (if (<= debug speed) 3 0)
32 ("off" "maybe" "on" "on"))
34 (define-optimization-quality verify-arg-count
35 (if (zerop safety) 0 3)
36 ("no" "maybe" "yes" "yes"))
38 (define-optimization-quality merge-tail-calls
39 (if (or (> space debug)
40 (> speed debug))
43 ("no" "maybe" "yes" "yes"))
45 (define-optimization-quality insert-debug-catch
46 (if (> debug (max speed space))
49 ("no" "maybe" "yes" "yes"))
51 (define-optimization-quality recognize-self-calls
52 (if (> (max speed space) debug)
55 ("no" "maybe" "yes" "yes"))
57 (define-optimization-quality stack-allocate-dynamic-extent
58 (if (and (> (max speed space) (max debug safety))
59 (< safety 3))
62 ("no" "maybe" "yes" "yes"))
64 (define-optimization-quality stack-allocate-vector
65 (cond ((= stack-allocate-dynamic-extent 0) 0)
66 ((= safety 0) 3)
67 (t 2))
68 ("no" "maybe" "one page" "yes"))
70 (define-optimization-quality float-accuracy
72 ("degraded" "full" "full" "full"))
74 (define-optimization-quality insert-step-conditions
75 (if (> debug (max speed space compilation-speed))
76 debug
78 ("no" "no" "partial" "full"))
80 (define-optimization-quality compute-debug-fun
81 debug
82 ("no" "minimal" "yes" "yes"))
84 (define-optimization-quality preserve-single-use-debug-variables
85 (if (and (>= debug 2)
86 (< speed 3))
89 ("no" "no" "no" "yes"))
91 (define-optimization-quality insert-array-bounds-checks
92 (if (= safety 0) 0 3)
93 ("no" "yes" "yes" "yes"))
95 (define-optimization-quality store-xref-data
96 (if (= space 3)
99 ("no" "yes" "yes" "yes"))
101 (define-optimization-quality store-coverage-data
103 ("no" "no" "yes" "yes"))