RFR: 8341102: Add element type information to vector types [v2]
Quan Anh Mai
qamai at openjdk.org
Sat Sep 28 01:44:54 UTC 2024
> Hi,
>
> This patch adds the type information of each element in a `TypeVect`. This helps constant folding vectors as well as strength reduction of several complex operations such as `Rearrange`. Some notable points:
>
> - I only implement `ConV` rule on x86, looking at other architectures it seems that I would not only need to implement the `ConV` implementations, but several other rules that match `ReplicateNode` of a constant.
> - I changed the implementation of an array constant in `constanttable`, I think working with `jbyte` is easier as it allows `memcpy` and at this point, we are close to the metal anyway.
> - Constant folding for a `VectorUnboxNode`, this is special because an element of a normal stable array is only constant if it is non-zero, so implementing constant folding on a load node seems less trivial.
> - Memory fences because `Vector::payload` is a final field and we should respect that.
> - Several places expect a `const Type*` when in reality it expects a `BasicType`, I refactor that so that the intent is clearer and there is less room for possible errors, this is needed because `byte`, `short` and `int` share the same kind of `const Type*`.
>
> Please take a look and leave your reviews, thanks a lot.
Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
add mask test
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/21229/files
- new: https://git.openjdk.org/jdk/pull/21229/files/c9bc1c4f..cd5123f3
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=21229&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=21229&range=00-01
Stats: 20 lines in 1 file changed: 19 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/21229.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/21229/head:pull/21229
PR: https://git.openjdk.org/jdk/pull/21229
More information about the hotspot-dev
mailing list