From caf6f85c7cab14ba958ded20f127225a2f4e239b Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Mon, 27 Apr 2015 18:03:09 -0400 Subject: [PATCH] Added stub for CPS optimizations --- cyclone.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cyclone.scm b/cyclone.scm index 3073bd3b..8c7e447c 100644 --- a/cyclone.scm +++ b/cyclone.scm @@ -80,6 +80,18 @@ input-program))) (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" + ;; 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 (map