Skip to content

Commit

Permalink
Add prange entries in gimple-range-op.cc.
Browse files Browse the repository at this point in the history
gcc/ChangeLog:

	* gimple-range-op.cc (class cfn_pass_through_arg1): Add overloads
	for prange operations.
	(cfn_strlen): Same.
  • Loading branch information
aldyh committed May 4, 2024
1 parent ff306c7 commit 6cec31d
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions gcc/gimple-range-op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,37 @@ class cfn_pass_through_arg1 : public range_operator
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.
Expand Down Expand Up @@ -1107,6 +1132,17 @@ class cfn_strlen : public range_operator
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;


Expand Down

0 comments on commit 6cec31d

Please sign in to comment.