RFR: 8341977: Replace predicate walking and cloning code for Loop Peeling with a predicate visitor [v3]

Christian Hagedorn chagedorn at openjdk.org
Mon Oct 28 13:46:42 UTC 2024


On Mon, 28 Oct 2024 13:14:46 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> src/hotspot/share/opto/loopTransform.cpp line 1991:
>> 
>>> 1989:   predicate_iterator.for_each(create_assertion_predicates_for_loop);
>>> 1990:   if (create_assertion_predicates_for_loop.has_created_predicates()) {
>>> 1991:     IfTrueNode* last_created_predicate_success_proj = create_assertion_predicates_for_loop.last_created_success_proj();
>> 
>> Suggestion:
>> 
>>   CreateAssertionPredicatesVisitor create_assertion_predicates_visitor(init, stride, target_loop_entry, this,
>>                                                                         _node_in_loop_body);
>>   Node* source_loop_entry = source_loop_head->skip_strip_mined()->in(LoopNode::EntryControl);
>>   PredicateIterator predicate_iterator(source_loop_entry);
>>   predicate_iterator.for_each(create_assertion_predicates_visitor);
>>   if (create_assertion_predicates_visitor.has_created_predicates()) {
>>     IfTrueNode* last_created_predicate_success_proj = create_assertion_predicates_for_loop.last_created_success_proj();
>
> I think this would complete the renaming

Good catch, fixed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21679#discussion_r1819081000


More information about the hotspot-compiler-dev mailing list