On Thu, Jan 7, 2010 at 11:46 AM, Paulo J. Matos <pocma...@gmail.com> wrote: > Hi all, > > With the code: > ----------------------------- > extern void display(unsigned int); > > void callee(int z) // Sibcall worth it > { > display(z); > } > > void caller(int x, int y) // Sibcall not worth it > { > display(x); > display(y); > callee(x*y); > } > ----------------------------- > > I have put a few prints in TARGET_FUNCTION_OK_FOR_SIBCALL (when > compiled with -Os): > current pass = expand (135) > Function ok: callee > Callee display > framesize 0 > totalsize 2 > current_function_pretend_args_size 0 > > current pass = expand (135) > Function ok: caller > Callee display > framesize 0 > totalsize 0 > current_function_pretend_args_size 0 >
This case is interesting because it seems that callee is being inlined into caller. Still intriguing is that the same happens with: -Os -fno-inline -fno-inline-small-functions -fno-inline-functions-called-once -- Paulo Jorge Matos - pocmatos at gmail.com http://www.pmatos.net