RFR: 8324751: C2 SuperWord: Aliasing Analysis runtime check [v11]
Vladimir Kozlov
kvn at openjdk.org
Tue Aug 19 15:11:53 UTC 2025
On Tue, 19 Aug 2025 06:05:03 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> You did benchmarking for `LoopMultiversioningOptimizeSlowLoop`.
>>
>>> use multiversioning rather than the predicate approach
>>
>> This one.
>>
>> Does alias analysis runtime checks requires both, multiversion and predicate, or can work only with one?
>> If both enabled, which one you select for alias analisys?
>
> I described it at the top of the PR:
>> I am adding a dynamic (runtime) aliasing check to the auto-vectorizer (SuperWord). We use the infrastructure from https://github.com/openjdk/jdk/pull/22016:
>>
>> - Use the auto-vectorization predicate when available: we speculate that there is no aliasing, else we trap and re-compile without the predicate.
>> - If the predicate is not available, we use multiversioning, i.e. we have a fast_loop where there is no aliasing, and hence vectorization. And a slow_loop if the check fails, with no vectorization.
>
> So if only one of them is available, we expect vectorization - at least as long as the check never fails. If we only have the predicate and not multiversioning, and the predicate fails, then we will never get a slow-loop.
>
> But sure, I can run some sanity benchmarking with only multiversioning and predicate disabled. I expect the peek performance to be identical, but compilation time will be slightly higher because we also always compile the slow-loop even if not needed.
I mean, it should be in code's comments. And, yes please run benchmarks with different configuration.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24278#discussion_r2285573823
More information about the hotspot-compiler-dev
mailing list