RFR: 8254317: C2: Resource consumption of ConvI2LNode::Ideal() grows exponentially [v3]

Vladimir Kozlov kvn at openjdk.java.net
Thu Oct 22 17:06:11 UTC 2020


On Thu, 22 Oct 2020 16:33:32 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

>> Prevent exponential number of calls to `ConvI2LNode::Ideal()` when AddIs are used multiple times by other AddIs in the optimization ConvI2L(AddI(x, y)) -> AddL(ConvI2L(x), ConvI2L(y)). This is achieved by (1) reusing existing ConvI2Ls if possible rather than eagerly creating new ones and (2) postponing the optimization of newly created ConvI2Ls. Remove hook node solution introduced in [8217359](https://github.com/openjdk/jdk/commit/cf554816d1952f722143e9d03ec669e80f955adf), since this is subsumed by (2). Use `phase->is_IterGVN()` rather than `can_reshape` to check if `ConvI2LNode::Ideal()` is called within iterative GVN, for clarity. Add regression tests that cover different shapes and sizes of AddI subgraphs, implicitly checking (by not timing out) that there is no combinatorial explosion.
>
> Roberto Castañeda Lozano has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update tests
>   
>   Simplify JVM arguments and run each test case 100000 times to still trigger
>   C2. Use randomization to avoid constant propagation in C2. Increase the load of
>   the stress tests and their timeout to 30s to further reduce the risk of false
>   positives.

Good. Thanks!

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

Marked as reviewed by kvn (Reviewer).

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


More information about the hotspot-compiler-dev mailing list