[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CPS and RTL

From: Mark H Weaver
Subject: Re: CPS and RTL
Date: Thu, 24 Jan 2013 04:28:05 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Andy Wingo <address@hidden> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]