This is the mail archive of the gcc-patches@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]

Re: Patch for PR target/38056, IA64 sibcall optimization fix.


On Fri, Feb 13, 2009 at 12:43 PM, Steve Ellcey <sje@cup.hp.com> wrote:
> This patch fixes PR target/38056 and allows IA64 to do sibcall
> optimizations across object file boundries if -mconstant-gp is used.
>
> Tested on IA64 HP-UX and Linux with no regressions, I will check it in
> later today.
>
> Steve Ellcey
> sje@cup.hp.com
>
>
> 2009-02-13  Steve Ellcey  <sje@cup.hp.com>
>
>        PR target/38056
>        * config/ia64/ia64.c (ia64_function_ok_for_sibcall): Check
>        TARGET_CONST_GP.
>
>
> Index: config/ia64/ia64.c
> ===================================================================
> --- config/ia64/ia64.c  (revision 144149)
> +++ config/ia64/ia64.c  (working copy)
> @@ -4365,8 +4365,9 @@ ia64_function_ok_for_sibcall (tree decl,
>     return false;
>
>   /* We must always return with our current GP.  This means we can
> -     only sibcall to functions defined in the current module.  */
> -  return decl && (*targetm.binds_local_p) (decl);
> +     only sibcall to functions defined in the current module unless
> +     TARGET_CONST_GP is set to true.  */
> +  return (decl && (*targetm.binds_local_p) (decl)) || TARGET_CONST_GP;
>  }
>

A couple testcases will be nice.

Thanks.


-- 
H.J.


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