0.8.16.21:
authorAlexey Dejneka <adejneka@comail.ru>
Mon, 1 Nov 2004 03:44:13 +0000 (03:44 +0000)
committerAlexey Dejneka <adejneka@comail.ru>
Mon, 1 Nov 2004 03:44:13 +0000 (03:44 +0000)
        * Keep the principle "reanalysis implies reoptimization" on
          the last reoptimization pass (fix bug MISC.436, 438).

NEWS
src/compiler/main.lisp
tests/compiler.pure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 1c35f54..8d00b75 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -39,6 +39,7 @@ changes in sbcl-0.8.17 relative to sbcl-0.8.16:
        names.
     ** constraint propagation and lambda variable substitution are
        more cautious in dealing with partially deleted code.
+    ** compiler sometimes lost reoptimization passes.
 
 changes in sbcl-0.8.16 relative to sbcl-0.8.15:
   * enhancement: saving cores with foreign code loaded is now
index 7427c2c..cabe030 100644 (file)
       (ir1-optimize component)
       (cond ((component-reoptimize component)
              (incf count)
-             (when (= count *max-optimize-iterations*)
+             (when (and (= count *max-optimize-iterations*)
+                        (not (component-reanalyze component)))
                (maybe-mumble "*")
                (cond ((retry-delayed-ir1-transforms :optimize)
                      (maybe-mumble "+")
index 9072fbb..3bbe2c5 100644 (file)
          tag2)
         0)))
    3021871717588 -866608 -2 -17194)))
+
+;;; MISC.436, 438: lost reoptimization
+(assert (zerop (funcall
+   (compile
+    nil
+    '(lambda (a b)
+       (declare (type (integer -2917822 2783884) a))
+       (declare (type (integer 0 160159) b))
+       (declare (ignorable a b))
+       (declare
+       (optimize (compilation-speed 1)
+                 (speed 3)
+                 (safety 3)
+                 (space 0)
+                 ; #+sbcl (sb-c:insert-step-conditions 0)
+                 (debug 0)))
+       (if
+          (oddp
+           (loop for
+                 lv1
+                 below
+                 2
+                 count
+                 (logbitp 0
+                          (1-
+                           (ash b
+                                (min 8
+                                     (count 0
+                                            '(-10197561 486 430631291
+                                                        9674068))))))))
+          b
+        0)))
+   1265797 110757)))
+
+(assert (zerop (funcall
+   (compile
+    nil
+    ' (lambda (a)
+       (declare (type (integer 0 1696) a))
+       ; (declare (ignorable a))
+       (declare (optimize (space 2) (debug 0) (safety 1)
+                  (compilation-speed 0) (speed 1)))
+       (if (logbitp 0 (ash (1- a) (min 11 a))) 0 0)))
+   805)))
index 0a35692..36d6358 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.16.20"
+"0.8.16.21"