]> git.ipfire.org Git - thirdparty/gcc.git/commit
Avoid redundant GORI calcuations.
authorAndrew MacLeod <amacleod@redhat.com>
Thu, 22 Jun 2023 14:00:12 +0000 (10:00 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Mon, 26 Jun 2023 13:26:39 +0000 (09:26 -0400)
commit4dfeb1cd8dfca234186216d891ec8f46235c3a14
tree48dc950a1249d0deac49a0e7cf1eb862ce651abb
parent9302b0743b366037379af0568534c23ab597b4d4
Avoid redundant GORI calcuations.

When GORI evaluates a statement, if operand 1 and 2 are both in the
dependency chain, GORI evaluates the name through both operands sequentially
and combines the results.

If either operand is in the dependency chain of the other, this
evaluation will do the same work twice, for questionable gain.
Instead, simple evaluate only the operand which depends on the other
and keep the evaluation linear in time.

* gimple-range-gori.cc (compute_operand1_and_operand2_range):
Check for interdependence between operands 1 and 2.
gcc/gimple-range-gori.cc