From b0000c42e7adb24f48aca887a614abb079d3c1ad Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 17 Jan 2019 16:58:45 -0500 Subject: [PATCH] Test re-enabling beta expansion --- scheme/cyclone/cps-optimizations.sld | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scheme/cyclone/cps-optimizations.sld b/scheme/cyclone/cps-optimizations.sld index 4985f029..a28333f5 100644 --- a/scheme/cyclone/cps-optimizations.sld +++ b/scheme/cyclone/cps-optimizations.sld @@ -1207,6 +1207,7 @@ (define (inline-prim-call? exp scope-sym ivars args) (let ((fast-inline #t) (cannot-inline #f)) + ;; TODO: causes problems doing this here??? ;(for-each ; (lambda (v) ; (with-var v (lambda (var) @@ -1489,8 +1490,8 @@ (= 1 (adbv:app-fnc-count var))) (not (adbv:reassigned? var)) (not (adbv:self-rec-call? var)) - ;(not (fnc-depth>? (ast:lambda-body fnc) 4)))) - (not (fnc-depth>? (ast:lambda-body fnc) 5)) + (not (fnc-depth>? (ast:lambda-body fnc) 4)) + ;(not (fnc-depth>? (ast:lambda-body fnc) 5)) ;; Issue here is we can run into code that calls the ;; same continuation from both if branches. In this ;; case we do not want to beta-expand as a contraction @@ -1703,11 +1704,11 @@ (analyze-cps ast) (trace:info "---------------- cps analysis db:") (trace:info (adb:get-db)) - ;(opt:beta-expand ;; TODO: temporarily disabled, causes problems with massive expansions in compiler benchmark, need to revist how to throttle/limit this (program size? heuristics? what else??) + (opt:beta-expand ;; TODO: temporarily disabled, causes problems with massive expansions in compiler benchmark, need to revist how to throttle/limit this (program size? heuristics? what else??) (opt:inline-prims (opt:contract ast) -1) - ;) + ) ) ;; Renumber lambdas and re-run analysis