RFR: 8325155: C2 SuperWord: remove alignment boundaries [v2]

Emanuel Peter epeter at openjdk.org
Tue May 28 17:28:39 UTC 2024


On Mon, 27 May 2024 12:42:46 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 25 commits:
>> 
>>  - Merge branch 'master' into JDK-8325155-rm-alignment-boundaries
>>  - rm TODO
>>  - manual merge
>>  - revert a line, need to fix it different
>>  - improve comments
>>  - fix alignment
>>  - fix reductions
>>  - MaxI reduction over chars
>>  - Merge branch 'master' into JDK-8325155-rm-alignment-boundaries
>>  - Merge branch 'master' into JDK-8325155-rm-alignment-boundaries
>>  - ... and 15 more: https://git.openjdk.org/jdk/compare/c4867c62...82c9a77a
>
> src/hotspot/share/opto/superword.cpp line 495:
> 
>> 493: 
>> 494:   // Collect all valid VPointers.
>> 495:   for_each_mem([&] (const MemNode* mem, int bb_idx) {
> 
> The different parts of this method could be nicely put into separate methods which reduces the size of `find_adjacent_memop_pairs()`.
> 
> 
> GrowableArray<const VPointer*> vpointers;
> collect_valid_vpointers(vpointers);
> vpointers.sort();
> // trace code
> find_adjacent_memops(vpointers);
> // trace code
> 
> The entire "find adjacent memop pairs" code could also be put into a separate class but I leave it up to you to decide if it's worth or not.

A class would be nice, but I think I would have to pass around too much for that.
`find_adjacent_memop_pairs_in_one_group` requires some things like:

_do_vector_loop
same_origin_idx
can_pack_into_pair // especially this one

Not sure it is worth creating a separate class, I think it would become more complicated that way.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18822#discussion_r1617661935


More information about the hotspot-compiler-dev mailing list