From 81153b7c9824ef389928ff6d04fb5acbcffb3867 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Mon, 18 Feb 2008 19:14:11 +0000 Subject: [PATCH] 1.0.14.35: lift MAKE-SINGLE-VALUE-TYPE calls from loops * Multiple places can use the same type, no need to cons a new one each time through the loop. --- src/compiler/ctype.lisp | 5 +++-- src/compiler/ir1opt.lisp | 13 +++++++------ version.lisp-expr | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/compiler/ctype.lisp b/src/compiler/ctype.lisp index 7927814..1470a49 100644 --- a/src/compiler/ctype.lisp +++ b/src/compiler/ctype.lisp @@ -765,8 +765,9 @@ (type-specifier type)))) (t (setf (leaf-type var) type) - (dolist (ref (leaf-refs var)) - (derive-node-type ref (make-single-value-type type)))))) + (let ((s-type (make-single-value-type type))) + (dolist (ref (leaf-refs var)) + (derive-node-type ref s-type)))))) t)))))) ;;; FIXME: This is quite similar to ASSERT-NEW-DEFINITION. diff --git a/src/compiler/ir1opt.lisp b/src/compiler/ir1opt.lisp index e0c4a72..d574148 100644 --- a/src/compiler/ir1opt.lisp +++ b/src/compiler/ir1opt.lisp @@ -1240,12 +1240,13 @@ (let ((int (type-approx-intersection2 var-type type))) (when (type/= int var-type) (setf (leaf-type leaf) int) - (dolist (ref (leaf-refs leaf)) - (derive-node-type ref (make-single-value-type int)) - ;; KLUDGE: LET var substitution - (let* ((lvar (node-lvar ref))) - (when (and lvar (combination-p (lvar-dest lvar))) - (reoptimize-lvar lvar)))))) + (let ((s-int (make-single-value-type int))) + (dolist (ref (leaf-refs leaf)) + (derive-node-type ref s-int) + ;; KLUDGE: LET var substitution + (let* ((lvar (node-lvar ref))) + (when (and lvar (combination-p (lvar-dest lvar))) + (reoptimize-lvar lvar))))))) (values)))) ;;; Iteration variable: exactly one SETQ of the form: diff --git a/version.lisp-expr b/version.lisp-expr index 61c4a77..7a7f7b3 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.14.34" +"1.0.14.35" -- 1.7.10.4