1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +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:
Andy Wingo 2014-01-10 14:48:24 +01:00
parent e4fa7d403a
commit f409295892

View file

@ -439,7 +439,12 @@ are comparable with eqv?. A tmp slot may be used."
;; terminator, but leave its definitions.
(match (find-expression body)
((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)))
(bit-set*! dead (live-before n) #t)
(bit-set*! dead (live-after n) #f)