Re: [PATCH] Fix PR48182

2013-04-07 Thread Jakub Jelinek
On Mon, Apr 08, 2013 at 08:48:22AM +0200, Marek Polacek wrote: > > Yea, changing the min value in params.def to 1 would be a better way > > to fix. Consider that patch pre-approved. > > Ok, thanks. I'll apply this one. Regtest/bootstrap pending. Thanks. Also ok for 4.8. > 2013-04-08 Marek P

Re: [PATCH] Fix PR48182

2013-04-07 Thread Marek Polacek
On Fri, Apr 05, 2013 at 03:00:43PM -0600, Jeff Law wrote: > On 04/05/2013 02:50 PM, Jakub Jelinek wrote: > >On Fri, Apr 05, 2013 at 02:42:19PM -0600, Jeff Law wrote: > >>? I must be missing something, the change causes an early bail out > >>from try_crossjump_to_edge. > >> > >>We don't want to rai

Re: [PATCH] Fix PR48182

2013-04-05 Thread Jeff Law
On 04/05/2013 02:50 PM, Jakub Jelinek wrote: On Fri, Apr 05, 2013 at 02:42:19PM -0600, Jeff Law wrote: ? I must be missing something, the change causes an early bail out from try_crossjump_to_edge. We don't want to raise the min to > 0 as that doesn't allow the user to turn on this specific tr

Re: [PATCH] Fix PR48182

2013-04-05 Thread Jakub Jelinek
On Fri, Apr 05, 2013 at 02:42:19PM -0600, Jeff Law wrote: > ? I must be missing something, the change causes an early bail out > from try_crossjump_to_edge. > > We don't want to raise the min to > 0 as that doesn't allow the user > to turn on this specific transformation. The condition is if (

Re: [PATCH] Fix PR48182

2013-04-05 Thread Jeff Law
On 04/05/2013 02:33 PM, Jakub Jelinek wrote: On Fri, Apr 05, 2013 at 02:21:57PM -0600, Jeff Law wrote: On 04/05/2013 09:22 AM, Marek Polacek wrote: This patch prevents segfault when using --param min-crossjump-insns=0. What can happen in that case is that flow_find_cross_jump returns 0, thus nm

Re: [PATCH] Fix PR48182

2013-04-05 Thread Jakub Jelinek
On Fri, Apr 05, 2013 at 02:21:57PM -0600, Jeff Law wrote: > On 04/05/2013 09:22 AM, Marek Polacek wrote: > >This patch prevents segfault when using --param min-crossjump-insns=0. > >What can happen in that case is that flow_find_cross_jump returns 0, > >thus nmatch is 0, then > >nmatch < PARAM_VALU

Re: [PATCH] Fix PR48182

2013-04-05 Thread Jeff Law
On 04/05/2013 09:22 AM, Marek Polacek wrote: This patch prevents segfault when using --param min-crossjump-insns=0. What can happen in that case is that flow_find_cross_jump returns 0, thus nmatch is 0, then nmatch < PARAM_VALUE (PARAM_MIN_CROSSJUMP_INSNS) doesn't hold, thus we continue, but we s

[PATCH] Fix PR48182

2013-04-05 Thread Marek Polacek
This patch prevents segfault when using --param min-crossjump-insns=0. What can happen in that case is that flow_find_cross_jump returns 0, thus nmatch is 0, then nmatch < PARAM_VALUE (PARAM_MIN_CROSSJUMP_INSNS) doesn't hold, thus we continue, but we segfault later on when doing split_block. I thi