RFR: 8308994: C2: Re-implement experimental post loop vectorization [v2]

Pengfei Li pli at openjdk.org
Mon Jul 3 08:34:10 UTC 2023


On Fri, 23 Jun 2023 12:22:14 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Pengfei Li has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Address part of comments from Emanuel
>
> src/hotspot/share/opto/vmaskloop.cpp line 63:
> 
>> 61:   if (cl->is_vector_masked()) return;
>> 62:   // Skip non-post loop
>> 63:   if (!cl->is_post_loop()) return;
> 
> Check before entering, and assert here.

Done

> src/hotspot/share/opto/vmaskloop.hpp line 95:
> 
>> 93:     }
>> 94:     return false;
>> 95:   }
> 
> Do you not want to do this sort of implementation in `SWPointer` instead? There are already methods like `scaled_iv_plus_offset`, so it would fit in next to that, right?

It doesn't fit well as functions in `SWPointer` can only be used for checking the pattern in indices. But this function may be used for checking the loop increment pattern which is not in array indices, perhaps `a[i] = b[i] * (i + 1)`. We don't have `SWPointer` constructed for this. I have rename the function to make the purpose clear.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14581#discussion_r1250480876
PR Review Comment: https://git.openjdk.org/jdk/pull/14581#discussion_r1250480274


More information about the hotspot-compiler-dev mailing list