Re: [PATCH 3/4] shrink-wrap: Improve spread_components (PR85645)

2018-05-09 Thread Segher Boessenkool
On Wed, May 09, 2018 at 09:33:30AM +0200, Eric Botcazou wrote: > > Now, neither of the two branches needs to have LR restored at all, > > because both of the branches end up in an infinite loop. > > > > This patch makes spread_component return a boolean saying if anything > > was changed, and if s

Re: [PATCH 3/4] shrink-wrap: Improve spread_components (PR85645)

2018-05-09 Thread Eric Botcazou
> Now, neither of the two branches needs to have LR restored at all, > because both of the branches end up in an infinite loop. > > This patch makes spread_component return a boolean saying if anything > was changed, and if so, it is called again. This obviously is finite > (there is a finite num

[PATCH 3/4] shrink-wrap: Improve spread_components (PR85645)

2018-05-08 Thread Segher Boessenkool
In the testcase for PR85645 we do a pretty dumb placement of the prologue/epilogue for the LR component: we place an epilogue for LR before a control flow split where one of the branches clobbers LR eventually, and the other does not. The branch that does clobber it will need a prologue again some