RFR: 8324751: C2 SuperWord: Aliasing Analysis runtime check [v10]

Vladimir Kozlov kvn at openjdk.org
Tue Aug 19 16:05:50 UTC 2025


On Mon, 18 Aug 2025 14:50:20 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>>> @eme64 did you measure how much C2 compilation time changed with these changes (all optimizations enabled)?
>> 
>> I did not. I don't think it would take much extra time in almost all cases. The extra analysis is not that costly compared to unrolling that we do in all cases already. What might cost more: if we deopt because of the runtime check, and recompile with multiversioning. That could essencially double C2 compile time for those cases.
>> 
>> Do you think it is worth it to benchmark now, or should be just rely on @robcasloz 's occasional benchmarking and address the issues if they come up?
>> 
>> If you want me to do C2 time benchmarking: should I just show a few specific micro-benchmarks, or do you want to have statistics collected on larger benchmark suites?
>
>> Do you think it is worth it to benchmark now, or should be just rely on @robcasloz 's occasional benchmarking and address the issues if they come up?
> 
> I am fine with using Roberto's benchmarking later. Just keep eye on it.

> @vnkozlov I ran some more benchmarks:

Thank you for running benchmarks. Which one you check first for aliasing code: multiversioning or predicates?

>From this experiments I think the best sequence would be (when both predicates and multiversioning are enabled):
 - use predicates for aliasing (fast compilation, small code)
 - if it is deoptimized recompile with multiversioning
 
 Is this how it works now?

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

PR Comment: https://git.openjdk.org/jdk/pull/24278#issuecomment-3201340811


More information about the hotspot-compiler-dev mailing list