RFR: 8325746: Refactor Loop Unswitching code [v2]

Christian Hagedorn chagedorn at openjdk.org
Wed Feb 14 11:52:16 UTC 2024


On Wed, 14 Feb 2024 10:41:14 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Christian Hagedorn has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - Update src/hotspot/share/opto/loopUnswitch.cpp
>>    
>>    Co-authored-by: Emanuel Peter <emanuel.peter at oracle.com>
>>  - Apply suggestions from code review
>>    
>>    Co-authored-by: Emanuel Peter <emanuel.peter at oracle.com>
>>  - Apply Emanuel's suggestions
>>    
>>    Co-authored-by: Emanuel Peter <emanuel.peter at oracle.com>
>
> src/hotspot/share/opto/loopUnswitch.cpp line 282:
> 
>> 280:     Node* uniqc = proj_true->unique_ctrl_out();
>> 281:     assert((uniqc == head && !head->is_strip_mined()) || (uniqc == head->in(LoopNode::EntryControl)
>> 282:                                                           && head->is_strip_mined()), "must hold by construction if no predicates");
> 
> Is this code now simply unnecessary?

This is now covered by 


    const Predicates predicates(entry);
    // When skipping all predicates, we should end up at 'loop_selector_if_proj'.
    assert(loop_selector_if_proj == predicates.entry(), "should end up at loop selector If");

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17842#discussion_r1489337863


More information about the hotspot-compiler-dev mailing list