mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Cleanup interface to opt:memoize-pure-fncs
This commit is contained in:
parent
a988582228
commit
e060247d8a
1 changed files with 12 additions and 6 deletions
|
@ -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
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue