diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2023-08-01 14:33:09 -0400 |
---|---|---|
committer | Andrew MacLeod <amacleod@redhat.com> | 2023-08-03 14:19:54 -0400 |
commit | 9fedc3c010ff81f290e4e97cbcd0847ca803dcc4 (patch) | |
tree | 5992855c966e51ac98a42c5c064ed986f1619191 /gcc/gimple-range-gori.cc | |
parent | 33f080a7f1d70440d02de70af8f08eca21714abb (diff) | |
download | gcc-9fedc3c010ff81f290e4e97cbcd0847ca803dcc4.zip gcc-9fedc3c010ff81f290e4e97cbcd0847ca803dcc4.tar.gz gcc-9fedc3c010ff81f290e4e97cbcd0847ca803dcc4.tar.bz2 |
Add operand ranges to op1_op2_relation API.
With additional floating point relations in the pipeline, we can no
longer tell based on the LHS what the relation of X < Y is without knowing
the type of X and Y.
* gimple-range-fold.cc (fold_using_range::range_of_range_op): Add
ranges to the call to relation_fold_and_or.
(fold_using_range::relation_fold_and_or): Add op1 and op2 ranges.
(fur_source::register_outgoing_edges): Add op1 and op2 ranges.
* gimple-range-fold.h (relation_fold_and_or): Adjust params.
* gimple-range-gori.cc (gori_compute::compute_operand_range): Add
a varying op1 and op2 to call.
* range-op-float.cc (range_operator::op1_op2_relation): New dafaults.
(operator_equal::op1_op2_relation): New float version.
(operator_not_equal::op1_op2_relation): Ditto.
(operator_lt::op1_op2_relation): Ditto.
(operator_le::op1_op2_relation): Ditto.
(operator_gt::op1_op2_relation): Ditto.
(operator_ge::op1_op2_relation) Ditto.
* range-op-mixed.h (operator_equal::op1_op2_relation): New float
prototype.
(operator_not_equal::op1_op2_relation): Ditto.
(operator_lt::op1_op2_relation): Ditto.
(operator_le::op1_op2_relation): Ditto.
(operator_gt::op1_op2_relation): Ditto.
(operator_ge::op1_op2_relation): Ditto.
* range-op.cc (range_op_handler::op1_op2_relation): Dispatch new
variations.
(range_operator::op1_op2_relation): Add extra params.
(operator_equal::op1_op2_relation): Ditto.
(operator_not_equal::op1_op2_relation): Ditto.
(operator_lt::op1_op2_relation): Ditto.
(operator_le::op1_op2_relation): Ditto.
(operator_gt::op1_op2_relation): Ditto.
(operator_ge::op1_op2_relation): Ditto.
* range-op.h (range_operator): New prototypes.
(range_op_handler): Ditto.
Diffstat (limited to 'gcc/gimple-range-gori.cc')
-rw-r--r-- | gcc/gimple-range-gori.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/gimple-range-gori.cc b/gcc/gimple-range-gori.cc index c37e54b..51fb542 100644 --- a/gcc/gimple-range-gori.cc +++ b/gcc/gimple-range-gori.cc @@ -627,7 +627,10 @@ gori_compute::compute_operand_range (vrange &r, gimple *stmt, // likely to be more applicable. if (op1 && op2) { - relation_kind k = handler.op1_op2_relation (lhs); + Value_Range r1, r2; + r1.set_varying (TREE_TYPE (op1)); + r2.set_varying (TREE_TYPE (op2)); + relation_kind k = handler.op1_op2_relation (lhs, r1, r2); if (k != VREL_VARYING) { vrel.set_relation (k, op1, op2); |