0.8.5.45:
authorAlexey Dejneka <adejneka@comail.ru>
Mon, 17 Nov 2003 11:47:09 +0000 (11:47 +0000)
committerAlexey Dejneka <adejneka@comail.ru>
Mon, 17 Nov 2003 11:47:09 +0000 (11:47 +0000)
        * Fix PFD bugs MISC.177, 182: in copy propagation a local
          lambda argument has a hidden write.

BUGS
src/compiler/copyprop.lisp
tests/compiler.pure.lisp
version.lisp-expr

diff --git a/BUGS b/BUGS
index fed7fc3..c74909d 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -447,7 +447,9 @@ WORKAROUND:
     * '``(FOO ,@',@S)
     ``(FOO SB-IMPL::BACKQ-COMMA-AT S)
 
-  b. (fixed in 0.8.4.7)
+  c. (reported by Paul F. Dietz)
+     * '`(lambda ,x)
+     `(LAMBDA (SB-IMPL::BACKQ-COMMA X))
 
 143:
   (reported by Jesse Bouwman 2001-10-24 through the unfortunately
index cd5293d..eefacbd 100644 (file)
                                (primitive-type-scs
                                 (tn-primitive-type arg-tn)))
                       (let ((leaf (tn-leaf tn)))
-                        ;; Do we not care about preserving this this
-                        ;; TN for debugging?
                         (or (not leaf)
-                            (not (symbol-package (leaf-debug-name leaf)))
-                            (policy (vop-node vop)
-                                    (or (= speed 3) (< debug 2)))))
+                             (and
+                              ;; Do we not care about preserving this this
+                              ;; TN for debugging?
+                              (or
+                               (not (symbol-package (leaf-debug-name leaf)))
+                               (policy (vop-node vop)
+                                       (or (= speed 3) (< debug 2))))
+                              ;; arguments of local functions have hidden write
+                              (not (and (lambda-var-p leaf)
+                                        (memq (functional-kind (lambda-var-home leaf))
+                                                   '(nil :optional)))))))
                       arg-tn)))))))
 
 ;;; Init the sets in BLOCK for copy propagation. To find GEN, we just
                     (when (tn-is-copy-of y)
                       (sset-adjoin y gen)
                       t)))
+        ;; WANTED: explanation of UNLESS above.
        (do ((res (vop-results vop) (tn-ref-across res)))
-           ((null res))
+           ((not res))
          (let ((res-tn (tn-ref-tn res)))
            (do ((read (tn-reads res-tn) (tn-ref-next read)))
                ((null read))
                    (when (tn-is-copy-of y)
                      (sset-delete y gen)
                      (sset-adjoin y kill))))))))))
-
     (setf (block-out block) (copy-sset gen))
     (setf (block-kill block) kill)
     (setf (block-gen block) gen))
index 0b07cfc..45c22e8 100644 (file)
                        -32326608))))
               1 2 3)
              -32326608))
+
+;;; MISC.177, 182: IR2 copy propagation missed a hidden write to a
+;;; local lambda argument
+(assert
+ (equal
+  (funcall
+   (compile nil
+            '(lambda (a b c)
+              (declare (type (integer 804561 7640697) a))
+              (declare (type (integer -1 10441401) b))
+              (declare (type (integer -864634669 55189745) c))
+              (declare (ignorable a b c))
+              (declare (optimize (speed 3)))
+              (declare (optimize (safety 1)))
+              (declare (optimize (debug 1)))
+              (flet ((%f11
+                         (f11-1 f11-2)
+                       (labels ((%f4 () (round 200048 (max 99 c))))
+                         (logand
+                          f11-1
+                          (labels ((%f3 (f3-1) -162967612))
+                            (%f3 (let* ((v8 (%f4)))
+                                   (setq f11-1 (%f4)))))))))
+                (%f11 -120429363 (%f11 62362 b)))))
+   6714367 9645616 -637681868)
+  -264223548))
index 301c1fc..652311a 100644 (file)
@@ -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.5.44"
+"0.8.5.45"