Re: [Bug middle-end/23828] local calling convention not used when using -fwhole-program --combine

2005-09-13 Thread Andrew Pinski


On Sep 13, 2005, at 6:36 PM, dann at godzilla dot ics dot uci dot edu 
wrote:




But the above just fixes the symptoms, it's probably not the correct
way to test for a nested function.


DECL_NO_STATIC_CHAIN (decl) should be true for this function but
why is it not?


/* In a FUNCTION_DECL with a nonzero DECL_CONTEXT, indicates that a
   static chain is not needed.  */
#define DECL_NO_STATIC_CHAIN(NODE) \
  (FUNCTION_DECL_CHECK (NODE)-function_decl.regdecl_flag)

-- Pinski



Re: [Bug middle-end/23828] local calling convention not used when using -fwhole-program --combine

2005-09-13 Thread Andrew Pinski


On Sep 13, 2005, at 6:36 PM, dann at godzilla dot ics dot uci dot edu 
wrote:




--- Additional Comments From dann at godzilla dot ics dot uci dot 
edu  2005-09-13 22:36 ---

It looks like the -fwhole-program version of ClearLeft only passes the
first 2 arguments to the ClearInLine call in register, the 3rd one is
passed on the stack.
The reason for that is this code in i386.c:ix86_function_regparm:


Maybe a better check would be check in the decl's function struct's 
field

static_chain_decl is set.

-- Pinski