Re: [PATCH] Fix shrink-wrap bug with anticipating into loops (PR67778, PR68634)

2015-12-03 Thread Segher Boessenkool
On Thu, Dec 03, 2015 at 12:31:53PM +0100, Bernd Schmidt wrote: > On 12/02/2015 07:21 PM, Segher Boessenkool wrote: > >After shrink-wrapping has found the "tightest fit" for where to place > >the prologue, it tries move it earlier (so that frame saves are run > >earlier) -- but without copying any m

Re: [PATCH] Fix shrink-wrap bug with anticipating into loops (PR67778, PR68634)

2015-12-03 Thread Segher Boessenkool
On Thu, Dec 03, 2015 at 12:35:51PM +0100, Bernd Schmidt wrote: > On 12/02/2015 07:21 PM, Segher Boessenkool wrote: > >After shrink-wrapping has found the "tightest fit" for where to place > >the prologue, it tries move it earlier (so that frame saves are run > >earlier) -- but without copying any m

Re: [PATCH] Fix shrink-wrap bug with anticipating into loops (PR67778, PR68634)

2015-12-03 Thread Richard Sandiford
Segher Boessenkool writes: > On Wed, Dec 02, 2015 at 08:19:05PM +0100, Jakub Jelinek wrote: >> On Wed, Dec 02, 2015 at 06:21:47PM +, Segher Boessenkool wrote: >> > --- a/gcc/shrink-wrap.c >> > +++ b/gcc/shrink-wrap.c >> > @@ -752,7 +752,11 @@ try_shrink_wrapping (edge *entry_edge, bitmap_head

Re: [PATCH] Fix shrink-wrap bug with anticipating into loops (PR67778, PR68634)

2015-12-03 Thread Bernd Schmidt
On 12/02/2015 07:21 PM, Segher Boessenkool wrote: After shrink-wrapping has found the "tightest fit" for where to place the prologue, it tries move it earlier (so that frame saves are run earlier) -- but without copying any more basic blocks. Another question would be - is there really a good r

Re: [PATCH] Fix shrink-wrap bug with anticipating into loops (PR67778, PR68634)

2015-12-03 Thread Bernd Schmidt
On 12/02/2015 07:21 PM, Segher Boessenkool wrote: After shrink-wrapping has found the "tightest fit" for where to place the prologue, it tries move it earlier (so that frame saves are run earlier) -- but without copying any more basic blocks. Unfortunately a candidate block we select can be insi

Re: [PATCH] Fix shrink-wrap bug with anticipating into loops (PR67778, PR68634)

2015-12-02 Thread Segher Boessenkool
On Wed, Dec 02, 2015 at 08:19:05PM +0100, Jakub Jelinek wrote: > On Wed, Dec 02, 2015 at 06:21:47PM +, Segher Boessenkool wrote: > > --- a/gcc/shrink-wrap.c > > +++ b/gcc/shrink-wrap.c > > @@ -752,7 +752,11 @@ try_shrink_wrapping (edge *entry_edge, bitmap_head > > *bb_with, > > > >/* If

Re: [PATCH] Fix shrink-wrap bug with anticipating into loops (PR67778, PR68634)

2015-12-02 Thread Jakub Jelinek
On Wed, Dec 02, 2015 at 06:21:47PM +, Segher Boessenkool wrote: > --- a/gcc/shrink-wrap.c > +++ b/gcc/shrink-wrap.c > @@ -752,7 +752,11 @@ try_shrink_wrapping (edge *entry_edge, bitmap_head > *bb_with, > >/* If we can move PRO back without having to duplicate more blocks, do so. >

[PATCH] Fix shrink-wrap bug with anticipating into loops (PR67778, PR68634)

2015-12-02 Thread Segher Boessenkool
After shrink-wrapping has found the "tightest fit" for where to place the prologue, it tries move it earlier (so that frame saves are run earlier) -- but without copying any more basic blocks. Unfortunately a candidate block we select can be inside a loop, and we will still allow it (because the l