Skip to content
Snippets Groups Projects
Commit ab23de6d authored by ram's avatar ram
Browse files

Don't substitute out LET variables when the initial value is a reference to a

:NOTINLINE functional.  The inlinep information must be retained, since we
count on :NOTLININE calls never being local call converted.
parent 0c68bee9
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir1opt.lisp,v 1.43 1992/04/02 15:25:38 ram Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir1opt.lisp,v 1.44 1992/04/14 18:09:01 ram Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -1104,14 +1104,18 @@ ...@@ -1104,14 +1104,18 @@
;;; CONSTANT-REFERENCE-P -- Interface ;;; CONSTANT-REFERENCE-P -- Interface
;;; ;;;
;;; Return true if the value of Ref will always be the same (and is thus ;;; Return true if the value of Ref will always be the same (and is thus
;;; legal to substitute.) ;;; legal to substitute.) Even though the value of a FUNCTIONAL really can't
;;; change, we consider it non-constant when it is marker :NOTINLINE, since
;;; this is used as a flag to inhibit local call conversion, and must not be
;;; lost.
;;; ;;;
(defun constant-reference-p (ref) (defun constant-reference-p (ref)
(declare (type ref ref)) (declare (type ref ref))
(let ((leaf (ref-leaf ref))) (let ((leaf (ref-leaf ref)))
(typecase leaf (typecase leaf
(constant t) (constant t)
(functional t) (functional
(not (eq (ref-inlinep ref) :notinline)))
(lambda-var (lambda-var
(null (lambda-var-sets leaf))) (null (lambda-var-sets leaf)))
(global-var (global-var
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment