From dd77a818ba6aefc98a78d03dec61454546992671 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Wed, 28 Oct 2015 13:33:37 +0000 Subject: [PATCH] Treat tail $values as generating lazy allocations * module/language/cps/slot-allocation.scm (compute-lazy-vars): Returning values in tail position also generates lazy vars. --- module/language/cps/slot-allocation.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/language/cps/slot-allocation.scm b/module/language/cps/slot-allocation.scm index b3068985c..1e349eea2 100644 --- a/module/language/cps/slot-allocation.scm +++ b/module/language/cps/slot-allocation.scm @@ -376,6 +376,10 @@ is an active call." (($ $kargs _ _ ($ $continue _ _ ($ $callk _ proc args))) (intset-subtract (intset-add (list->intset args) proc) (intmap-ref live-out label))) + (($ $kargs _ _ ($ $continue k _($ $values args))) + (match (intmap-ref cps k) + (($ $ktail) (list->intset args)) + (_ #f))) (_ #f))) cps)) (kills (intmap-map