Integrated: 8334571: Extract control dependency rewiring out of PhaseIdealLoop::dominated_by() into separate method

Christian Hagedorn chagedorn at openjdk.org
Mon Jun 24 09:01:24 UTC 2024


On Thu, 20 Jun 2024 14:24:23 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

> This is another patch split off from the full Assertion Predicates fix.
> 
> `PhaseIdealLoop::dominated_by()` only works for an `IfNode` that dominates another `IfNode`. However, at some point, we want to replace the two `IfNodes` that are generated as Template Assertion Predicate for a hoisted range check with a single dedicated `TemplateAssertionPredicateNode`. To still be able to rewire the control dependencies in Loop Predication from the hoisted range check to the new `TemplateAssertionPredicateNode` outside the loop (instead of to the second `IfNode` projection of the Template Assertion Predicate as done today), we can extract the rewiring part out of `dominated_by()` into a separate method `rewire_safe_outputs_to_dominator()` and use that one instead.
> 
> We get the following in Loop Predication:
> - Invariant checks: Still use `dominated_by()` which calls `rewire_safe_outputs_to_dominator()`
> - Range checks: Use `eliminate_hoisted_range_check()` which calls `rewire_safe_outputs_to_dominator()`.
> 
> Thanks,
> Christian

This pull request has now been integrated.

Changeset: ca5a438e
Author:    Christian Hagedorn <chagedorn at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/ca5a438e5a4612c66f70c70a9d425eca0e49e84d
Stats:     68 lines in 3 files changed: 29 ins; 12 del; 27 mod

8334571: Extract control dependency rewiring out of PhaseIdealLoop::dominated_by() into separate method

Reviewed-by: roland, kvn

-------------

PR: https://git.openjdk.org/jdk/pull/19806


More information about the hotspot-compiler-dev mailing list