Removed dead code, consolidated comments

This commit is contained in:
Justin Ethier 2016-05-19 23:33:39 -04:00
parent 41ec8c5750
commit 308bba3c9b
2 changed files with 13 additions and 20 deletions

View file

@ -222,30 +222,10 @@
(trace:info "---------------- after CPS:")
(trace:info input-program) ;pretty-print
;;
;; TODO: run CPS optimization (not all of these phases may apply)
;; phase 1 - constant folding, function-argument expansion, beta-contraction of functions called once,
;; and other "contractions". some of this is already done in previous phases. we will leave
;; that alone for now
; (set! input-program (cps-opt:contractions input-program))
;; phase 2 - beta expansion
;; phase 3 - eta reduction
;; phase 4 - hoisting
;; phase 5 - common subexpression elimination
;; TODO: re-run phases again until program is stable (less than n opts made, more than r rounds performed, etc)
;; END CPS optimization
(set! input-program
(optimize-cps input-program))
(trace:info "---------------- after cps optimizations:")
(trace:info input-program)
; (set! input-program
; (map
; cps-optimize-01
; input-program))
; (trace:info "---------------- after cps optimizations:")
; (trace:info input-program) ;pretty-print
(set! input-program
(map

View file

@ -270,6 +270,19 @@
(analyze2 exp) ;; Second pass
)
;; NOTES:
;;
;; TODO: run CPS optimization (not all of these phases may apply)
;; phase 1 - constant folding, function-argument expansion, beta-contraction of functions called once,
;; and other "contractions". some of this is already done in previous phases. we will leave
;; that alone for now
;; phase 2 - beta expansion
;; phase 3 - eta reduction
;; phase 4 - hoisting
;; phase 5 - common subexpression elimination
;; TODO: re-run phases again until program is stable (less than n opts made, more than r rounds performed, etc)
;; END notes
(define (optimize-cps ast)
(analyze-cps ast)
(trace:info "---------------- cps analysis db:")