RFR: 8310190: C2 SuperWord: AlignVector is broken, generates misaligned packs [v21]

Emanuel Peter epeter at openjdk.org
Wed Dec 6 16:06:52 UTC 2023


On Mon, 4 Dec 2023 12:56:17 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Suggestions by Christian for naming
>
> src/hotspot/share/opto/superword.cpp line 1628:
> 
>> 1626:   int element_size  = mem_ref->memory_size();
>> 1627:   int vw            = pack_size * element_size;         // vector_width
>> 1628:   int aw            = MIN2(vw, ObjectAlignmentInBytes); // alignment_width
> 
> Is there a specific reason to go with `vw` and `aw` instead of directly naming the variable `vector_width` and `alighment_width`?

I replaced `vw` with `vector_width`, there were relatively few occurances. But if I replace `aw` with `alighment_width` then everything becomes much more "wordy", all lines become much longer. I would like to keep `aw`, I think it is much more readable then the long form. What do you think?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14785#discussion_r1417592584


More information about the hotspot-compiler-dev mailing list