RFR: 8289943: Simplify some object allocation merges [v11]

Cesar Soares Lucas cslucas at openjdk.org
Thu Oct 6 00:07:56 UTC 2022


On Wed, 5 Oct 2022 22:45:22 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> May for future work based on these benchmarks (and others) we can collect cases when this optimization does not work (or even bailout compilation).

The `TraceReducedAllocationMerges` option prints information about this. I actually have a spreadsheet where I list the cause and frequency of each case where the optimization can not be applied.

> BTW, were you able to remove all allocations in your test run_IfElseInLoop()?

Yes, in that case both allocations are removed. I just confirmed it with a test locally. Also, there is an IR-based test for that case.

> What about test case in https://bugs.openjdk.org/browse/JDK-6853701

The current patch bails out in that test because there is a Phi (or CmpP) consuming the merge Phi. Actually, that code example is one of the tests that I run "internally". There is already work going on to improve the current patch to make it able to handle CmpP with NULL.

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

PR: https://git.openjdk.org/jdk/pull/9073


More information about the hotspot-compiler-dev mailing list