現在の optimize 指定を取得する
SBCL 依存だけど sb-ext:describe-compiler-policy または sb-cltl2:declaration-information で取得できる。
(sb-ext:describe-compiler-policy)
;;-> Basic qualities:
;; COMPILATION-SPEED = 1
;; DEBUG = 3
;; SAFETY = 3
;; SPACE = 1
;; SPEED = 1
;; INHIBIT-WARNINGS = 1
;; Dependent qualities:
;; SB-C::CHECK-CONSTANT-MODIFICATION = 1 -> 3 (yes)
;; SB-C::TYPE-CHECK = 1 -> 3 (full)
;; SB-C::CHECK-TAG-EXISTENCE = 1 -> 3 (yes)
;; SB-C::LET-CONVERSION = 1 -> 0 (off)
;; SB-C:VERIFY-ARG-COUNT = 1 -> 3 (yes)
;; SB-C::MERGE-TAIL-CALLS = 1 -> 0 (no)
;; SB-C::INSERT-DEBUG-CATCH = 1 -> 3 (yes)
;; SB-C::RECOGNIZE-SELF-CALLS = 1 -> 0 (no)
;; SB-C::FLOAT-ACCURACY = 1 -> 3 (full)
;; SB-C:INSERT-STEP-CONDITIONS = 1 -> 3 (full)
;; SB-C::COMPUTE-DEBUG-FUN = 1 -> 3 (yes)
;; SB-C::PRESERVE-SINGLE-USE-DEBUG-VARIABLES = 1 -> 3 (yes)
;; SB-C::INSERT-ARRAY-BOUNDS-CHECKS = 1 -> 3 (yes)
;; SB-C::STORE-XREF-DATA = 1 -> 3 (yes)
;; SB-C:STORE-COVERAGE-DATA = 1 -> 0 (no)
;;
;;=>
(sb-cltl2:declaration-information 'optimize)
;;=> ((COMPILATION-SPEED 1) (DEBUG 3) (SAFETY 3) (SPACE 1) (SPEED 1)
;; (INHIBIT-WARNINGS 1) (SB-C::CHECK-CONSTANT-MODIFICATION 1)
;; (SB-C::TYPE-CHECK 1) (SB-C::CHECK-TAG-EXISTENCE 1) (SB-C::LET-CONVERSION 1)
;; (SB-C:VERIFY-ARG-COUNT 1) (SB-C::MERGE-TAIL-CALLS 1)
;; (SB-C::INSERT-DEBUG-CATCH 1) (SB-C::RECOGNIZE-SELF-CALLS 1)
;; (SB-C::FLOAT-ACCURACY 1) (SB-C:INSERT-STEP-CONDITIONS 1)
;; (SB-C::COMPUTE-DEBUG-FUN 1) (SB-C::PRESERVE-SINGLE-USE-DEBUG-VARIABLES 1)
;; (SB-C::INSERT-ARRAY-BOUNDS-CHECKS 1) (SB-C::STORE-XREF-DATA 1)
;; (SB-C:STORE-COVERAGE-DATA 1))