Re: [PATCH] rs6000: Fix shrink-wrap-separate for AIX

2016-10-17 Thread Segher Boessenkool
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 >

Re: [PATCH] rs6000: Fix shrink-wrap-separate for AIX

2016-10-16 Thread David Edelsohn
On Sat, Oct 15, 2016 at 2:16 PM, Segher Boessenkool wrote: > On Sat, Oct 15, 2016 at 07:55:47AM -0400, David Edelsohn wrote: >> Maybe rs6000 always should prefer inline save-restore when SWS is >> enabled, except for optimize_size? > > Yes, that would be a good optimization probably. > > try_shrin

Re: [PATCH] rs6000: Fix shrink-wrap-separate for AIX

2016-10-15 Thread Segher Boessenkool
On Sat, Oct 15, 2016 at 07:55:47AM -0400, David Edelsohn wrote: > Maybe rs6000 always should prefer inline save-restore when SWS is > enabled, except for optimize_size? Yes, that would be a good optimization probably. try_shrink_wrapping_separate already does nothing unless you have optimize_func

Re: [PATCH] rs6000: Fix shrink-wrap-separate for AIX

2016-10-15 Thread David Edelsohn
On Fri, Oct 14, 2016 at 11:00 PM, Segher Boessenkool wrote: > All out-of-line register save routines need LR, so we cannot wrap the > LR component if there are out-of-line saves. This didn't show up for > testing on Linux because none of the tests there use out-of-line FPR > saves without also us

Re: [PATCH] rs6000: Fix shrink-wrap-separate for AIX

2016-10-14 Thread Segher Boessenkool
On Sat, Oct 15, 2016 at 03:00:20AM +, Segher Boessenkool wrote: > 2016-10-15 Segher Boessenkool > > * config/rs6000/rs6000.c (rs6000_get_separate_components): Do not > make LR a separately shrink-wrapped component if savres_strategy > contains any of {SAVE,REST}_INLINE_{GP

[PATCH] rs6000: Fix shrink-wrap-separate for AIX

2016-10-14 Thread Segher Boessenkool
All out-of-line register save routines need LR, so we cannot wrap the LR component if there are out-of-line saves. This didn't show up for testing on Linux because none of the tests there use out-of-line FPR saves without also using out-of-line GPR saves, which we did handle. This patch fixes it,