RFR: 8334571: Extract control dependency rewiring out of PhaseIdealLoop::dominated_by() into separate method
Christian Hagedorn
chagedorn at openjdk.org
Thu Jun 20 14:42:20 UTC 2024
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
-------------
Commit messages:
- code style
- code style
- 8334571: Extract control dependency rewiring out of PhaseIdealLoop::dominated_by() into separate method
Changes: https://git.openjdk.org/jdk/pull/19806/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19806&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8334571
Stats: 68 lines in 3 files changed: 29 ins; 12 del; 27 mod
Patch: https://git.openjdk.org/jdk/pull/19806.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19806/head:pull/19806
PR: https://git.openjdk.org/jdk/pull/19806
More information about the hotspot-compiler-dev
mailing list