aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2024-03-20 11:27:21 +0100
committerAldy Hernandez <aldyh@redhat.com>2024-05-04 10:25:52 +0200
commit6cec31d44a426fa031ca07266fd2723b0038de83 (patch)
treedb95d8d1aa50f41c5fab7c39db751eadd98cca8e
parentff306c77b7cf5b7b09914f38b7351328835ac4ce (diff)
downloadgcc-6cec31d44a426fa031ca07266fd2723b0038de83.zip
gcc-6cec31d44a426fa031ca07266fd2723b0038de83.tar.gz
gcc-6cec31d44a426fa031ca07266fd2723b0038de83.tar.bz2
Add prange entries in gimple-range-op.cc.
gcc/ChangeLog: * gimple-range-op.cc (class cfn_pass_through_arg1): Add overloads for prange operations. (cfn_strlen): Same.
-rw-r--r--gcc/gimple-range-op.cc36
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/gimple-range-op.cc b/gcc/gimple-range-op.cc
index 587de18..55dfbb2 100644
--- a/gcc/gimple-range-op.cc
+++ b/gcc/gimple-range-op.cc
@@ -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;