From f409295892e8eb28e9df2e934badc1fcf4aa5e72 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 10 Jan 2014 14:48:24 +0100 Subject: [PATCH] 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. --- module/language/cps/slot-allocation.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/module/language/cps/slot-allocation.scm b/module/language/cps/slot-allocation.scm index 59a944c83..9469f035e 100644 --- a/module/language/cps/slot-allocation.scm +++ b/module/language/cps/slot-allocation.scm @@ -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)