From: Christophe Rhodes Date: Fri, 24 Apr 2009 15:08:28 +0000 (+0000) Subject: 1.0.27.42: explicit determinism in the compiler X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=7f6e75c553b4465ced41c3640292834d803761eb;p=sbcl.git 1.0.27.42: explicit determinism in the compiler 2 messages follow: stable-sort the time specifications Dunno if this is actually necessary for anything. make unpacking and repacking happen in a determined order The unpacked blocks were stuffed into a hash table and then maphashed over; as in other cases, this is host-dependent. Use a list and pushnew instead. --- diff --git a/src/compiler/meta-vmdef.lisp b/src/compiler/meta-vmdef.lisp index 8e8d108..b7318fe 100644 --- a/src/compiler/meta-vmdef.lisp +++ b/src/compiler/meta-vmdef.lisp @@ -671,16 +671,16 @@ (incf index) (refs (cons (cons born t) index)))) (incf index))) - (let* ((sorted (sort (refs) - (lambda (x y) - (let ((x-time (car x)) - (y-time (car y))) - (if (time-spec-order x-time y-time) - (if (time-spec-order y-time x-time) - (and (not (cdr x)) (cdr y)) - nil) - t))) - :key #'car)) + (let* ((sorted (stable-sort (refs) + (lambda (x y) + (let ((x-time (car x)) + (y-time (car y))) + (if (time-spec-order x-time y-time) + (if (time-spec-order y-time x-time) + (and (not (cdr x)) (cdr y)) + nil) + t))) + :key #'car)) ;; :REF-ORDERING element type ;; ;; KLUDGE: was (MOD #.MAX-VOP-TN-REFS), which is still right diff --git a/src/compiler/pack.lisp b/src/compiler/pack.lisp index 1673e94..3399032 100644 --- a/src/compiler/pack.lisp +++ b/src/compiler/pack.lisp @@ -813,7 +813,7 @@ ;;; sticking them in this hash-table. This is initially null. We ;;; create the hashtable if we do any unpacking. (defvar *repack-blocks*) -(declaim (type (or hash-table null) *repack-blocks*)) +(declaim (type list *repack-blocks*)) ;;; Set the LIVE-TNS vectors in all :FINITE SBs to represent the TNs ;;; live at the end of BLOCK. @@ -1036,7 +1036,7 @@ (let ((vop (tn-ref-vop ref))) (if (eq (vop-info-name (vop-info vop)) 'move-operand) (delete-vop vop) - (setf (gethash (vop-block vop) *repack-blocks*) t)))))) + (pushnew (vop-block vop) *repack-blocks*)))))) (zot (tn-reads tn)) (zot (tn-writes tn)))) @@ -1063,9 +1063,7 @@ (node (vop-node (tn-ref-vop op))) (fallback nil)) (flet ((unpack-em (victims) - (unless *repack-blocks* - (setq *repack-blocks* (make-hash-table :test 'eq))) - (setf (gethash (vop-block (tn-ref-vop op)) *repack-blocks*) t) + (pushnew (vop-block (tn-ref-vop op)) *repack-blocks*) (dolist (victim victims) (event unpack-tn node) (unpack-tn victim)) @@ -1591,11 +1589,9 @@ (unless *repack-blocks* (return)) (let ((orpb *repack-blocks*)) (setq *repack-blocks* nil) - (maphash (lambda (block v) - (declare (ignore v)) - (event repack-block) - (pack-load-tns block)) - orpb)))) + (dolist (block orpb) + (event repack-block) + (pack-load-tns block))))) (values)) (clean-up-pack-structures))) diff --git a/version.lisp-expr b/version.lisp-expr index a9d632f..a710b05 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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".) -"1.0.27.41" +"1.0.27.42"