extract independent value_range bits to value-range.cc

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

extract independent value_range bits to value-range.cc

Aldy Hernandez-2
tree-vrp.* is large and difficult to follow, in part because it has a
hodgepodge of different interdependent things (value ranges bits,
equivalences stuff, actual value range propagation things, etc etc).

This patch pulls out the value_range functionality into its own files:
value-range.h and value-range.cc.

There are no functional changes, but I did shuffle the order of
functions around for easier reading.  While the old tree-vrp.c had
everything spread out, the new value-range.cc file has functions grouped
more or less by functionality (constructors first, setters next,
predicates next, etc).

I did pull out vrp_val* and vrp_operand_equal* because value_range
depends on it.  I didn't change the name to avoid churn.

OK pending tests?

Aldy

curr.patch (107K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: extract independent value_range bits to value-range.cc

Andrew MacLeod
On 11/13/19 12:12 PM, Aldy Hernandez wrote:

> tree-vrp.* is large and difficult to follow, in part because it has a
> hodgepodge of different interdependent things (value ranges bits,
> equivalences stuff, actual value range propagation things, etc etc).
>
> This patch pulls out the value_range functionality into its own files:
> value-range.h and value-range.cc.
>
> There are no functional changes, but I did shuffle the order of
> functions around for easier reading.  While the old tree-vrp.c had
> everything spread out, the new value-range.cc file has functions
> grouped more or less by functionality (constructors first, setters
> next, predicates next, etc).
>
> I did pull out vrp_val* and vrp_operand_equal* because value_range
> depends on it.  I didn't change the name to avoid churn.
>
> OK pending tests?
>
> Aldy

Sure. Approved.

Keeping all the pure range related stuff in one place will make numerous
things easier going forward as we look towards multiple subranges and
other kinds of ranges.

Andrew