diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2024-04-22 13:34:48 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2024-04-28 21:03:00 +0200 |
commit | ba1a8e8eed963c0253c6e5550c8bccc264c5d469 (patch) | |
tree | 81025048edd9a42891256be60f5b6be7967699c1 /libcpp | |
parent | a46564e4876c9a863d9897d72963cc4f03689adc (diff) | |
download | gcc-ba1a8e8eed963c0253c6e5550c8bccc264c5d469.zip gcc-ba1a8e8eed963c0253c6e5550c8bccc264c5d469.tar.gz gcc-ba1a8e8eed963c0253c6e5550c8bccc264c5d469.tar.bz2 |
Add tree versions of lower and upper bounds to vrange.
This patch adds vrange::lbound() and vrange::ubound() that return
trees. These can be used in generic code that is type agnostic, and
avoids special casing for pointers and integers in places where we
handle both. It also cleans up a wart in the Value_Range class.
gcc/ChangeLog:
* tree-ssa-loop-niter.cc (refine_value_range_using_guard): Convert
bound to wide_int.
* value-range.cc (Value_Range::lower_bound): Remove.
(Value_Range::upper_bound): Remove.
(unsupported_range::lbound): New.
(unsupported_range::ubound): New.
(frange::lbound): New.
(frange::ubound): New.
(irange::lbound): New.
(irange::ubound): New.
* value-range.h (class vrange): Add lbound() and ubound().
(class irange): Same.
(class frange): Same.
(class unsupported_range): Same.
(class Value_Range): Rename lower_bound and upper_bound to lbound
and ubound respectively.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions