From e1f83aa39dd5d4dbfd1045786e87bcac0b6561aa Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Tue, 24 Jan 2023 19:28:59 +0100 Subject: Remove irange::{min,max,kind}. gcc/ChangeLog: * tree-ssa-loop-niter.cc (refine_value_range_using_guard): Remove kind() call. (determine_value_range): Same. (record_nonwrapping_iv): Same. (infer_loop_bounds_from_signedness): Same. (scev_var_range_cant_overflow): Same. * tree-vrp.cc (operand_less_p): Delete. * tree-vrp.h (operand_less_p): Delete. * value-range.cc (get_legacy_range): Remove uses of deprecated API. (irange::value_inside_range): Delete. * value-range.h (vrange::kind): Delete. (irange::num_pairs): Remove check of m_kind. (irange::min): Delete. (irange::max): Delete. --- gcc/value-range.h | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) (limited to 'gcc/value-range.h') diff --git a/gcc/value-range.h b/gcc/value-range.h index 9d485fb..68f380a 100644 --- a/gcc/value-range.h +++ b/gcc/value-range.h @@ -166,10 +166,6 @@ public: wide_int get_nonzero_bits () const; void set_nonzero_bits (const wide_int_ref &bits); - // Deprecated legacy public methods. - tree min () const; // DEPRECATED - tree max () const; // DEPRECATED - protected: irange (tree *, unsigned); // potential promotion to public? @@ -188,7 +184,6 @@ protected: void normalize_kind (); void verify_range (); - int value_inside_range (tree) const; private: friend void gt_ggc_mx (irange *); @@ -499,7 +494,6 @@ public: void set (tree min, tree max, value_range_kind kind = VR_RANGE) { return m_vrange->set (min, max, kind); } tree type () { return m_vrange->type (); } - enum value_range_kind kind () { return m_vrange->kind (); } bool varying_p () const { return m_vrange->varying_p (); } bool undefined_p () const { return m_vrange->undefined_p (); } void set_varying (tree type) { m_vrange->set_varying (type); } @@ -645,26 +639,12 @@ extern bool vrp_operand_equal_p (const_tree, const_tree); inline REAL_VALUE_TYPE frange_val_min (const_tree type); inline REAL_VALUE_TYPE frange_val_max (const_tree type); -inline value_range_kind -vrange::kind () const -{ - return m_kind; -} - // Number of sub-ranges in a range. inline unsigned irange::num_pairs () const { - if (m_kind == VR_ANTI_RANGE) - { - bool constant_p = (TREE_CODE (min ()) == INTEGER_CST - && TREE_CODE (max ()) == INTEGER_CST); - gcc_checking_assert (constant_p); - return 2; - } - else - return m_num_ranges; + return m_num_ranges; } inline tree @@ -701,21 +681,6 @@ irange::tree_upper_bound () const return tree_upper_bound (m_num_ranges - 1); } -inline tree -irange::min () const -{ - return tree_lower_bound (0); -} - -inline tree -irange::max () const -{ - if (m_num_ranges) - return tree_upper_bound (); - else - return NULL; -} - inline bool irange::varying_compatible_p () const { -- cgit v1.1