Test re-enabling beta expansion

This commit is contained in:
Justin Ethier 2019-01-17 16:58:45 -05:00
parent 4b72131ac6
commit b0000c42e7

View file

@ -1207,6 +1207,7 @@
(define (inline-prim-call? exp scope-sym ivars args) (define (inline-prim-call? exp scope-sym ivars args)
(let ((fast-inline #t) (let ((fast-inline #t)
(cannot-inline #f)) (cannot-inline #f))
;; TODO: causes problems doing this here???
;(for-each ;(for-each
; (lambda (v) ; (lambda (v)
; (with-var v (lambda (var) ; (with-var v (lambda (var)
@ -1489,8 +1490,8 @@
(= 1 (adbv:app-fnc-count var))) (= 1 (adbv:app-fnc-count var)))
(not (adbv:reassigned? var)) (not (adbv:reassigned? var))
(not (adbv:self-rec-call? var)) (not (adbv:self-rec-call? var))
;(not (fnc-depth>? (ast:lambda-body fnc) 4)))) (not (fnc-depth>? (ast:lambda-body fnc) 4))
(not (fnc-depth>? (ast:lambda-body fnc) 5)) ;(not (fnc-depth>? (ast:lambda-body fnc) 5))
;; Issue here is we can run into code that calls the ;; Issue here is we can run into code that calls the
;; same continuation from both if branches. In this ;; same continuation from both if branches. In this
;; case we do not want to beta-expand as a contraction ;; case we do not want to beta-expand as a contraction
@ -1703,11 +1704,11 @@
(analyze-cps ast) (analyze-cps ast)
(trace:info "---------------- cps analysis db:") (trace:info "---------------- cps analysis db:")
(trace:info (adb:get-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:inline-prims
(opt:contract ast) (opt:contract ast)
-1) -1)
;) )
) )
;; Renumber lambdas and re-run analysis ;; Renumber lambdas and re-run analysis