RFR: 8366702: C2 SuperWord: refactor VTransform vector nodes [v2]
Emanuel Peter
epeter at openjdk.org
Mon Sep 8 08:28:51 UTC 2025
On Mon, 8 Sep 2025 08:01:52 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> review comment implemented
>
> Nice refactoring! Just some small suggestions, otherwise, it looks good to me.
@chhagedorn Thanks for reviewing! I responded to all your suggestions :)
> src/hotspot/share/opto/superwordVTransformBuilder.cpp line 173:
>
>> 171: vtn = new (_vtransform.arena()) VTransformBoolVectorNode(_vtransform, prototype, kind);
>> 172: } else if (p0->is_CMove()) {
>> 173: vtn = new (_vtransform.arena()) VTransformElementWiseVectorNode(_vtransform, p0->req(), prototype, Op_VectorBlend);
>
> You also seem to use `p0->req()` a lot. Should we create a `const` above for easier access? Could we also have a better name than `p0`? But again, you are using `p0` a lot at other places already and it might be evidently clear in this context.
Personally, I'd like to keep `p0`. An alternative is `first`. Or something even much longer that just inflates the code and does not make it more readable either. We also have `t0` and `s0` all over the SuperWord code. And honestly we do the same in all sorts of IGVN code as well, right?
We could make a `uint req = p0->req()` but I don't think that is more helpful. `req` is not a very great name but we are stuck with it because of the definition in `Node`. Detaching it from `p0` would probably not help but rather make it harder to read.
All of this is rather subjective though :/
If a second reviewer wants to see the change, I propose we do that in a separate RFE, and then consistently over the SuperWord code at large.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27056#issuecomment-3265144091
PR Review Comment: https://git.openjdk.org/jdk/pull/27056#discussion_r2329502044
More information about the hotspot-compiler-dev
mailing list