From e060247d8aa9501b8cd5a93cb5a3b69139cb3e6f Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Sun, 10 Feb 2019 18:58:18 -0500 Subject: [PATCH] Cleanup interface to opt:memoize-pure-fncs --- scheme/cyclone/cps-optimizations.sld | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/scheme/cyclone/cps-optimizations.sld b/scheme/cyclone/cps-optimizations.sld index 6a14fe60..1e20c0a7 100644 --- a/scheme/cyclone/cps-optimizations.sld +++ b/scheme/cyclone/cps-optimizations.sld @@ -1708,12 +1708,18 @@ (let ((new-ast (opt:inline-prims (opt:contract ast) -1))) ;; Just a hack for now, need to fix beta expand in compiler benchmark - (opt:memoize-pure-fncs - (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)) + (when (< (length (filter define? new-ast)) 1000) + (set! new-ast + (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??) + ) + + ;; TODO: when memo flag (need to pass in) is enabled + (when #t + (set! new-ast (opt:memoize-pure-fncs new-ast))) + + new-ast ) )