From 459e9a97b0377e105e7fa58c966b8ccfaaad7019 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 17 Jan 2019 22:36:57 -0500 Subject: [PATCH] Hack to re-enable beta expand --- scheme/cyclone/cps-optimizations.sld | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scheme/cyclone/cps-optimizations.sld b/scheme/cyclone/cps-optimizations.sld index a28333f5..ee3a135c 100644 --- a/scheme/cyclone/cps-optimizations.sld +++ b/scheme/cyclone/cps-optimizations.sld @@ -1704,10 +1704,14 @@ (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:inline-prims - (opt:contract ast) - -1) + (let ((new-ast (opt:inline-prims + (opt:contract ast) -1))) + ;; Just a hack for now, need to fix beta expand in compiler benchmark + (if (< (length (filter define? new-ast)) 1000) + (opt:beta-expand new-ast) ;; TODO: temporarily disabled, causes problems with massive expansions + ;; in compiler benchmark, need to revist how to throttle/limit this + ;; (program size? heuristics? what else??) + new-ast) ) )