This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Better support for tailcalls


On Thu, Feb 03, 2000 at 10:04:16PM +0000, Markus Pizka wrote:
> Hello,
> 
> to support the implementation of new front ends for gcc (especially
> functional languages) I am highly
> interested in integrating a fully general tailcall feature into gcc.

Cool. Considering my grant proposal for adding a Scheme frontend to
GCC, this could come in very useful. 

> I wonder, has anyone succeeded, yet or is there a partial implementation
> that could be used as a starting point?
fgrep -ir recursive gcc-cvs | fgrep -i tail | wc
10  97  766

Look in flow.c and stmt.c.

> As a first step, I think it would be sufficient if the gcc back end
> would not automatically detect
> tailcalls but only provide a mechanism to transform a tail call
> specified by the front end
> (e.g. with a TREE_TAILCALL flag added to CALL_EXPR trees) into
> a jump 'with argument passing'.

Why? Personally, I was planning on doing it (if I had to) in tree,
as that should have all the information necessary. I don't see
what you'd gain by having each frontend try to interpret it.

-- 
David Starner - dstarner98@aasaa.ofe.org
Only a nerd would worry about wrong parentheses with
square brackets. But that's what mathematicians are.
   -- Dr. Burchard, math professor at OSU

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]