Skip to content

Commit

Permalink
0.8.2.43:
Browse files Browse the repository at this point in the history
        * New optimization policy: RECOGNIZE-SELF-CALLS;
        * on x86 DATA-VECTOR-REF/SIMPLE-BASE-STRING does not use AL
          temporary.
  • Loading branch information
Alexey Dejneka committed Aug 19, 2003
1 parent b8fb12e commit d8edba3
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 25 deletions.
6 changes: 0 additions & 6 deletions BUGS
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,6 @@ WORKAROUND:
45:
a slew of floating-point-related errors reported by Peter Van Eynde
on July 25, 2000:
b: SBCL's value for LEAST-POSITIVE-SHORT-FLOAT on the x86 is
bogus, and should probably be 1.4012985e-45. In SBCL,
(/ LEAST-POSITIVE-SHORT-FLOAT 2) returns a number smaller
than LEAST-POSITIVE-SHORT-FLOAT. Similar problems
exist for LEAST-NEGATIVE-SHORT-FLOAT, LEAST-POSITIVE-LONG-FLOAT,
and LEAST-NEGATIVE-LONG-FLOAT.
c: Many expressions generate floating infinity on x86/Linux:
(/ 1 0.0)
(/ 1 0.0d0)
Expand Down
7 changes: 7 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -1968,6 +1968,13 @@ changes in sbcl-0.8.3 relative to sbcl-0.8.2:
* x86 bug fix in control stack exhaustion checking: now shows backtrace
* bug fix in WITH-TIMEOUT: now the body can have more than one form.
(thanks to Stig Sandoe)
* new optimization: inside a named function any reference to a
function with the same name is considered to be a self-reference;
this behaviour is controlled with SB-C::RECOGNIZE-SELF-CALLS
optimization quality.
* new optimization on x86: logical functions and + now have
optimized (UNSIGNED-BYTE 32) versions, which are automatically
used when the result is truncated to 32 bits.
* fixed some bugs revealed by Paul Dietz' test suite:
** The system now obeys the constraint imposed by
UPGRADED-ARRAY-ELEMENT-TYPE that the upgraded array element
Expand Down
5 changes: 4 additions & 1 deletion src/compiler/ir1tran-lambda.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,10 @@
(setf (defined-fun-functional defined-fun-res)
res)
(unless (eq (defined-fun-inlinep defined-fun-res) :notinline)
(substitute-leaf res defined-fun-res))
(substitute-leaf-if
(lambda (ref)
(policy ref (> recognize-self-calls 0)))
res defined-fun-res))
res)
(apply #'ir1-convert-lambda `(lambda ,@(cddr thing))
:debug-name name args))))
Expand Down
6 changes: 6 additions & 0 deletions src/compiler/policies.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@
3
0)
("no" "maybe" "yes" "yes"))

(define-optimization-quality recognize-self-calls
(if (> (max speed space) debug)
3
0)
("no" "maybe" "yes" "yes"))
22 changes: 5 additions & 17 deletions src/compiler/x86/array.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -1253,46 +1253,34 @@
(:args (object :scs (descriptor-reg))
(index :scs (unsigned-reg)))
(:arg-types simple-base-string positive-fixnum)
(:temporary (:sc unsigned-reg ; byte-reg
:offset eax-offset ; al-offset
:target value
:from (:eval 0) :to (:result 0))
eax)
(:ignore eax)
(:results (value :scs (base-char-reg)))
(:result-types base-char)
(:generator 5
(inst mov al-tn
(inst mov value
(make-ea :byte :base object :index index :scale 1
:disp (- (* vector-data-offset n-word-bytes)
other-pointer-lowtag)))
(move value al-tn)))
other-pointer-lowtag)))))

(define-vop (data-vector-ref-c/simple-base-string)
(:translate data-vector-ref)
(:policy :fast-safe)
(:args (object :scs (descriptor-reg)))
(:info index)
(:arg-types simple-base-string (:constant (signed-byte 30)))
(:temporary (:sc unsigned-reg :offset eax-offset :target value
:from (:eval 0) :to (:result 0))
eax)
(:ignore eax)
(:results (value :scs (base-char-reg)))
(:result-types base-char)
(:generator 4
(inst mov al-tn
(inst mov value
(make-ea :byte :base object
:disp (- (+ (* vector-data-offset n-word-bytes) index)
other-pointer-lowtag)))
(move value al-tn)))
other-pointer-lowtag)))))

(define-vop (data-vector-set/simple-base-string)
(:translate data-vector-set)
(:policy :fast-safe)
(:args (object :scs (descriptor-reg) :to (:eval 0))
(index :scs (unsigned-reg) :to (:eval 0))
(value :scs (base-char-reg)))
(value :scs (base-char-reg) :target result))
(:arg-types simple-base-string positive-fixnum base-char)
(:results (result :scs (base-char-reg)))
(:result-types base-char)
Expand Down
2 changes: 1 addition & 1 deletion version.lisp-expr
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
"0.8.2.42"
"0.8.2.43"

0 comments on commit d8edba3

Please sign in to comment.