This is the mail archive of the
mailing list for the GCC project.
Re: forcing tail/sibling call optimization
- To: gcc at gcc dot gnu dot org, Jeffrey A Law <law at redhat dot com>
- Subject: Re: forcing tail/sibling call optimization
- From: Mark Probst <schani at mips dot complang dot tuwien dot ac dot at>
- Date: Mon, 27 Nov 2000 19:22:14 +0100
- References: <20001127164400.0929334D80@nile.gnat.com> <490.975347114@upchuck>
On Mon, Nov 27, 2000 at 10:45:14AM -0700, Jeffrey A Law wrote:
> I don't care if slows down or speeds up execution -- dependence on this kind
> of transformation in languages such as C is terribly bad. C code which
> relies on this transformation is broken.
as has been pointed out, this kind of transformation cannot be
implemented as a simple optimization since it requires a different
calling convention. hence, it can only be implemented as a gnu
extension to the c language. as such, it is as legitimate as nested
functions or label pointers, imho.
> About the only thing worse would be to sit down, examine the compiler's output
> to see when it makes the transformation, then twiddle the code to make it
> compiler friendly, then complain when the next rev of the compiler doesn't
> behave in the same manner :-)
no. the semantics of this transformation have to be clearly specified.
Student, Programmer, Juggler