From: William Harold Newman Date: Mon, 3 Dec 2001 14:27:58 +0000 (+0000) Subject: 0.pre7.86.flaky7.17: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=299ef6dbeb0d2fb12da586d89ee21971693489fa;p=sbcl.git 0.pre7.86.flaky7.17: (still works as well as before, still fails in pathnames.impure.lisp the same way as before, since all the changes are still only preparation for a real fix) removed various INLINEs in ir1util.lisp, to ease debugging and because I hope sometime next year to be doing some profiling on the compiler (so that if they really need to be inlined, I should soon find out) making FIND-INITIAL-DFO recognize closure dependencies... ...rearranged DFO-SCAVENGE-DEPENDENCY-GRAPH in preparation for walking through LAMBDA-REFERS-TO-VARS as well as LAMBDA-CALLS --- diff --git a/src/compiler/dfo.lisp b/src/compiler/dfo.lisp index f747b65..8ce81ad 100644 --- a/src/compiler/dfo.lisp +++ b/src/compiler/dfo.lisp @@ -193,6 +193,18 @@ ;;; that we find to be related. Return whatever COMPONENT we actually ;;; merged into. ;;; +;;; (Note: The analogous CMU CL code only scavenged call-based +;;; dependencies, not closure dependencies. That seems to've been by +;;; oversight, not by design, as per the bug reported by WHN on +;;; cmucl-imp ca. 2001-11-29 and explained by DTC shortly after.) +;;; +;;; FIXME: Very likely we should be scavenging NLX-based dependencies +;;; here too. OTOH, there's a lot of global weirdness in NLX handling, +;;; so it might be taken care of some other way that I haven't figured +;;; out yet. Perhaps the best way to address this would be to try to +;;; construct a NLX-based test case which fails in the same way as the +;;; closure-based test case on cmucl-imp 2001-11-29.) +;;; ;;; If the function is in an initial component, then we move its head ;;; and tail to COMPONENT and add it to COMPONENT's lambdas. It is ;;; harmless to move the tail (even though the return might be @@ -240,18 +252,21 @@ (let ((return-block (node-block return))) (link-blocks return-block (component-tail component)) (unlink-blocks return-block (component-tail old-lambda-component)))) - (let ((calls (if (eq (functional-kind fun) :external) - (append (find-reference-funs fun) - (lambda-calls fun)) - (lambda-calls fun)))) - (do ((res (find-initial-dfo-aux bind-block component) - (dfo-scavenge-dependency-graph (first remaining-calls) res)) - (remaining-calls calls (rest remaining-calls))) - ((null remaining-calls) - res) - (declare (type component res)))))))) - -;;; Return true if FUN is either an XEP or has EXITS to some of its + (let ((res (find-initial-dfo-aux bind-block component))) + (declare (type component res)) + ;; Scavenge call relationships. + (let ((calls (if (eq (functional-kind fun) :external) + (append (find-reference-funs fun) + (lambda-calls fun)) + (lambda-calls fun)))) + (dolist (call calls) + (setf res (dfo-scavenge-dependency-graph call res)))) + ;; TO DO: Scavenge closure-over relationships. + (values) + ;; Voila. + res))))) + +;;; Return true if FUN either is an XEP or has EXITS to some of its ;;; ENTRIES. (defun has-xep-or-nlx (fun) (declare (type clambda fun)) diff --git a/src/compiler/ir1util.lisp b/src/compiler/ir1util.lisp index 2d2d687..aa4668e 100644 --- a/src/compiler/ir1util.lisp +++ b/src/compiler/ir1util.lisp @@ -235,7 +235,6 @@ ;;; the LEXENV-LAMBDA may be deleted, we must chain up the ;;; LAMBDA-CALL-LEXENV thread until we find a CLAMBDA that isn't ;;; deleted, and then return its home. -(declaim (maybe-inline node-home-lambda)) (defun node-home-lambda (node) (declare (type node node)) (do ((fun (lexenv-lambda (node-lexenv node)) @@ -245,22 +244,17 @@ (when (eq (lambda-home fun) fun) (return fun)))) -#!-sb-fluid (declaim (inline node-block node-tlf-number)) -(declaim (maybe-inline node-physenv)) (defun node-block (node) (declare (type node node)) (the cblock (continuation-block (node-prev node)))) (defun node-physenv (node) (declare (type node node)) - #!-sb-fluid (declare (inline node-home-lambda)) (the physenv (lambda-physenv (node-home-lambda node)))) -#!-sb-fluid (declaim (maybe-inline lambda-block)) (defun lambda-block (clambda) (declare (type clambda clambda)) (node-block (lambda-bind clambda))) (defun lambda-component (clambda) - (declare (inline lambda-block)) (block-component (lambda-block clambda))) ;;; Return the enclosing cleanup for environment of the first or last @@ -275,7 +269,6 @@ ;;; Return the non-LET LAMBDA that holds BLOCK's code. (defun block-home-lambda (block) (declare (type cblock block)) - #!-sb-fluid (declare (inline node-home-lambda)) (if (node-p (block-last block)) ;; This is the old CMU CL way of doing it. (node-home-lambda (block-last block)) @@ -296,7 +289,6 @@ ;;; Return the IR1 physical environment for BLOCK. (defun block-physenv (block) (declare (type cblock block)) - #!-sb-fluid (declare (inline node-home-lambda)) (lambda-physenv (block-home-lambda block))) ;;; Return the Top Level Form number of PATH, i.e. the ordinal number @@ -384,7 +376,6 @@ ;;;; flow/DFO/component hackery ;;; Join BLOCK1 and BLOCK2. -#!-sb-fluid (declaim (inline link-blocks)) (defun link-blocks (block1 block2) (declare (type cblock block1 block2)) (setf (block-succ block1) @@ -1278,8 +1269,7 @@ (elt (combination-args (let-combination fun)) (position-or-lose var (lambda-vars fun))))) -;;; Return the LAMBDA that is called by the local Call. -#!-sb-fluid (declaim (inline combination-lambda)) +;;; Return the LAMBDA that is called by the local CALL. (defun combination-lambda (call) (declare (type basic-combination call)) (aver (eq (basic-combination-kind call) :local)) diff --git a/version.lisp-expr b/version.lisp-expr index 099af03..0ae0889 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; for internal versions, especially for internal versions off the ;;; main CVS branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.pre7.86.flaky7.16" +"0.pre7.86.flaky7.17"