]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add prange entries in gimple-range-op.cc.
authorAldy Hernandez <aldyh@redhat.com>
Wed, 20 Mar 2024 10:27:21 +0000 (11:27 +0100)
committerAldy Hernandez <aldyh@redhat.com>
Sat, 4 May 2024 08:25:52 +0000 (10:25 +0200)
gcc/ChangeLog:

* gimple-range-op.cc (class cfn_pass_through_arg1): Add overloads
for prange operations.
(cfn_strlen): Same.

gcc/gimple-range-op.cc

index 587de186db28f4fc8e3cc3e8c7ff7776321e56a4..55dfbb23ce22c80e79626d63257a9f675f6f1e01 100644 (file)
@@ -311,12 +311,37 @@ public:
     r = lh;
     return true;
   }
+  virtual bool fold_range (prange &r, tree, const prange &lh,
+                          const prange &, relation_trio) const
+  {
+    r = lh;
+    return true;
+  }
   virtual bool op1_range (irange &r, tree, const irange &lhs,
                          const irange &, relation_trio) const
   {
     r = lhs;
     return true;
   }
+  virtual bool op1_range (prange &r, tree, const prange &lhs,
+                         const prange &, relation_trio) const
+  {
+    r = lhs;
+    return true;
+  }
+  virtual bool pointers_handled_p (range_op_dispatch_type type,
+                                  unsigned dispatch) const
+  {
+    switch (type)
+      {
+      case DISPATCH_FOLD_RANGE:
+       return dispatch == RO_PPP;
+      case DISPATCH_OP1_RANGE:
+       return dispatch == RO_PPP;
+      default:
+       return true;
+      }
+  }
 } op_cfn_pass_through_arg1;
 
 // Implement range operator for CFN_BUILT_IN_SIGNBIT.
@@ -1107,6 +1132,17 @@ public:
     r.set (type, wi::zero (TYPE_PRECISION (type)), max - 2);
     return true;
   }
+  virtual bool pointers_handled_p (range_op_dispatch_type type,
+                                  unsigned dispatch) const
+  {
+    switch (type)
+      {
+      case DISPATCH_FOLD_RANGE:
+       return dispatch == RO_IPI;
+      default:
+       return true;
+      }
+  }
 } op_cfn_strlen;