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 11:19:23 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> src/hotspot/share/opto/loopUnswitch.cpp line 262:
>>
>>> 260: if (loop_head->is_CountedLoop() && !loop_head->as_CountedLoop()->is_normal_loop()) {
>>> 261: loop_head->as_CountedLoop()->set_normal_loop();
>>> 262: }
>>
>> Suggestion:
>>
>> void PhaseIdealLoop::revert_to_normal_loop(const LoopNode* loop_head) {
>> CountedLoopNode* cl = loop_head->isa_CountedLoop();
>> if (cl != nullptr && !cl->is_normal_loop()) {
>> cl->set_normal_loop();
>> }
>
> Would make the code easier to read
I just moved the code but I can clean it up as you suggested.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17842#discussion_r1489334557
More information about the hotspot-compiler-dev
mailing list