aboutsummaryrefslogtreecommitdiff
path: root/gcc/range-op-float.cc
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2023-06-09 13:42:08 -0400
committerAndrew MacLeod <amacleod@redhat.com>2023-06-09 20:33:03 -0400
commita1aaaff33a79d1b7613fbf8a17b51321a135f19c (patch)
tree93b9604affb2ea5a25538691a51ec7cde90ca46d /gcc/range-op-float.cc
parent29dbd7ef69fe1375055ada081af88e3a8919fff0 (diff)
downloadgcc-a1aaaff33a79d1b7613fbf8a17b51321a135f19c.zip
gcc-a1aaaff33a79d1b7613fbf8a17b51321a135f19c.tar.gz
gcc-a1aaaff33a79d1b7613fbf8a17b51321a135f19c.tar.bz2
Unify ABS_EXPR range operator
Move the declaration of the class to the range-op-mixed header, add the floating point prototypes as well, and use it in the new unified table. * range-op-float.cc (foperator_abs): Remove. Move prototypes to range-op-mixed.h (operator_abs::fold_range): Rename from foperator_abs. (operator_abs::op1_range): Ditto. (float_table::float_table): Remove ABS_EXPR. * range-op-mixed.h (class operator_abs): Combined from integer and float files. * range-op.cc (op_abs): New object. (unified_table::unified_table): Add ABS_EXPR. (class operator_abs): Move to range-op-mixed.h. (integral_table::integral_table): Remove ABS_EXPR. (pointer_table::pointer_table): Remove ABS_EXPR.
Diffstat (limited to 'gcc/range-op-float.cc')
-rw-r--r--gcc/range-op-float.cc26
1 files changed, 6 insertions, 20 deletions
diff --git a/gcc/range-op-float.cc b/gcc/range-op-float.cc
index bd1b792..2b177c3 100644
--- a/gcc/range-op-float.cc
+++ b/gcc/range-op-float.cc
@@ -1341,23 +1341,10 @@ public:
}
} 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;
@@ -1405,9 +1392,9 @@ foperator_abs::fold_range (frange &r, tree type,
}
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;
@@ -2691,7 +2678,6 @@ private:
float_table::float_table ()
{
- set (ABS_EXPR, fop_abs);
set (NEGATE_EXPR, fop_negate);
set (MINUS_EXPR, fop_minus);
set (MULT_EXPR, fop_mult);