This is the mail archive of the
mailing list for the GCC project.
Re: forcing tail/sibling call optimization
- To: dewar at gnat dot com, freitag at alancoxonachip dot com, law at redhat dot com
- Subject: Re: forcing tail/sibling call optimization
- From: Mike Stump <mrs at windriver dot com>
- Date: Mon, 27 Nov 2000 15:32:54 -0800 (PST)
- Cc: gcc at gcc dot gnu dot org
> To: email@example.com, firstname.lastname@example.org
> Date: Mon, 27 Nov 2000 11:44:00 -0500 (EST)
> From: email@example.com (Robert Dewar)
> I think this misses the point
Further, most people are missing the point, it is _NOT_ an
optimization. Just as a call produces code to call a routine, a
recursive tail call is a direction to produce a goto.
When you think of it this way, you realize, you don't need a warning
when it doesn't apply, because it _must_ apply. If the abi needs to
be different, then it needs to be different. If you have to have an
attribute, well, that is the price to pay. If you have to have it
prototyped in all places, than that is the price to pay. If varargs
doesn't work with it, well, than that is a documented limitation.
We need to see if what we can come up with is suitable for what people
need from C as an assembler. I suspect they will just say fine, no
problem, tweak the generation slightly, and presto.