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

Vladimir Ivanov vlivanov at openjdk.java.net
Tue Jan 26 17:18:57 UTC 2021


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

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

Commit messages:
 - 8260370: C2: LoopLimit node is not eliminated

Changes: https://git.openjdk.java.net/jdk16/pull/134/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk16&pr=134&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8260370
  Stats: 9 lines in 2 files changed: 8 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk16/pull/134.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk16 pull/134/head:pull/134

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


More information about the hotspot-compiler-dev mailing list