[COMMITTED,3/4] Remove pointer_and_operator.

Message ID 69832a6a-2576-4b37-bb8f-b958c48f8fb8@redhat.com
State New
Headers
Series [COMMITTED,1/4] - Cleanup pointer_plus_operator. |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 fail Patch failed to apply

Commit Message

Andrew MacLeod Oct. 24, 2024, 12:53 p.m. UTC
  Similarly, operator_bitwise_and::fold_range with prange arguments 
supercedes  the pointer_and_operator class, so this patch removes the 
class to avod any confusion.

Bootstraps on x86_64-pc-linux-gnu with no regressions.  pushed.

Andrew
  

Patch

From afd6732de031e42fb54904d478d7c5a1663fc711 Mon Sep 17 00:00:00 2001
From: Andrew MacLeod <amacleod@redhat.com>
Date: Mon, 21 Oct 2024 18:20:10 -0400
Subject: [PATCH 3/4] Remove pointer_and_operator.

This operator class predates the dispatch system, and is no longer used.
The functionality of wi_fold has been replaced by
operator_bitwise_and::fold_range with prange operaands.

	* range-op-ptr.cc (class pointer_and_operator): Remove.
	(pointer_and_operator::wi_fold): Remove.
---
 gcc/range-op-ptr.cc | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/gcc/range-op-ptr.cc b/gcc/range-op-ptr.cc
index f8ce62d5719..dd312a80366 100644
--- a/gcc/range-op-ptr.cc
+++ b/gcc/range-op-ptr.cc
@@ -379,29 +379,6 @@  pointer_plus_operator::op2_range (irange &r, tree type,
   return true;
 }
 
-class pointer_and_operator : public range_operator
-{
-public:
-  virtual 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;
-} op_pointer_and;
-
-void
-pointer_and_operator::wi_fold (irange &r, tree type,
-			       const wide_int &lh_lb,
-			       const wide_int &lh_ub,
-			       const wide_int &rh_lb ATTRIBUTE_UNUSED,
-			       const wide_int &rh_ub ATTRIBUTE_UNUSED) const
-{
-  // For pointer types, we are really only interested in asserting
-  // whether the expression evaluates to non-NULL.
-  if (wi_zero_p (type, lh_lb, lh_ub) || wi_zero_p (type, lh_lb, lh_ub))
-    r.set_zero (type);
-  else
-    r.set_varying (type);
-}
-
 
 class pointer_or_operator : public range_operator
 {
-- 
2.45.0