This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Sibcall on recursive functions


On Fri, Jan 15, 2010 at 8:56 AM, Paulo De Oliveira Cantante De Matos
<Paulo.Matos@csr.com> wrote:
>
>
>> -----Original Message-----
>> From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org] On
>> Behalf Of Andrew Pinski
>> Sent: 14 January 2010 17:08
>> To: Paulo J. Matos
>> Cc: gcc@gcc.gnu.org
>> Subject: Re: Sibcall on recursive functions
>>
>>
>> Because it is not really sibcalled but rather turned into a loop
>> via
>> tail recursion. ÂThis is almost always profitable and never changes
>> how many times the stack gets restored (unless there is an alloca
>> in
>> the function which is checked for inside the optimization).
>>
>
> Can you please tell me which pass performs this optimization?
>

Found it in pass_tail_recursion, thanks!

-- 
Paulo Jorge Matos - pocmatos at gmail.com
http://www.pmatos.net


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]