;;; do LET conversion here.
(defun locall-analyze-fun-1 (fun)
(declare (type functional fun))
- (let ((refs (leaf-refs fun)))
+ (let ((refs (leaf-refs fun))
+ (local-p t))
(dolist (ref refs)
(let* ((lvar (node-lvar ref))
(dest (when lvar (lvar-dest lvar))))
(convert-call-if-possible ref dest)
(unless (eq (basic-combination-kind dest) :local)
- (reference-entry-point ref)))
+ (reference-entry-point ref)
+ (setq local-p nil)))
(t
- (reference-entry-point ref)))))))
+ (reference-entry-point ref)
+ (setq local-p nil))))))
+ (when local-p (note-local-functional fun)))
(values))
(depart-from-tail-set clambda)
(let* ((home (node-home-lambda call))
- (home-physenv (lambda-physenv home)))
+ (home-physenv (lambda-physenv home))
+ (physenv (lambda-physenv clambda)))
(aver (not (eq home clambda)))
(setf (lambda-home clambda) home)
(setf (lambda-physenv clambda) home-physenv)
+ (when physenv
+ (setf (physenv-nlx-info home-physenv)
+ (nconc (physenv-nlx-info physenv)
+ (physenv-nlx-info home-physenv))))
+
;; All of CLAMBDA's LETs belong to HOME now.
(let ((lets (lambda-lets clambda)))
(dolist (let lets)
(when (leaf-has-source-name-p clambda)
;; ANSI requires that explicit NOTINLINE be respected.
(or (eq (lambda-inlinep clambda) :notinline)
- ;; If (= LET-CONVERTION 0) we can guess that inlining
+ ;; If (= LET-CONVERSION 0) we can guess that inlining
;; generally won't be appreciated, but if the user
;; specifically requests inlining, that takes precedence over
;; our general guess.
- (and (policy clambda (= let-convertion 0))
+ (and (policy clambda (= let-conversion 0))
(not (eq (lambda-inlinep clambda) :inline))))))
;;; We also don't convert calls to named functions which appear in the