RFR: 8257057: C2: Improve safepoint processing during vector scalarization pass
Vladimir Ivanov
vlivanov at openjdk.java.net
Thu Nov 26 17:39:01 UTC 2020
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
-------------
Commit messages:
- Improve safepoint processing during vector scalarization pass.
Changes: https://git.openjdk.java.net/jdk/pull/1456/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1456&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8257057
Stats: 20 lines in 1 file changed: 9 ins; 0 del; 11 mod
Patch: https://git.openjdk.java.net/jdk/pull/1456.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1456/head:pull/1456
PR: https://git.openjdk.java.net/jdk/pull/1456
More information about the hotspot-compiler-dev
mailing list