Better support for tailcalls
David Starner
dvdeug@x8b4e53cd.dhcp.okstate.edu
Sun Feb 6 11:00:00 GMT 2000
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
More information about the Gcc
mailing list