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

Why is TARGET_FUNCTION_OK_FOR_SIBCALL only called once in caller and
it is not being called for the callee call?

Cheers,

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

Reply via email to