RFR: 8254317: C2: Resource consumption of ConvI2LNode::Ideal() grows exponentially [v3]
Roberto Castañeda Lozano
rcastanedalo at openjdk.java.net
Thu Oct 22 16:33:32 UTC 2020
> 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.
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/727/files
- new: https://git.openjdk.java.net/jdk/pull/727/files/b5cf7aab..d5747965
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=727&range=02
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=727&range=01-02
Stats: 93 lines in 1 file changed: 33 ins; 7 del; 53 mod
Patch: https://git.openjdk.java.net/jdk/pull/727.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/727/head:pull/727
PR: https://git.openjdk.java.net/jdk/pull/727
More information about the hotspot-compiler-dev
mailing list