This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] vrp_prop: Use dom_walker for -Warray-bounds (PR tree-optimization/83312)
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. Similarly,
>> something similar may apply for switches, so I put in a
>> gimple_get_unique_successor_edge (though I wasn't able to create a
>> reproducer that used a switch).
>
> Please instead extend find_taken_edge() (its sub routines). E.g. let it
> accept a NULL val and initialize it with the cond from a gcond.
Yea. That seems like the best way to go.
Jeff