Re: [PATCH] vrp_prop: Use dom_walker for -Warray-bounds (PR tree-optimization/83312)

2017-12-13 Thread Jeff Law
On 12/13/2017 09:24 AM, Richard Biener wrote: >> >> Alternately we could to the dom_walker ctor that an initial state of >> EDGE_EXECUTABLE is already set. > > I'm quite sure that wouldn't help for VRP. Not sure why. But it's not worth digging deep into. I do think the current structure could s

Re: [PATCH] vrp_prop: Use dom_walker for -Warray-bounds (PR tree-optimization/83312)

2017-12-13 Thread Jeff Law
On 12/13/2017 09:55 AM, Michael Matz wrote: > Hi, > > On Tue, 12 Dec 2017, David Malcolm wrote: > >> There didn't seem to be a pre-existing way to determine the unique >> out-edge after a GIMPLE_COND (if it has a constant cond), so I added >> a new gimple_cond_get_unique_successor_edge function.

Re: [PATCH] vrp_prop: Use dom_walker for -Warray-bounds (PR tree-optimization/83312)

2017-12-13 Thread Michael Matz
Hi, On Tue, 12 Dec 2017, David Malcolm wrote: > There didn't seem to be a pre-existing way to determine the unique > out-edge after a GIMPLE_COND (if it has a constant cond), so I added > a new gimple_cond_get_unique_successor_edge function. Similarly, > something similar may apply for switches,

Re: [PATCH] vrp_prop: Use dom_walker for -Warray-bounds (PR tree-optimization/83312)

2017-12-13 Thread Richard Biener
On December 13, 2017 5:18:16 PM GMT+01:00, Jeff Law wrote: >On 12/13/2017 09:02 AM, David Malcolm wrote: >> On Wed, 2017-12-13 at 08:46 -0700, Jeff Law wrote: >>> On 12/13/2017 03:06 AM, Richard Biener wrote: On December 12, 2017 9:50:38 PM GMT+01:00, David Malcolm >>> redhat.com> wrote:

Re: [PATCH] vrp_prop: Use dom_walker for -Warray-bounds (PR tree-optimization/83312)

2017-12-13 Thread Jeff Law
On 12/13/2017 09:02 AM, David Malcolm wrote: > On Wed, 2017-12-13 at 08:46 -0700, Jeff Law wrote: >> On 12/13/2017 03:06 AM, Richard Biener wrote: >>> On December 12, 2017 9:50:38 PM GMT+01:00, David Malcolm >> redhat.com> wrote: PR tree-optimization/83312 reports a false positive from -W

Re: [PATCH] vrp_prop: Use dom_walker for -Warray-bounds (PR tree-optimization/83312)

2017-12-13 Thread David Malcolm
On Wed, 2017-12-13 at 08:46 -0700, Jeff Law wrote: > On 12/13/2017 03:06 AM, Richard Biener wrote: > > On December 12, 2017 9:50:38 PM GMT+01:00, David Malcolm > redhat.com> wrote: > > > PR tree-optimization/83312 reports a false positive from > > > -Warray-bounds. > > > The root cause is that VRP

Re: [PATCH] vrp_prop: Use dom_walker for -Warray-bounds (PR tree-optimization/83312)

2017-12-13 Thread Jeff Law
On 12/13/2017 03:06 AM, Richard Biener wrote: > On December 12, 2017 9:50:38 PM GMT+01:00, David Malcolm > wrote: >> PR tree-optimization/83312 reports a false positive from >> -Warray-bounds. >> The root cause is that VRP both: >> >> (a) updates a GIMPLE_COND to be always false, and >> >> (b) up

Re: [PATCH] vrp_prop: Use dom_walker for -Warray-bounds (PR tree-optimization/83312)

2017-12-13 Thread Richard Biener
On December 12, 2017 9:50:38 PM GMT+01:00, David Malcolm wrote: >PR tree-optimization/83312 reports a false positive from >-Warray-bounds. >The root cause is that VRP both: > >(a) updates a GIMPLE_COND to be always false, and > >(b) updates an ARRAY_REF in the now-unreachable other path to use an

[PATCH] vrp_prop: Use dom_walker for -Warray-bounds (PR tree-optimization/83312)

2017-12-12 Thread David Malcolm
PR tree-optimization/83312 reports a false positive from -Warray-bounds. The root cause is that VRP both: (a) updates a GIMPLE_COND to be always false, and (b) updates an ARRAY_REF in the now-unreachable other path to use an ASSERT_EXPR with a negative index: def_stmt j_6 = ASSERT_EXPR