}
} fop_negate;
-class foperator_abs : public range_operator
-{
- using range_operator::fold_range;
- using range_operator::op1_range;
-public:
- bool fold_range (frange &r, tree type,
- const frange &op1, const frange &,
- relation_trio = TRIO_VARYING) const final override;
- bool op1_range (frange &r, tree type,
- const frange &lhs, const frange &op2,
- relation_trio rel = TRIO_VARYING) const final override;
-} fop_abs;
-
bool
-foperator_abs::fold_range (frange &r, tree type,
- const frange &op1, const frange &op2,
- relation_trio) const
+operator_abs::fold_range (frange &r, tree type,
+ const frange &op1, const frange &op2,
+ relation_trio) const
{
if (empty_range_varying (r, type, op1, op2))
return true;
}
bool
-foperator_abs::op1_range (frange &r, tree type,
- const frange &lhs, const frange &op2,
- relation_trio) const
+operator_abs::op1_range (frange &r, tree type,
+ const frange &lhs, const frange &op2,
+ relation_trio) const
{
if (empty_range_varying (r, type, lhs, op2))
return true;
float_table::float_table ()
{
- set (ABS_EXPR, fop_abs);
set (NEGATE_EXPR, fop_negate);
set (MINUS_EXPR, fop_minus);
set (MULT_EXPR, fop_mult);
const REAL_VALUE_TYPE &rh_lb, const REAL_VALUE_TYPE &rh_ub,
relation_kind) const final override;
};
+
+class operator_abs : public range_operator
+{
+ public:
+ using range_operator::fold_range;
+ using range_operator::op1_range;
+ bool fold_range (frange &r, tree type,
+ const frange &op1, const frange &,
+ relation_trio = TRIO_VARYING) const final override;
+
+ bool op1_range (irange &r, tree type, const irange &lhs,
+ const irange &op2, relation_trio) const final override;
+ bool op1_range (frange &r, tree type,
+ const frange &lhs, const frange &op2,
+ relation_trio rel = TRIO_VARYING) const final override;
+private:
+ void wi_fold (irange &r, tree type, const wide_int &lh_lb,
+ const wide_int &lh_ub, const wide_int &rh_lb,
+ const wide_int &rh_ub) const final override;
+
+};
#endif // GCC_RANGE_OP_MIXED_H
operator_cst op_cst;
operator_cast op_cast;
operator_plus op_plus;
+operator_abs op_abs;
// Invoke the initialization routines for each class of range.
set (NOP_EXPR, op_cast);
set (CONVERT_EXPR, op_cast);
set (PLUS_EXPR, op_plus);
+ set (ABS_EXPR, op_abs);
}
// The tables are hidden and accessed via a simple extern function.
}
-class operator_abs : public range_operator
-{
- using range_operator::op1_range;
- public:
- virtual void wi_fold (irange &r, tree type,
- const wide_int &lh_lb,
- const wide_int &lh_ub,
- const wide_int &rh_lb,
- const wide_int &rh_ub) const;
- virtual bool op1_range (irange &r, tree type,
- const irange &lhs,
- const irange &op2,
- relation_trio) const;
-} op_abs;
-
void
operator_abs::wi_fold (irange &r, tree type,
const wide_int &lh_lb, const wide_int &lh_ub,
set (BIT_IOR_EXPR, op_bitwise_or);
set (BIT_XOR_EXPR, op_bitwise_xor);
set (BIT_NOT_EXPR, op_bitwise_not);
- set (ABS_EXPR, op_abs);
set (NEGATE_EXPR, op_negate);
set (ADDR_EXPR, op_addr);
}