diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2023-05-31 12:31:53 -0400 |
---|---|---|
committer | Andrew MacLeod <amacleod@redhat.com> | 2023-06-08 14:52:04 -0400 |
commit | 9c0fed507f059d54c6753f86a2a10a0c743a7f95 (patch) | |
tree | 05f4d4351b16cbbc4e13f685857cde8a15d7194f /gcc/value-range.h | |
parent | cd4b7e8b6232c42001b63a0cb4f743536e2faee1 (diff) | |
download | gcc-9c0fed507f059d54c6753f86a2a10a0c743a7f95.zip gcc-9c0fed507f059d54c6753f86a2a10a0c743a7f95.tar.gz gcc-9c0fed507f059d54c6753f86a2a10a0c743a7f95.tar.bz2 |
Unify range_operators to one class.
Range_operator and range_operator_float are 2 different classes, making
generalized dispatch difficult. The distinction between what is a float
operator and what is an integral operator also blurs when some methods
have multiple types. ie, casts : INT = FLOAT and FLOAT = INT
This patch unifies all possible invocation patterns in one class, and
switches the float table to use the general range_op_table.
* gimple-range-op.cc (cfn_constant_float_p): Change base class.
(cfn_pass_through_arg1): Adjust using statemenmt.
(cfn_signbit): Change base class, adjust using statement.
(cfn_copysign): Ditto.
(cfn_sqrt): Ditto.
(cfn_sincos): Ditto.
* range-op-float.cc (fold_range): Change class to range_operator.
(rv_fold): Ditto.
(op1_range): Ditto
(op2_range): Ditto
(lhs_op1_relation): Ditto.
(lhs_op2_relation): Ditto.
(op1_op2_relation): Ditto.
(foperator_*): Ditto.
(class float_table): New. Inherit from range_op_table.
(floating_tree_table) Change to range_op_table pointer.
(class floating_op_table): Delete.
* range-op.cc (operator_equal): Adjust using statement.
(operator_not_equal): Ditto.
(operator_lt, operator_le, operator_gt, operator_ge): Ditto.
(operator_minus, operator_cast): Ditto.
(operator_bitwise_and, pointer_plus_operator): Ditto.
(get_float_handle): Change return type.
* range-op.h (range_operator_float): Delete. Relocate all methods
into class range_operator.
(range_op_handler::m_float): Change type to range_operator.
(floating_op_table): Delete.
(floating_tree_table): Change type.
Diffstat (limited to 'gcc/value-range.h')
0 files changed, 0 insertions, 0 deletions