[aarch64-port-dev ] git: openjdk/aarch64-port: master: 8254317: C2: Resource consumption of ConvI2LNode::Ideal() grows exponentially

Tobias Hartmann thartmann at openjdk.java.net
Wed Nov 11 10:22:43 UTC 2020


Changeset: 432c387e
Author:    Roberto Castañeda Lozano <rcastanedalo at openjdk.org>
Committer: Tobias Hartmann <thartmann at openjdk.org>
Date:      2020-11-11 10:18:36 +0000
URL:       https://github.com/openjdk/aarch64-port/commit/432c387e

8254317: C2: Resource consumption of ConvI2LNode::Ideal() grows exponentially

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, 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.

Co-authored-by: Vladimir Ivanov <vlivanov at openjdk.org>
Reviewed-by: vlivanov, kvn

! src/hotspot/share/opto/convertnode.cpp
+ test/hotspot/jtreg/compiler/conversions/TestMoveConvI2LThroughAddIs.java



More information about the aarch64-port-dev mailing list