This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Recursion Optimization
- To: Zack Weinberg <zack at bitmover dot com>
- Subject: Re: Recursion Optimization
- From: Kevin Atkinson <kevinatk at home dot com>
- Date: Mon, 16 Aug 1999 14:50:43 -0400
- CC: Andreas Schwab <schwab at suse dot de>, gcc at gcc dot gnu dot org
- References: <199908161800.LAA25487@zack.bitmover.com>
Zack Weinberg wrote:
>
> ... To answer the original question: No, GCC is not capable of any of these
> optimizations. I'm sure we would be delighted to accept contributions
> that gave it the ability to do them. Even adding support for general
> tail recursion optimization a la Scheme would be a great step
> forward.
>
> There is existing support for tail recursion optimization in very
> limited cases. I have never got it to do anything useful for non-toy
> functions.
Has anyone tried writing a front end for a functional language like ML
or even Haskell for gcc. Since recursion is the heart and soul of
functional languages I am sure that these sort of optimizations will
also come with it. I am not sure what type of issues are involved
though as a good functional compiler has to do a lot more than mere
recursion optimization--especially for languages like Haskell which are
not only functional but also lazy.
--
Kevin Atkinson
kevinatk@home.com
http://metalab.unc.edu/kevina/