diff mbox series

Remove unused hybrid_* operators in range-ops.

Message ID 20240628093109.1837267-1-aldyh@redhat.com
State New
Headers show
Series Remove unused hybrid_* operators in range-ops. | expand

Commit Message

Aldy Hernandez June 28, 2024, 9:30 a.m. UTC
Now that the dust has settled on the prange work, we can remove the
hybrid operators.  I will push this once tests complete.

gcc/ChangeLog:

	* range-op-ptr.cc (class hybrid_and_operator): Remove.
	(class hybrid_or_operator): Same.
	(class hybrid_min_operator): Same.
	(class hybrid_max_operator): Same.
---
 gcc/range-op-ptr.cc | 156 --------------------------------------------
 1 file changed, 156 deletions(-)
diff mbox series

Patch

diff --git a/gcc/range-op-ptr.cc b/gcc/range-op-ptr.cc
index 9421d3cd21d..1f41236e710 100644
--- a/gcc/range-op-ptr.cc
+++ b/gcc/range-op-ptr.cc
@@ -612,162 +612,6 @@  operator_pointer_diff::op1_op2_relation_effect (irange &lhs_range, tree type,
 					rel);
 }
 
-// ----------------------------------------------------------------------
-// Hybrid operators for the 4 operations which integer and pointers share,
-// but which have different implementations.  Simply check the type in
-// the call and choose the appropriate method.
-// Once there is a PRANGE signature, simply add the appropriate
-// prototypes in the rmixed range class, and remove these hybrid classes.
-
-class hybrid_and_operator : public operator_bitwise_and
-{
-public:
-  using range_operator::update_bitmask;
-  using range_operator::op1_range;
-  using range_operator::op2_range;
-  using range_operator::lhs_op1_relation;
-  bool op1_range (irange &r, tree type,
-		  const irange &lhs, const irange &op2,
-		  relation_trio rel = TRIO_VARYING) const final override
-    {
-      if (INTEGRAL_TYPE_P (type))
-	return operator_bitwise_and::op1_range (r, type, lhs, op2, rel);
-      else
-	return false;
-    }
-  bool op2_range (irange &r, tree type,
-		  const irange &lhs, const irange &op1,
-		  relation_trio rel = TRIO_VARYING) const final override
-    {
-      if (INTEGRAL_TYPE_P (type))
-	return operator_bitwise_and::op2_range (r, type, lhs, op1, rel);
-      else
-	return false;
-    }
-  relation_kind lhs_op1_relation (const irange &lhs,
-				  const irange &op1, const irange &op2,
-				  relation_kind rel) const final override
-    {
-      if (!lhs.undefined_p () && INTEGRAL_TYPE_P (lhs.type ()))
-	return operator_bitwise_and::lhs_op1_relation (lhs, op1, op2, rel);
-      else
-	return VREL_VARYING;
-    }
-  void update_bitmask (irange &r, const irange &lh,
-		       const irange &rh) const final override
-    {
-      if (!r.undefined_p () && INTEGRAL_TYPE_P (r.type ()))
-	operator_bitwise_and::update_bitmask (r, lh, rh);
-    }
-
-  void wi_fold (irange &r, tree type, const wide_int &lh_lb,
-		const wide_int &lh_ub, const wide_int &rh_lb,
-		const wide_int &rh_ub) const final override
-    {
-      if (INTEGRAL_TYPE_P (type))
-	return operator_bitwise_and::wi_fold (r, type, lh_lb, lh_ub,
-					      rh_lb, rh_ub);
-      else
-	return op_pointer_and.wi_fold (r, type, lh_lb, lh_ub, rh_lb, rh_ub);
-    }
-} op_hybrid_and;
-
-// Temporary class which dispatches routines to either the INT version or
-// the pointer version depending on the type.  Once PRANGE is a range
-// class, we can remove the hybrid.
-
-class hybrid_or_operator : public operator_bitwise_or
-{
-public:
-  using range_operator::update_bitmask;
-  using range_operator::op1_range;
-  using range_operator::op2_range;
-  using range_operator::lhs_op1_relation;
-  bool op1_range (irange &r, tree type,
-		  const irange &lhs, const irange &op2,
-		  relation_trio rel = TRIO_VARYING) const final override
-    {
-      if (INTEGRAL_TYPE_P (type))
-	return operator_bitwise_or::op1_range (r, type, lhs, op2, rel);
-      else
-	return op_pointer_or.op1_range (r, type, lhs, op2, rel);
-    }
-  bool op2_range (irange &r, tree type,
-		  const irange &lhs, const irange &op1,
-		  relation_trio rel = TRIO_VARYING) const final override
-    {
-      if (INTEGRAL_TYPE_P (type))
-	return operator_bitwise_or::op2_range (r, type, lhs, op1, rel);
-      else
-	return op_pointer_or.op2_range (r, type, lhs, op1, rel);
-    }
-  void update_bitmask (irange &r, const irange &lh,
-		       const irange &rh) const final override
-    {
-      if (!r.undefined_p () && INTEGRAL_TYPE_P (r.type ()))
-	operator_bitwise_or::update_bitmask (r, lh, rh);
-    }
-
-  void wi_fold (irange &r, tree type, const wide_int &lh_lb,
-		const wide_int &lh_ub, const wide_int &rh_lb,
-		const wide_int &rh_ub) const final override
-    {
-      if (INTEGRAL_TYPE_P (type))
-	return operator_bitwise_or::wi_fold (r, type, lh_lb, lh_ub,
-					      rh_lb, rh_ub);
-      else
-	return op_pointer_or.wi_fold (r, type, lh_lb, lh_ub, rh_lb, rh_ub);
-    }
-} op_hybrid_or;
-
-// Temporary class which dispatches routines to either the INT version or
-// the pointer version depending on the type.  Once PRANGE is a range
-// class, we can remove the hybrid.
-
-class hybrid_min_operator : public operator_min
-{
-  using range_operator::update_bitmask;
-public:
-  void update_bitmask (irange &r, const irange &lh,
-		       const irange &rh) const final override
-    {
-      if (!r.undefined_p () && INTEGRAL_TYPE_P (r.type ()))
-	operator_min::update_bitmask (r, lh, rh);
-    }
-
-  void wi_fold (irange &r, tree type, const wide_int &lh_lb,
-		const wide_int &lh_ub, const wide_int &rh_lb,
-		const wide_int &rh_ub) const final override
-    {
-      if (INTEGRAL_TYPE_P (type))
-	return operator_min::wi_fold (r, type, lh_lb, lh_ub, rh_lb, rh_ub);
-      else
-	return op_ptr_min_max.wi_fold (r, type, lh_lb, lh_ub, rh_lb, rh_ub);
-    }
-} op_hybrid_min;
-
-class hybrid_max_operator : public operator_max
-{
-  using range_operator::update_bitmask;
-public:
-  void update_bitmask (irange &r, const irange &lh,
-		       const irange &rh) const final override
-    {
-      if (!r.undefined_p () && INTEGRAL_TYPE_P (r.type ()))
-	operator_max::update_bitmask (r, lh, rh);
-    }
-
-  void wi_fold (irange &r, tree type, const wide_int &lh_lb,
-		const wide_int &lh_ub, const wide_int &rh_lb,
-		const wide_int &rh_ub) const final override
-    {
-      if (INTEGRAL_TYPE_P (type))
-	return operator_max::wi_fold (r, type, lh_lb, lh_ub, rh_lb, rh_ub);
-      else
-	return op_ptr_min_max.wi_fold (r, type, lh_lb, lh_ub, rh_lb, rh_ub);
-    }
-} op_hybrid_max;
-
 bool
 operator_identity::fold_range (prange &r, tree type ATTRIBUTE_UNUSED,
 			       const prange &lh ATTRIBUTE_UNUSED,