https://gcc.gnu.org/g:18c93c65a9fbaaf3762198e78fb3c24b9b6fd9fc

commit r15-379-g18c93c65a9fbaaf3762198e78fb3c24b9b6fd9fc
Author: Aldy Hernandez <al...@redhat.com>
Date:   Fri May 10 18:55:34 2024 +0200

    [prange] Default unimplemented prange operators to false.
    
    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.

Diff:
---
 gcc/range-op-ptr.cc | 55 +++++++++++++++--------------------------------------
 1 file changed, 15 insertions(+), 40 deletions(-)

diff --git a/gcc/range-op-ptr.cc b/gcc/range-op-ptr.cc
index 466edc6bf746..65cca65103af 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

Reply via email to