Remove type from range_op_handler table selection
commit2eb50117ca26f665ce22085d620ff474622971cc
authorAndrew MacLeod <amacleod@redhat.com>
Mon, 12 Jun 2023 14:50:30 +0000 (12 10:50 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Mon, 12 Jun 2023 14:50:30 +0000 (12 10:50 -0400)
tree422e253cfef46ccbc0a799406b349a971bd59ae9
parent110c1f8d3070919b26646b87e13b9737ff88d606
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.
12 files changed:
gcc/gimple-range-gori.cc
gcc/gimple-range-op.cc
gcc/ipa-cp.cc
gcc/ipa-fnsummary.cc
gcc/range-op-float.cc
gcc/range-op.cc
gcc/range-op.h
gcc/tree-data-ref.cc
gcc/tree-ssa-loop-unswitch.cc
gcc/value-query.cc
gcc/value-relation.cc
gcc/vr-values.cc