From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: Andi Kleen Cc: gcc@gcc.gnu.org Subject: Re: forcing tail/sibling call optimization Date: Mon, 27 Nov 2000 09:48:00 -0000 Message-id: <518.975347343@upchuck> References: <20001127174448.A2375@fred.local> X-SW-Source: 2000-11/msg01188.html In message < 20001127174448.A2375@fred.local >you write: > On Mon, Nov 27, 2000 at 05:25:45PM +0100, Jeffrey A Law wrote: > > > > In message < oupn1el760c.fsf@pigdrop.muc.suse.de >you write: > > > Problem I see with that is diagnostics again: e.g. someone depends on > a > > > particular call being a tail call and not allocating new storage. > > Therein lies the first problem -- programmer dependence on specific > > optimizations in the compiler. That's a fundamental mistake. > > Well, I think Fergus' whole point of the extension was to use gcc > as a backend for language compilers that have this requirement. But I would claim that C is a terrible choice for the target language of this translator because of this kind of issue. I would think it would be better to actually write a true front-end for the source language. > That would require putting the whole program into a single function, which > given the current gcc optimizer's runtimes is surely to end with a very > slow compile process for anything >-O0. True. But that's the price you pay when targetting a language (ie C) that doesn't have the feature set (tail call opts) necessary to correctly implement the source language. jeff