Cleanup interface to opt:memoize-pure-fncs

This commit is contained in:
Justin Ethier 2019-02-10 18:58:18 -05:00
parent a988582228
commit e060247d8a

View file

@ -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
)
)