basic question about cps

n.oje.bar@gmail.com
Mon, 12 Nov 2012 11:05:49 -0800 (PST)

          From comp.compilers

Related articles
basic question about cps n.oje.bar@gmail.com (2012-11-12)
Re: basic question about cps torbenm@diku.dk (2012-11-14)
Re: basic question about cps monnier@iro.umontreal.ca (Stefan Monnier) (2012-11-14)
Re: basic question about cps n.oje.bar@gmail.com (2012-11-21)
| List of all articles for this month |
From: n.oje.bar@gmail.com
Newsgroups: comp.compilers
Date: Mon, 12 Nov 2012 11:05:49 -0800 (PST)
Organization: Compilers Central
Injection-Date: Mon, 12 Nov 2012 19:05:49 +0000
Keywords: analysis, question
Posted-Date: 12 Nov 2012 16:29:52 EST

Hi, I have a basic question about writing a compiler using continuation-passing style
as an intermediate language.


It seems to me that if one performs the cps transformation one is left
with many 'computed' calls (that is call to variables holding
procedure values, namely, the continuation). It seems that compiling
such 'computed' calls would be much slower than compiling 'direct'
calls to known procedures.


Question:


1. Is this assumption valid?
2. If it is, then it seems that cps is not very useful without some
non-trivial control flow analysis...??


Please excuse me if this question is very basic.


Thanks!
Nicolas
[Yes, it assumes a reasonbly good optimizer. -John]



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.