[PATCH] rs6000: Fix shrink-wrap-separate for AIX
Segher Boessenkool
segher@kernel.crashing.org
Mon Oct 17 12:33:00 GMT 2016
On Sun, Oct 16, 2016 at 08:37:30AM -0400, David Edelsohn wrote:
> Maybe something like the following:
>
> * config/rs6000/rs6000.c (rs6000_savres_strategy) [AIX,ELFv2]: Inline
> FPR save and restore if shrink-wrapping and not optimizing for size.
>
> Index: rs6000.c
> ===================================================================
> --- rs6000.c (revision 241210)
> +++ rs6000.c (working copy)
> @@ -25445,7 +25445,8 @@
> else
> {
> gcc_checking_assert (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2);
> - if (info->first_fp_reg_save > 61)
> + if ((!optimize_size && flag_shrink_wrap_separate)
> + || info->first_fp_reg_save > 61)
> strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS;
> strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS;
> strategy |= SAVE_INLINE_VRS | REST_INLINE_VRS;
>
With "optimize_function_for_speed_p (cfun)" (like you found out yourself
already), that looks fine to me.
Thanks,
Segher
More information about the Gcc-patches
mailing list