Minor fixes to frange.
authorAldy Hernandez <aldyh@redhat.com>
Wed, 14 Sep 2022 05:49:55 +0000 (07:49 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Wed, 14 Sep 2022 15:06:48 +0000 (17:06 +0200)
commit6da65479fcd86c21d0f6b731dda763b574e8066c
tree71c2af30a5ea56e358f2a6d9045dd9e6c1c0a332
parentf469ce1d3ef94092647125662ddd93847712909f
Minor fixes to frange.

Following are a series of cleanups to the frange code in preparation
for a much more invasive patch rewriting the NAN and sign tracking
bits.  Please be patient, as I'm trying to break everything up into
small chunks instead of dropping a mondo patch removing the NAN and
sign tristate handling.

No functional changes.

Regstrapped on x86-64 Linux, plus I ran selftests for
-ffinite-math-only.

gcc/ChangeLog:

* value-query.cc (range_query::get_tree_range): Remove check for overflow.
* value-range-pretty-print.cc (vrange_printer::visit): Move read
of type until after undefined_p is checked.
* value-range.cc (frange::set): Remove asserts for REAL_CST.
(frange::contains_p): Tidy up.
(range_tests_nan):  Add comment.
* value-range.h (frange::type): Check for undefined_p.
(frange::set_undefined): Remove set of endpoints.
gcc/value-query.cc
gcc/value-range-pretty-print.cc
gcc/value-range.cc
gcc/value-range.h