RFR: 8325252: C2 SuperWord: refactor the packset [v4]
Emanuel Peter
epeter at openjdk.org
Wed Mar 27 15:25:33 UTC 2024
On Wed, 27 Mar 2024 08:32:58 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.hpp line 69:
>
>> 67: // Doubly-linked pairs. If not linked: -1
>> 68: GrowableArray<int> _left_to_right; // bb_idx -> bb_idx
>> 69: GrowableArray<int> _right_to_left; // bb_idx -> bb_idx
>
> I think it's a good solution but still found myself revisiting this several times while looking at the methods below how it works. Would it maybe help to give a visual example? For example:
>
>
> left_to_right:
> index: 0 1 2 3
> value: | -1 | 3 | -1 | -1 | ...
>
> => Node with bb_idx 1 is in the left slot of a pair which has the node with bb_idx 3 in the right slot.
> => Nodes with bb_idx 0, 2, and 3 are not found in a left slot of any pair.
>
> right_to_left:
> index: 0 1 2 3
> value: | -1 | -1 | -1 | 1 | ...
>
> => Node with bb_idx 3 is in the right slot of a pair which has the node with bb_idx 1 in the left slot.
> => Nodes with bb_idx 0, 1, and 2 are not found in a right slot of any pair.
> ```
Great idea, I made a slightly more complex example, inspired by yours!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18276#discussion_r1541332549
More information about the hotspot-compiler-dev
mailing list