RFR: 8325746: Refactor Loop Unswitching code [v3]

Christian Hagedorn chagedorn at openjdk.org
Wed Feb 14 14:47:12 UTC 2024


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

>> Christian Hagedorn has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Suggestions by Emanuel
>
> src/hotspot/share/opto/loopUnswitch.cpp line 66:
> 
>> 64: //      else                                                   Assertion Predicates]             Assertion Predicates]
>> 65: //        // could be empty                                         |                                  |
>> 66: //        [else-block]                                        True-Path-Loop                    False-Path-Loop
> 
> Could it also be the other way around, that the if-path is empty but the else-path has code?

Yes definitely, but this is more a reflection of Java code where you always have an if block but not always an else block. But it might be cleaner to just remove the "could be empty" comment and make it explicit and not worry about whether one block is empty. I'll do that. The image should just give a hint :-)

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

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


More information about the hotspot-compiler-dev mailing list