Re: [PATCH] df: Keep return address register undefined until epilogue_completed

2016-09-14 Thread Segher Boessenkool
On Mon, Sep 12, 2016 at 10:30:56AM -0600, Jeff Law wrote: > On 09/10/2016 01:17 AM, Segher Boessenkool wrote: > >On Fri, Sep 09, 2016 at 04:40:12PM -0600, Jeff Law wrote: > >>Right now the dataflow is conservatively correct WRT the return register. > > > >And conservatively incorrect wrt all other

Re: [PATCH] df: Keep return address register undefined until epilogue_completed

2016-09-12 Thread Jeff Law
On 09/10/2016 01:17 AM, Segher Boessenkool wrote: On Fri, Sep 09, 2016 at 04:40:12PM -0600, Jeff Law wrote: Right now the dataflow is conservatively correct WRT the return register. And conservatively incorrect wrt all other callee-saved regs! But prior to prologue/epilogue insertion it should

Re: [PATCH] df: Keep return address register undefined until epilogue_completed

2016-09-10 Thread Segher Boessenkool
On Fri, Sep 09, 2016 at 04:40:12PM -0600, Jeff Law wrote: > Right now the dataflow is conservatively correct WRT the return register. And conservatively incorrect wrt all other callee-saved regs! > If we made the change you want to make than the dataflow becomes overly > optimistic about the ran

Re: [PATCH] df: Keep return address register undefined until epilogue_completed

2016-09-09 Thread Jeff Law
On 08/29/2016 02:41 PM, Segher Boessenkool wrote: On Mon, Aug 29, 2016 at 10:19:25PM +0200, Steven Bosscher wrote: On Mon, Aug 29, 2016 at 6:50 PM, Segher Boessenkool wrote: This patch changes that so that that def is only added after epilogue_completed. ... Does this work on all other target

Re: [PATCH] df: Keep return address register undefined until epilogue_completed

2016-09-09 Thread Jeff Law
On 08/29/2016 10:50 AM, Segher Boessenkool wrote: For separate shrink-wrapping we need to find out which basic blocks need what components set up by a prologue, so that we can move those prologue pieces deeper into the function, so that those pieces are executed less frequently, improving perform

Re: [PATCH] df: Keep return address register undefined until epilogue_completed

2016-09-09 Thread Jeff Law
On 08/29/2016 02:19 PM, Steven Bosscher wrote: On Mon, Aug 29, 2016 at 6:50 PM, Segher Boessenkool wrote: This patch changes that so that that def is only added after epilogue_completed. ... Does this work on all other targets? Guessing: not for targets where INCOMING_RETURN_ADDR_RTX is the

Re: [PATCH] df: Keep return address register undefined until epilogue_completed

2016-08-29 Thread Segher Boessenkool
On Mon, Aug 29, 2016 at 10:19:25PM +0200, Steven Bosscher wrote: > On Mon, Aug 29, 2016 at 6:50 PM, Segher Boessenkool wrote: > > This patch changes that so that that def is only added after > > epilogue_completed. > ... > > Does this work on all other targets? > > Guessing: not for targets where

Re: [PATCH] df: Keep return address register undefined until epilogue_completed

2016-08-29 Thread Steven Bosscher
On Mon, Aug 29, 2016 at 6:50 PM, Segher Boessenkool wrote: > This patch changes that so that that def is only added after > epilogue_completed. ... > Does this work on all other targets? Guessing: not for targets where INCOMING_RETURN_ADDR_RTX is the stack register? That'd be at least h8300, rl78,

[PATCH] df: Keep return address register undefined until epilogue_completed

2016-08-29 Thread Segher Boessenkool
For separate shrink-wrapping we need to find out which basic blocks need what components set up by a prologue, so that we can move those prologue pieces deeper into the function, so that those pieces are executed less frequently, improving performance. To do this, target code will normally look at