RFR: 8325252: C2 SuperWord: refactor the packset [v4]
Emanuel Peter
epeter at openjdk.org
Wed Mar 27 15:03:51 UTC 2024
On Wed, 27 Mar 2024 08:19:21 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> use left/right instead of s1/s2 in some obvious simple places
>
> src/hotspot/share/opto/superword.cpp line 2404:
>
>> 2402: for (int i = 0; i < body().length(); i++) {
>> 2403: Node* n = body().at(i);
>> 2404: Node_List* p = _packset.pack(n);
>
> Since you use this pattern a lot, you could also think about having a `SuperWord::pack()` method that delegates to `_packset.pack()`.
Hmm. I tried it, but then we often also have a variable `pack`. So I now changed the `pack(n)` to `get_pack(n)`. I think that is better anyway, it suggests that we "get" something, rather than "pack" something.
> src/hotspot/share/opto/superword.cpp line 3754:
>
>> 3752: }
>> 3753:
>> 3754: void PackSet::print_pack(Node_List* pack) const {
>
> Could also be made static since you don't access any fields.
This is where a `Pack` class would eventually come in quite nicely. But I will change it to static for now.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18276#discussion_r1541288141
PR Review Comment: https://git.openjdk.org/jdk/pull/18276#discussion_r1541290651
More information about the hotspot-compiler-dev
mailing list