mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Reoptimize lvar uses after let conversion.
Because the new destination may be consuming just one value. E.g. the VALUES transforms looks at that. Fixes lp#1966624
This commit is contained in:
parent
b5b79ad1c9
commit
b25abf0ee6
|
|
@ -1047,10 +1047,13 @@
|
|||
(return-result (lambda-return (node-home-lambda call)))
|
||||
(node-lvar call)))
|
||||
(call-type (node-derived-type call)))
|
||||
(unless (eq call-type *wild-type*)
|
||||
;; FIXME: Replace the call with unsafe CAST. -- APD, 2003-01-26
|
||||
(do-uses (use result)
|
||||
(derive-node-type use call-type)))
|
||||
;; FIXME: Replace the call with unsafe CAST. -- APD, 2003-01-26
|
||||
(do-uses (use result)
|
||||
;; CRETURN is an unknown value destination, now the
|
||||
;; destination might be consuming just one value.
|
||||
;; Reoptimize to help the VALUES transform, for example.
|
||||
(reoptimize-node use)
|
||||
(derive-node-type use call-type))
|
||||
(substitute-lvar-uses lvar result
|
||||
(and lvar (eq (lvar-uses lvar) call)))))
|
||||
|
||||
|
|
|
|||
|
|
@ -315,6 +315,7 @@
|
|||
(let (*))
|
||||
10))
|
||||
:key (lambda (x) (combination-fun-source-name x nil))))))
|
||||
|
||||
(with-test (:name :flushable-alien-fp-math)
|
||||
(assert (not (find 'sb-c:%alien-funcall
|
||||
(ir-calls
|
||||
|
|
@ -323,3 +324,14 @@
|
|||
(exp x)
|
||||
10))
|
||||
:key (lambda (x) (combination-fun-source-name x nil))))))
|
||||
|
||||
(with-test (:name :values-let-conversion-reoptimization)
|
||||
(assert (not (find 'list
|
||||
(ir-calls
|
||||
`(lambda (a)
|
||||
(values
|
||||
(flet ((f ()
|
||||
(values a (catch 'c)
|
||||
(list 1))))
|
||||
(f)))))
|
||||
:key (lambda (x) (combination-fun-source-name x nil))))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue