[RFA][PATCH] patch 7/n Introduce evrp_range_analyzer class

Bernhard Reutner-Fischer rep.dot.nop@gmail.com
Fri Nov 17 18:06:00 GMT 2017


On 17 November 2017 14:45:29 CET, Richard Biener <richard.guenther@gmail.com> wrote:
>On Fri, Nov 17, 2017 at 8:41 AM, Jeff Law <law@redhat.com> wrote:
>> This patch introduces the evrp_range_analyzer class.  This is the
>class
>> we're going to be able to embed into existing dominator walkers to
>> provide them with context sensitive range analysis.
>>
>> The bulk of the class is extracted from the evrp_dom_walker class.  A
>> few minor notes.
>>
>> Setup of the reachable/executable state for blocks/edges moves into
>the
>> evrp_range_analyzer class's constructor from execute_early_vrp.  It
>> seems to bit better in the analyzer class as it sets state the
>analyzer
>> uses internally.
>>
>> The analyzer has a enter/leave methods to call as well as a
>> per-statement method to call.  I went back and forth several times on
>> whether or not to have a per-statement method call or hide the
>> per-statement stuff behind the enter method.  I could be easily
>> convinced to return to the latter as it has a simpler interface for
>the
>> clients.
>>
>> I suspect evrp_range_analyzer::get_value_range which is currently
>> private and delegates to the embedded vr_values class to likely
>become a
>> public member that continues to delegate to the embedded vr_values.
>> Essentially it's the query interface for embedded range analysis.
>> There's a couple other cleanups that need to happen with the goal
>that
>> the vr_values data member can become private.
>>
>> Bootstrapped and regression tested on x86_64.  OK for the trunk?
>
>Ok.

>> +  /* Cond_stack holds the old VR.  */
>> +  auto_vec<std::pair <tree, value_range*> > stack;

s/Cond_stack/stack/
While you move the comment please.
TIA,



More information about the Gcc-patches mailing list