mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 05:50:26 +02:00
More robust compute-hints
* module/language/cps/slot-allocation.scm (allocate-slots): Allow the compute-hints pass to traverse through $values with 0 or 1 value.
This commit is contained in:
parent
e4fa7d403a
commit
f409295892
1 changed files with 6 additions and 1 deletions
|
@ -439,7 +439,12 @@ are comparable with eqv?. A tmp slot may be used."
|
||||||
;; terminator, but leave its definitions.
|
;; terminator, but leave its definitions.
|
||||||
(match (find-expression body)
|
(match (find-expression body)
|
||||||
((or ($ $void) ($ $const) ($ $prim) ($ $fun)
|
((or ($ $void) ($ $const) ($ $prim) ($ $fun)
|
||||||
($ $primcall) ($ $prompt))
|
($ $primcall) ($ $prompt)
|
||||||
|
;; If $values has more than one argument, it may
|
||||||
|
;; use a temporary, which would invalidate our
|
||||||
|
;; assumptions that slots not allocated are not
|
||||||
|
;; used.
|
||||||
|
($ $values (or () (_))))
|
||||||
(let ((dead (make-bitvector (bitvector-length args) #f)))
|
(let ((dead (make-bitvector (bitvector-length args) #f)))
|
||||||
(bit-set*! dead (live-before n) #t)
|
(bit-set*! dead (live-before n) #t)
|
||||||
(bit-set*! dead (live-after n) #f)
|
(bit-set*! dead (live-after n) #f)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue