RFR: 8325746: Refactor Loop Unswitching code [v4]

Christian Hagedorn chagedorn at openjdk.org
Mon Feb 26 11:36:33 UTC 2024


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

>> Christian Hagedorn has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Change block -> path
>
> src/hotspot/share/opto/loopUnswitch.cpp line 207:
> 
>> 205: // becomes the false-path-loop while original loop becomes the true-path-loop.
>> 206: class OriginalLoop : public StackObj {
>> 207:   LoopNode* const _strip_mined_loop_head;
> 
> Suggestion:
> 
>   LoopNode* const _loop_head; // OuterStripMinedLoopNode if loop strip mined, else just the loop head.

Done

> src/hotspot/share/opto/loopUnswitch.cpp line 214:
> 
>> 212:  public:
>> 213:   OriginalLoop(IdealLoopTree* loop, Node_List& old_new)
>> 214:       : _strip_mined_loop_head(loop->_head->as_Loop()->skip_strip_mined()),
> 
> Hmm. this could now be a strip mined loop node, or a regular loop node (if loop not strip mined), right?
> Maybe you could just call it `_loop_head`, and leave a comment, see suggestion above.

Good point. Fixed.

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

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


More information about the hotspot-compiler-dev mailing list