RFR: 8326962: C2 SuperWord: cache VPointer [v4]
Christian Hagedorn
chagedorn at openjdk.org
Wed Apr 3 06:41:00 UTC 2024
On Tue, 2 Apr 2024 16:12:23 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> src/hotspot/share/opto/vectorization.cpp line 184:
>>
>>> 182: }
>>> 183:
>>> 184: void VLoopPointers::compute_and_cache() {
>>
>> Could be split into something like:
>>
>> allocate_pointer_memory();
>> initialize_pointers();
>> trace_pointers();
>>
>> where allocate_pointer_memory():
>> number_of_pointers = compute_number_of_pointers();
>> uint bytes = number_of_pointers * sizeof(VPointer);
>> _pointers = (VPointer*)_arena->Amalloc(bytes);
>
> With the new `for_each_mem`, the code is already much easier to read. I don't know if splitting it further would really help now?
That's already better!
My general take on that is when I see:
// Do x
// Do y
// Do z
it suggests that it should actually be
x();
y();
z();
But that's just my personal preference :-)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18577#discussion_r1548995281
More information about the hotspot-compiler-dev
mailing list