RFR: 8331168: Introduce PredicateEntryIterator to iterate through predicate entries
Roland Westrelin
roland at openjdk.org
Fri Jun 14 14:58:20 UTC 2024
On Fri, 14 Jun 2024 07:53:01 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
> This is another small PR split off from the complete fix for Assertion Predicates.
>
> Changes include:
> - Replace predicate matching/skipping code in `build_loop_late_post_work()` to use dedicated walker (i.e. new `PredicateEntryIterator` class) which uses predicate classes.
> - New predicate helper classes to improve readability.
> - Simple typos and code style updates.
>
> Thanks,
> Christian
Looks good to me.
src/hotspot/share/opto/loopnode.cpp line 6385:
> 6383: while (predicate_iterator.has_next()) {
> 6384: Node* next_predicate_entry = predicate_iterator.next_entry();
> 6385: if (is_dominator(next_predicate_entry, early) && next_predicate_entry != early) {
Maybe be want a `is_strict_dominator` method?
src/hotspot/share/opto/predicates.cpp line 35:
> 33: Node* AssertionPredicatesWithHalt::find_entry(Node* start_proj) {
> 34: Node* entry = start_proj;
> 35: while (AssertionPredicateWithHalt::is_predicate(entry)) {
Is it `AssertionPredicateWithHalt::is_predicate` instead of simply `is_predicate` on purpose?
-------------
Marked as reviewed by roland (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/19716#pullrequestreview-2118584504
PR Review Comment: https://git.openjdk.org/jdk/pull/19716#discussion_r1639952727
PR Review Comment: https://git.openjdk.org/jdk/pull/19716#discussion_r1639949639
More information about the hotspot-compiler-dev
mailing list