Track value_relations in GORI.
authorAndrew MacLeod <amacleod@redhat.com>
Thu, 22 Sep 2022 21:55:56 +0000 (17:55 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Thu, 29 Sep 2022 22:34:18 +0000 (18:34 -0400)
commit431cdfbea1f8c452f581ec3974f2581addec9ac7
tree74ada03e4fa453319a778360f865975f3d53f95f
parentcfa7434c4b09e439ae8b904ad116adf6d3033f8c
Track value_relations in GORI.

This allows GORI to recognize and pass relations along the calculation chain.
This will allow relations between the LHS and the operand being calculated
to be utilized in op1_range and op2_range.

* gimple-range-gori.cc (ori_compute::compute_operand_range):
Create a relation record and pass it along when possible.
(gori_compute::compute_operand1_range): Pass relation along.
(gori_compute::compute_operand2_range): Ditto.
(gori_compute::compute_operand1_and_operand2_range): Ditto.
* gimple-range-gori.h (class gori_compute): Adjust prototypes.
* gimple-range-op.cc (gimple_range_op_handler::calc_op1): Pass
relation to op1_range call.
(gimple_range_op_handler::calc_op2): Pass relation to op2_range call.
* gimple-range-op.h (class gimple_range_op_handler): Adjust
prototypes.
gcc/gimple-range-gori.cc
gcc/gimple-range-gori.h
gcc/gimple-range-op.cc
gcc/gimple-range-op.h