RFR: 8331168: Introduce PredicateEntryIterator to iterate through predicate entries
Christian Hagedorn
chagedorn at openjdk.org
Fri Jun 14 08:01:41 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
src/hotspot/share/opto/loopnode.cpp line 178:
> 176: // that doesn't branch to an UNC, we stop. The code that process
> 177: // expensive nodes will notice the loop and skip over it to try to
> 178: // move the node further up.
Note: in the code below we skip any If with UCT and not only predicates with an UCT. I therefore left the code as is as it does not fit into the predicate classes per se.
src/hotspot/share/opto/predicates.cpp line 75:
> 73: }
> 74:
> 75: Deoptimization::DeoptReason RuntimePredicate::uncommon_trap_reason(IfProjNode* if_proj) {
-> `RegularPredicateWithUCT::uncommon_trap_reason()`
src/hotspot/share/opto/predicates.cpp line 83:
> 81: }
> 82:
> 83: bool RuntimePredicate::is_success_proj(Node* node, Deoptimization::DeoptReason deopt_reason) {
-> `RegularPredicateWithUCT::is_predicate()`
src/hotspot/share/opto/predicates.hpp line 237:
> 235: static bool is_predicate(Node* node, Deoptimization::DeoptReason deopt_reason);
> 236: };
> 237:
Classes to better show the intent.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19716#discussion_r1639423389
PR Review Comment: https://git.openjdk.org/jdk/pull/19716#discussion_r1639426491
PR Review Comment: https://git.openjdk.org/jdk/pull/19716#discussion_r1639425807
PR Review Comment: https://git.openjdk.org/jdk/pull/19716#discussion_r1639426938
More information about the hotspot-compiler-dev
mailing list