RFR: 8270090: C2: LCM may prioritize CheckCastPP nodes over projections

Roberto Castañeda Lozano rcastanedalo at openjdk.java.net
Thu Apr 7 08:02:42 UTC 2022


On Mon, 28 Mar 2022 10:18:31 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

> This change breaks the tie between top-priority nodes (CreateEx, projections, constants, and CheckCastPP) in LCM, when the node to be scheduled next is selected. The change assigns the highest priority to CreateEx (which must be scheduled at the beginning of its block, right after Phi and Parm nodes), followed by projections (which must be scheduled right after their parents), followed by constant and CheckCastPP nodes (which are given equal priority to preserve the current behavior), followed by the remaining lower-priority nodes.
> 
> The proposed prioritization prevents CheckCastPP from being incorrectly scheduled between a node and its projection. See the [bug description](https://bugs.openjdk.java.net/browse/JDK-8270090) for more details.
> 
> As a side-benefit, the proposed change removes the need of manipulating the ready list order for scheduling of CreateEx nodes correctly.
> 
> #### Testing
> 
> ##### Functionality
> 
> - Original failure on linux-arm (see results [here](https://pici.beachhub.io/#/JDK-8270090/20220325-103958) and [here](https://pici.beachhub.io/#/JDK-8270090-jacoco/20220325-131740), thanks to Marc Hoffmann for setting up a test environment).
> - hs-tier1-5 (windows-x64, linux-x64, linux-aarch64, and macosx-x64; release and debug mode).
> - hs-tier1-3 (windows-x64, linux-x64, linux-aarch64, and macosx-x64; debug mode) with `-XX:+StressLCM` and `-XX:+StressGCM` (5 different seeds).
> 
> Note that the change does not include a regression test, since the failure only seems to be reproducible in ARM32 and I do not have access to this platform. If anyone wants to extract an ARM32 regression test out of the original failure, please let me know and I would be happy to add it to the change.
> 
> ##### Performance
> 
> Tested performance on a set of standard benchmark suites (DaCapo, SPECjbb2015, SPECjvm2008, ...) and on windows-x64, linux-x64, linux-aarch64, and macosx-x64. No significant regression was observed.

Thanks for reviewing, Tobias!

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

PR: https://git.openjdk.java.net/jdk/pull/7988


More information about the hotspot-compiler-dev mailing list