From 61c7264fccd44cf1cd3c7401b6c23dc7c26fa9d8 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sat, 5 Oct 2013 15:57:54 +0200 Subject: [PATCH] Fix slot allocation bug * module/language/cps/slot-allocation.scm (allocate-slots): Fix dead-after-use computation to use the expression's label and not its continuation. --- module/language/cps/slot-allocation.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/language/cps/slot-allocation.scm b/module/language/cps/slot-allocation.scm index a7b9f746c..b446d9e52 100644 --- a/module/language/cps/slot-allocation.scm +++ b/module/language/cps/slot-allocation.scm @@ -340,8 +340,9 @@ are comparable with eqv?. A tmp slot may be used." (define (visit-exp exp label k live-set) (define (use sym live-set) - (if (and (lookup-slot sym allocation) (dead-after-use? sym k dfg)) - (dead sym k live-set) + (if (and (and=> (lookup-slot sym allocation) (cut > <> nargs)) + (dead-after-use? sym label dfg)) + (dead sym label live-set) live-set)) (match exp