Hacker News new | comments | show | ask | jobs | submit login

1) Using one of the more efficient CPS transformations will help remove many stupid constructs that are harder to statically find later.

2) In our CPS-based intermediate representation, we rely heavily on control flow analysis (CFA) to enable many classic compiler optimizations (inlining, untupling, unreachable code elimination, cases where only one member of a datatype is constructed/destructed, etc.).

CPS is a great transformation and makes for a wonderful IR, but you have to pay a decent static analysis cost before you will be able to perform many classic optimizations and get great performance. That said, we've done pretty well (http://manticore.cs.uchicago.edu ), but it's taken years of development. I'd also like to second cjfrisz's pointer to Appel's green book. It's a fabulous introduction to compiling in a CPS-style IR, though you'll find you still have a fairly large performance gap if you don't implement the CFA-based versions of them.

Re the manticore home page, a minor nit: the antonym of fine-grained is coarse-grained, not course-grained.

Thanks! That text has been there for at least 6 years and we've never noticed.

It's also in the wiki, I believe.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact