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]

Gcc 4.3.4 fails to call TARGET_FUNCTION_OK_FOR_SIBCALL


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


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