[jdk16] RFR: 8260370: C2: LoopLimit node is not eliminated

Vladimir Kozlov kvn at openjdk.java.net
Tue Jan 26 17:29:46 UTC 2021


On Tue, 26 Jan 2021 16:54:48 GMT, Vladimir Ivanov <vlivanov 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()?

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

Marked as reviewed by kvn (Reviewer).

PR: https://git.openjdk.java.net/jdk16/pull/134


More information about the hotspot-compiler-dev mailing list