On Fri, Jul 1, 2011 at 11:10 AM, Paulo J. Matos <pocma...@gmail.com> wrote: > > > On 01/07/11 09:38, Paulo J. Matos wrote: > >> In GCC4.4 function test presents 2 callees foo() and bar() and the >> sibcall is not done. In GCC4.5 the sibcall is done (but shouldn't) >> because callees in cgraph is 0x0. I wonder if this information is not >> available anymore at this point and if there's something I can do about >> it. >> > > After some digging around I noticed GCC4.5 introduces: > NEXT_PASS (pass_remove_cgraph_callee_edges); > > I am wondering why this is being done. Are we just freeing resources or is > there any other reason? Is there any other way to find callees without this > information?
It is being done because the edges are not kept up-to-date. There is no other way to find callees but to walk all statements. I also do not see a good reason why you would want to use the number of callees of a function to decide whether to emit sibcalls from it. Richard. > Cheers, > > -- > PMatos > >