RFR: 8334571: Extract control dependency rewiring out of PhaseIdealLoop::dominated_by() into separate method
Christian Hagedorn
chagedorn at openjdk.org
Fri Jun 21 08:53:12 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
Thanks Roland and Vladimir for your reviews!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19806#issuecomment-2182308400
More information about the hotspot-compiler-dev
mailing list