Andy Wingo <wi...@pobox.com> writes: > * We should still compile Scheme to tree-il I think; it's convenient, > and other languages may well prefer a more direct-style IL as a > target.
I like CPS for later passes of the compiler, but it should not come first. The problem is that CPS fixes the order in which everything is evaluated, such as the order in which procedure arguments are evaluated, the order in which 'let' or 'letrec' initializers are evaluated, etc. The fact that these orders are unspecified in the direct-style gives the compiler freedom to choose an order that generates the best code, and apparently this freedom can often result in significant gains. Such ordering decisions must be made before the conversion to CPS. Mark