diff mbox series

[COMMITTED,prange] Default unimplemented prange operators to false.

Message ID 20240511092502.668080-2-aldyh@redhat.com
State New
Headers show
Series [COMMITTED,prange] Default unimplemented prange operators to false. | expand

Commit Message

Aldy Hernandez May 11, 2024, 9:24 a.m. UTC
The canonical way to indicate that a range operator is unsupported is
to return false, which has the sematic meaning of VARYING.  This patch
cleans up a few default virtuals that were trying harder to set
VARYING manually.

gcc/ChangeLog:

	* range-op-ptr.cc (range_operator::fold_range): Return false.
---
 gcc/range-op-ptr.cc | 55 +++++++++++++--------------------------------
 1 file changed, 15 insertions(+), 40 deletions(-)
diff mbox series

Patch

diff --git a/gcc/range-op-ptr.cc b/gcc/range-op-ptr.cc
index 466edc6bf74..65cca65103a 100644
--- a/gcc/range-op-ptr.cc
+++ b/gcc/range-op-ptr.cc
@@ -62,63 +62,38 @@  range_operator::pointers_handled_p (range_op_dispatch_type ATTRIBUTE_UNUSED,
 }
 
 bool
-range_operator::fold_range (prange &r, tree type,
-			    const prange &op1,
-			    const prange &op2,
-			    relation_trio trio) const
+range_operator::fold_range (prange &, tree, const prange &, const prange &,
+			    relation_trio) const
 {
-  relation_kind rel = trio.op1_op2 ();
-  r.set_varying (type);
-  op1_op2_relation_effect (r, type, op1, op2, rel);
-  return true;
+  return false;
 }
 
 bool
-range_operator::fold_range (prange &r, tree type,
-			    const prange &op1,
-			    const irange &op2,
-			    relation_trio trio) const
+range_operator::fold_range (prange &, tree, const prange &, const irange &,
+			    relation_trio) const
 {
-  relation_kind rel = trio.op1_op2 ();
-  r.set_varying (type);
-  op1_op2_relation_effect (r, type, op1, op2, rel);
-  return true;
+  return false;
 }
 
 bool
-range_operator::fold_range (irange &r, tree type,
-			    const prange &op1,
-			    const prange &op2,
-			    relation_trio trio) const
+range_operator::fold_range (irange &, tree, const prange &, const prange &,
+			    relation_trio) const
 {
-  relation_kind rel = trio.op1_op2 ();
-  r.set_varying (type);
-  op1_op2_relation_effect (r, type, op1, op2, rel);
-  return true;
+  return false;
 }
 
 bool
-range_operator::fold_range (prange &r, tree type,
-			    const irange &op1,
-			    const prange &op2,
-			    relation_trio trio) const
+range_operator::fold_range (prange &, tree, const irange &, const prange &,
+			    relation_trio) const
 {
-  relation_kind rel = trio.op1_op2 ();
-  r.set_varying (type);
-  op1_op2_relation_effect (r, type, op1, op2, rel);
-  return true;
+  return false;
 }
 
 bool
-range_operator::fold_range (irange &r, tree type,
-			    const prange &op1,
-			    const irange &op2,
-			    relation_trio trio) const
+range_operator::fold_range (irange &, tree, const prange &, const irange &,
+			    relation_trio) const
 {
-  relation_kind rel = trio.op1_op2 ();
-  r.set_varying (type);
-  op1_op2_relation_effect (r, type, op1, op2, rel);
-  return true;
+  return false;
 }
 
 bool