RFR: 8289943: Simplify some object allocation merges [v11]
Quan Anh Mai
qamai at openjdk.org
Thu Oct 6 14:17:21 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 I meant you can specify the warmup iterations for the whole test, not just some methods inside with `TestFramework::setDefaultWarmup`
> 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.
It would be great if you include all known failure cases of scalar replacement in the IR test. Thanks.
-------------
PR: https://git.openjdk.org/jdk/pull/9073
More information about the hotspot-compiler-dev
mailing list