aboutsummaryrefslogtreecommitdiff
path: root/gcc/value-range.h
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2023-01-24 21:05:24 +0100
committerAldy Hernandez <aldyh@redhat.com>2023-05-01 08:29:24 +0200
commit6b73cbb04d486b96052236a7649175988e3cbf53 (patch)
treef239f588d3d615f8b263d2a7d67708387eea53ea /gcc/value-range.h
parente1f83aa39dd5d4dbfd1045786e87bcac0b6561aa (diff)
downloadgcc-6b73cbb04d486b96052236a7649175988e3cbf53.zip
gcc-6b73cbb04d486b96052236a7649175988e3cbf53.tar.gz
gcc-6b73cbb04d486b96052236a7649175988e3cbf53.tar.bz2
Remove irange::tree_{lower,upper}_bound.
gcc/ChangeLog: * value-range.cc (irange::irange_set_anti_range): Remove uses of tree_lower_bound and tree_upper_bound. (irange::verify_range): Same. (irange::operator==): Same. (irange::singleton_p): Same. * value-range.h (irange::tree_lower_bound): Delete. (irange::tree_upper_bound): Delete. (irange::lower_bound): Delete. (irange::upper_bound): Delete. (irange::zero_p): Remove uses of tree_lower_bound and tree_upper_bound.
Diffstat (limited to 'gcc/value-range.h')
-rw-r--r--gcc/value-range.h39
1 files changed, 4 insertions, 35 deletions
diff --git a/gcc/value-range.h b/gcc/value-range.h
index 68f380a..10c44c5 100644
--- a/gcc/value-range.h
+++ b/gcc/value-range.h
@@ -168,10 +168,6 @@ public:
protected:
irange (tree *, unsigned);
- // potential promotion to public?
- tree tree_lower_bound (unsigned = 0) const;
- tree tree_upper_bound (unsigned) const;
- tree tree_upper_bound () const;
// In-place operators.
bool irange_union (const irange &);
@@ -654,33 +650,6 @@ irange::type () const
return TREE_TYPE (m_base[0]);
}
-// Return the lower bound of a sub-range expressed as a tree. PAIR is
-// the sub-range in question.
-
-inline tree
-irange::tree_lower_bound (unsigned pair) const
-{
- return m_base[pair * 2];
-}
-
-// Return the upper bound of a sub-range expressed as a tree. PAIR is
-// the sub-range in question.
-
-inline tree
-irange::tree_upper_bound (unsigned pair) const
-{
- return m_base[pair * 2 + 1];
-}
-
-// Return the highest bound of a range expressed as a tree.
-
-inline tree
-irange::tree_upper_bound () const
-{
- gcc_checking_assert (m_num_ranges);
- return tree_upper_bound (m_num_ranges - 1);
-}
-
inline bool
irange::varying_compatible_p () const
{
@@ -730,8 +699,8 @@ inline bool
irange::zero_p () const
{
return (m_kind == VR_RANGE && m_num_ranges == 1
- && integer_zerop (tree_lower_bound (0))
- && integer_zerop (tree_upper_bound (0)));
+ && lower_bound (0) == 0
+ && upper_bound (0) == 0);
}
inline bool
@@ -910,7 +879,7 @@ irange::lower_bound (unsigned pair) const
{
gcc_checking_assert (m_num_ranges > 0);
gcc_checking_assert (pair + 1 <= num_pairs ());
- return wi::to_wide (tree_lower_bound (pair));
+ return wi::to_wide (m_base[pair * 2]);
}
// Return the upper bound of a sub-range. PAIR is the sub-range in
@@ -921,7 +890,7 @@ irange::upper_bound (unsigned pair) const
{
gcc_checking_assert (m_num_ranges > 0);
gcc_checking_assert (pair + 1 <= num_pairs ());
- return wi::to_wide (tree_upper_bound (pair));
+ return wi::to_wide (m_base[pair * 2 + 1]);
}
// Return the highest bound of a range.