mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
convert-call-if-possible: inline maybe-inline functions from different components.
This commit is contained in:
parent
137b4f664b
commit
81257e29e4
|
|
@ -510,7 +510,13 @@
|
|||
original-fun))
|
||||
(*compiler-error-context* call))
|
||||
|
||||
(when (and (eq (functional-inlinep fun) 'inline)
|
||||
(when (and (or (eq (functional-inlinep fun) 'inline)
|
||||
(and (and (neq (component-kind component) :initial)
|
||||
(neq (node-component (lambda-bind (main-entry fun))) component))
|
||||
;; If it's in a different component then inline it anyway,
|
||||
;; othrewise it won't get any benefits of maybe-inline.
|
||||
(eq (functional-inlinep fun) 'maybe-inline)))
|
||||
|
||||
(rest (leaf-refs original-fun))
|
||||
;; Some REFs are already unused bot not yet deleted,
|
||||
;; avoid unnecessary inlining
|
||||
|
|
|
|||
|
|
@ -198,3 +198,15 @@
|
|||
(funcall x 10)))
|
||||
(defun component-xep-references.2 ()
|
||||
(component-xep-references-i 1)))
|
||||
|
||||
(declaim (maybe-inline component-xep-references-mi))
|
||||
(defun component-xep-references-mi (x)
|
||||
x)
|
||||
(let ((x 0))
|
||||
(declare (optimize speed (space 0)))
|
||||
(defun component-xep-references.3 ()
|
||||
(incf x)
|
||||
(let ((x #'component-xep-references-mi))
|
||||
(funcall x 10)))
|
||||
(defun component-xep-references.4 ()
|
||||
(component-xep-references-mi 1)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue