RFR: 8257057: C2: Improve safepoint processing during vector scalarization pass
Vladimir Ivanov
vlivanov at openjdk.java.net
Mon Nov 30 10:33:52 UTC 2020
On Mon, 30 Nov 2020 10:12:48 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> Cast nodes (`CheckCastPP`/`CastPP`) hinders scalarization of vectors since they aren't taken into account when affected safepoints are enumerated.
>>
>> Proposed fix implements a reversed variant of `Node::uncast()` to find all safepoints which have vectors referenced from their debug info and then uses `Node::uncast()` when iterating over debug edges. It is safe to ignore cast nodes (even the ones which carry control dependency): `VectorBox` already contains the most precise type information and the vector value it represents is immutable. So, it's safe to replace a fully constructed boxed vector instance with the vector value it contains and rematerialize the equivalent box instance if deoptimization happens.
>>
>> Testing:
>> - `jdk/incubator/vector` tests w/ different flag combinations (no flags, `-Xcomp`, `-XX:+DeoptimizeALot`);
>> - tier1-4
>
> Looks good.
Thanks for the reviews, Vladimir and Tobias.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1456
More information about the hotspot-compiler-dev
mailing list