diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2024-06-28 11:27:24 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2024-06-28 14:39:33 +0200 |
commit | e9aa97940c60cbd43f28d8b1292126e118ead1d9 (patch) | |
tree | d65baacea15f0672bced07405d2170fc00893e9b | |
parent | 0192341a07b8ea30f631cf4afdc6fcf3fa7ce838 (diff) | |
download | gcc-e9aa97940c60cbd43f28d8b1292126e118ead1d9.zip gcc-e9aa97940c60cbd43f28d8b1292126e118ead1d9.tar.gz gcc-e9aa97940c60cbd43f28d8b1292126e118ead1d9.tar.bz2 |
Remove unused hybrid_* operators in range-ops.
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.
-rw-r--r-- | gcc/range-op-ptr.cc | 156 |
1 files changed, 0 insertions, 156 deletions
diff --git a/gcc/range-op-ptr.cc b/gcc/range-op-ptr.cc index 9421d3c..1f41236 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, |