Re: Is there any generator generator, not parser generator?

David Chase <chase@world.std.com>
21 Oct 1998 01:32:16 -0400

          From comp.compilers

Related articles
Is there any generator generator, not parser generator? baehj@oz.co.kr (Bae, Hyun-jik) (1998-10-13)
Re: Is there any generator generator, not parser generator? chase@world.std.com (David Chase) (1998-10-17)
Re: Is there any generator generator, not parser generator? dwight@pentasoft.com (1998-10-17)
Is there any generator generator, not parser generator? KPRASAD@us.oracle.com (KPRASAD.US.ORACLE.COM) (1998-10-17)
Re: Is there any generator generator, not parser generator? assmann@ipd.info.uni-karlsruhe.de (Uwe Assmann) (1998-10-17)
Re: Is there any generator generator, not parser generator? anton@mips.complang.tuwien.ac.at (1998-10-18)
Re: Is there any generator generator, not parser generator? chase@world.std.com (David Chase) (1998-10-21)
| List of all articles for this month |

From: David Chase <chase@world.std.com>
Newsgroups: comp.compilers
Date: 21 Oct 1998 01:32:16 -0400
Organization: NaturalBridge LLC
References: 98-10-085 98-10-115
Keywords: code, tools

Anton Ertl wrote:
>
> David Chase <chase@world.std.com> writes:
> > There are other ways to approach this; on a
> > machine with many registers (i.e., not x86) you could pessimistically
> > pre-allocate registers; during pattern- matching you'd discover that
> > you weren't using those registers after all, but you might do well
> > enough anyway. You could perform some amount of "semantic"
> > scheduling/pipelining, in which you simply assumed that each abstract
> > operation had a latency associated with it, and work from that;


> Why do these phases in the wrong order when you can do them in the
> right order? Just do instruction selection before instruction
> schedling and register allocation, and the problems mentioned above go
> away.


True, except that then your register allocation becomes more machine-
specific, spilling becomes more of a pain, and procedure prologues and
epilogues become a bit of a pain if you hope to do leaf, shrink- wrap,
or tail-call optimization (these depend on the machine quite a bit
anyway). The extra pain is the "right way" to do it if you have
plenty of time to do it that way, but I got the impression that the
original poster was looking for a less-pain solution.
Register-allocating early on a RISC machine is not going to hurt you
that badly if you aren't writing a scheduler anyway. (At least, that
is my gut evaluation of the problem, and there will always be odd
programs for which that statement is spectacularly wrong.)


David Chase
NaturalBridge LLC


Post a followup to this message

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