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

Vladimir Kozlov kvn at openjdk.org
Thu Oct 6 01:29:24 UTC 2022


On Thu, 6 Oct 2022 00:04:12 GMT, Cesar Soares Lucas <cslucas at openjdk.org> wrote:

>> DaCapo and Renaissance are good for testing it I think. That is where I see variations. May be we can try to use `-XX:-TieredCompilation` to see if using only C2 have effect.
>> 
>> It seems we don't have a lot of cases where this optimization helps. May for future work based on these benchmarks (and others) we can collect cases when this optimization does not work (or even bailout compilation).
>> 
>>  BTW, were you able to remove all allocations in your test `run_IfElseInLoop()`?
>> What about  test case in https://bugs.openjdk.org/browse/JDK-6853701
>
>> 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.

@JohnTortugo Looks like your latest change/fix cause new issue. I see GitHub Action testing failed with:

#  Internal Error (/home/runner/work/jdk/jdk/src/hotspot/share/opto/type.hpp:1825), pid=3815, tid=3830
#  assert(_base == Int) failed: Not an Int

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

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


More information about the hotspot-compiler-dev mailing list