This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [Patch ARM] Turn on sibling calls for Thumb2.
- From: "Ramana Radhakrishnan" <ramana dot radhakrishnan at arm dot com>
- To: "'Daniel Jacobowitz'" <drow at false dot org>
- Cc: <gcc-patches at gcc dot gnu dot org>, "Richard Earnshaw" <Richard dot Earnshaw at arm dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, <mark at codesourcery dot com>
- Date: Wed, 20 May 2009 16:37:28 +0100
- Subject: RE: [Patch ARM] Turn on sibling calls for Thumb2.
- References: <001401c9d928$fd14ae40$f73e0ac0$@radhakrishnan@arm.com> <20090520143741.GA7619@caradoc.them.org>
>
> FYI, Mark Mitchell tested an internal patch to do this last year, and
> discovered it broke early returns from functions that end in a tail
> call. It was something to do with USE_RETURN_INSN, but we didn't
> get to the bottom of it at the time.
>
> I think something as simple as this will show the problem:
>
> int bar();
> int foo (int arg)
> {
> if (arg < 1)
> return 0;
> return bar ();
> }
Thanks for the info. That is useful and I can see that this case is broken
today even after my patch, though my tests seem to be chugging along right
now. I will hold back on my patch till the time that this is fixed.
cheers
Ramana