[jdk16] RFR: 8260370: C2: LoopLimit node is not eliminated
Vladimir Ivanov
vlivanov at openjdk.java.net
Tue Jan 26 17:46:42 UTC 2021
On Tue, 26 Jan 2021 17:26:30 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> As part of JDK-8255000 `C->major_progress` check was replaced with an explicit phase check (`post_loop_opts_phase()`).
>> But `LoopLimit` was not covered and still relied on `C->major_progress()`. It exposed a problem: sometimes IGVN sets `major_progress` (e.g., see `LoopNode::Ideal()`) and it blocks `LoopLimit` node elimination if the node is processed later (`LoopLimitNode::Ideal()` is misled that loop opts phase is not over).
>>
>> The fix migrates `LoopLimitNode::Ideal()` to `post_loop_opts_phase()`.
>>
>> Also, post-loop opts IGVN pass conservatively clears `major_progress()` just in case.
>>
>> Testing:
>> - [x] failing test
>> - [x] hs-tier1 - hs-tier4
>
> Looks good.
> Do we have other places where we should replace major_progress()?
Thanks for the prompt review, Vladimir.
> Do we have other places where we should replace major_progress()?
Yes, there's at least one check left (in `SafePointNode::Identity`). I plan to address it separately.
-------------
PR: https://git.openjdk.java.net/jdk16/pull/134
More information about the hotspot-compiler-dev
mailing list