RFR: 8254317: C2: Resource consumption of ConvI2LNode::Ideal() grows exponentially
Roberto Castañeda Lozano
rcastanedalo at openjdk.java.net
Mon Oct 19 18:49:18 UTC 2020
On Mon, 19 Oct 2020 15:56:57 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
> 2 concerns with the proposed fix on my side:
>
> * I’m not persuaded that covering “x == y” is enough to completely eliminates the issue;
>
> * The issue demonstrates there’s still a chance to introduce very deep recursion involving `Compile::constrained_convI2L`
> and `PhaseIterGVN` which can cause a crash.
>
>
> IMO the root cause is an eager transformation happening top-down on `ConvI2L` nodes and it defeats memoization GVN
> naturally provides, so it causes a combinatorial explosion. If subsequent `Compile::constrained_convI2L()` calls could
> share the same `ConvI2L` node for the same input, it would be a more reliable fix for the problem. Otherwise, the
> transformation may be extracted from GVN and turned into a separate pass (take a look at
> `Compile::optimize_logic_cones` as an example). Some comments on the tests: (1) please, group the individual test
> cases into a single test class; and (2) I suggest to turn the benchmark into a test case which fails with timeout when
> fix is absent.
Thanks Vladimir for the thorough review! I will explore your suggestions to generalize the fix and see what can be done.
-------------
PR: https://git.openjdk.java.net/jdk/pull/727
More information about the hotspot-compiler-dev
mailing list