aboutsummaryrefslogtreecommitdiff
path: root/gcc/range-op-float.cc
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2023-06-12 10:50:30 -0400
committerAndrew MacLeod <amacleod@redhat.com>2023-06-12 10:50:30 -0400
commit2eb50117ca26f665ce22085d620ff474622971cc (patch)
tree422e253cfef46ccbc0a799406b349a971bd59ae9 /gcc/range-op-float.cc
parent110c1f8d3070919b26646b87e13b9737ff88d606 (diff)
downloadgcc-2eb50117ca26f665ce22085d620ff474622971cc.zip
gcc-2eb50117ca26f665ce22085d620ff474622971cc.tar.gz
gcc-2eb50117ca26f665ce22085d620ff474622971cc.tar.bz2
Remove type from range_op_handler table selection
With the unified table complete, we no loonger need to specify a type to choose a table when setting a range_op_handler. * gimple-range-gori.cc (gori_compute::condexpr_adjust): Do not pass type. * gimple-range-op.cc (get_code): Rename from get_code_and_type and simplify. (gimple_range_op_handler::supported_p): No need for type. (gimple_range_op_handler::gimple_range_op_handler): Ditto. (cfn_copysign::fold_range): Ditto. (cfn_ubsan::fold_range): Ditto. * ipa-cp.cc (ipa_vr_operation_and_type_effects): Ditto. * ipa-fnsummary.cc (evaluate_conditions_for_known_args): Ditto. * range-op-float.cc (operator_plus::op1_range): Ditto. (operator_mult::op1_range): Ditto. (range_op_float_tests): Ditto. * range-op.cc (get_op_handler): Remove. (range_op_handler::set_op_handler): Remove. (operator_plus::op1_range): No need for type. (operator_minus::op1_range): Ditto. (operator_mult::op1_range): Ditto. (operator_exact_divide::op1_range): Ditto. (operator_cast::op1_range): Ditto. (perator_bitwise_not::fold_range): Ditto. (operator_negate::fold_range): Ditto. * range-op.h (range_op_handler::range_op_handler): Remove type param. (range_cast): No need for type. (range_op_table::operator[]): Check for enum_code >= 0. * tree-data-ref.cc (compute_distributive_range): No need for type. * tree-ssa-loop-unswitch.cc (unswitch_predicate): Ditto. * value-query.cc (range_query::get_tree_range): Ditto. * value-relation.cc (relation_oracle::validate_relation): Ditto. * vr-values.cc (range_of_var_in_loop): Ditto. (simplify_using_ranges::fold_cond_with_ops): Ditto.
Diffstat (limited to 'gcc/range-op-float.cc')
-rw-r--r--gcc/range-op-float.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/range-op-float.cc b/gcc/range-op-float.cc
index 757484a..24f2235 100644
--- a/gcc/range-op-float.cc
+++ b/gcc/range-op-float.cc
@@ -2244,7 +2244,7 @@ operator_plus::op1_range (frange &r, tree type, const frange &lhs,
{
if (lhs.undefined_p ())
return false;
- range_op_handler minus (MINUS_EXPR, type);
+ range_op_handler minus (MINUS_EXPR);
if (!minus)
return false;
frange wlhs = float_widen_lhs_range (type, lhs);
@@ -2361,7 +2361,7 @@ operator_mult::op1_range (frange &r, tree type,
{
if (lhs.undefined_p ())
return false;
- range_op_handler rdiv (RDIV_EXPR, type);
+ range_op_handler rdiv (RDIV_EXPR);
if (!rdiv)
return false;
frange wlhs = float_widen_lhs_range (type, lhs);
@@ -2716,7 +2716,7 @@ range_op_float_tests ()
ASSERT_EQ (r, r1);
// [-INF,+INF] + [-INF,+INF] could be a NAN.
- range_op_handler plus (PLUS_EXPR, float_type_node);
+ range_op_handler plus (PLUS_EXPR);
r0.set_varying (float_type_node);
r1.set_varying (float_type_node);
r0.clear_nan ();