RFR(S): 8175096: Use Subword Analysis for set vector size
Deshpande, Vivek R
vivek.r.deshpande at intel.com
Fri May 19 20:27:52 UTC 2017
Hi Vladimir
Thanks for taking a look at the patch.
I will take a look at your example and work on improving the patch.
Also work on the suggestion of different vector elements counts for different types.
Regards,
Vivek
-----Original Message-----
From: Vladimir Kozlov [mailto:vladimir.kozlov at oracle.com]
Sent: Friday, May 19, 2017 12:17 PM
To: Deshpande, Vivek R; Berg, Michael C; hotspot-compiler-dev at openjdk.java.net
Cc: Viswanathan, Sandhya
Subject: Re: RFR(S): 8175096: Use Subword Analysis for set vector size
I have time to look on this again. And I don't see that patch helps. See my comments in the bug report.
Regards,
Vladimir
On 2/24/17 10:56 AM, Deshpande, Vivek R wrote:
> Hi Vladimir
>
> Subwords get converted to int by broadening for the operations on them and max_vector gets set according to int, even if there are no mixed type operations, leading to short vector width instructions.
>
> Regards,
> Vivek
>
>
> -----Original Message-----
> From: Vladimir Kozlov [mailto:vladimir.kozlov at oracle.com]
> Sent: Friday, February 24, 2017 10:07 AM
> To: Berg, Michael C; Deshpande, Vivek R;
> hotspot-compiler-dev at openjdk.java.net
> Cc: Viswanathan, Sandhya
> Subject: Re: RFR(S): 8175096: Use Subword Analysis for set vector size
>
> On 2/23/17 9:03 AM, Berg, Michael C wrote:
>> I think using the current approach is the best way, it find the consistent shared vectorsize that is optimal for the loop for unrolling to act to. This additional approach augments that by some testing of constraints as the subword types are often occluded by sign and zero extension artifacts that would otherwise have caused the next common size to surface. These subword types are only in the integer subtype domain.
>
> "optimal" has wide meaning :)
>
> Currently it means small number of unrolls in presence of wide (long,
> double) values.
>
> And if it is optimal why we need this additional fix (8175096)?
>
> I still did not get answer about why "Currently subword types cannot use entire vector width using SLP". In what cases this happen?
>
> Thanks,
> Vladimir
>
>>
>> Regards,
>> Michael
>>
>> -----Original Message-----
>> From: Vladimir Kozlov [mailto:vladimir.kozlov at oracle.com]
>> Sent: Wednesday, February 22, 2017 12:09 PM
>> To: Deshpande, Vivek R <vivek.r.deshpande at intel.com>;
>> hotspot-compiler-dev at openjdk.java.net
>> Cc: Viswanathan, Sandhya <sandhya.viswanathan at intel.com>; Berg,
>> Michael C <michael.c.berg at intel.com>
>> Subject: Re: RFR(S): 8175096: Use Subword Analysis for set vector
>> size
>>
>> Hi Vivek,
>>
>> This should go into jdk 10 since it is enhancement. We will consider to backport it into jdk 9 update release later.
>>
>> First, please explain why "Currently subword types cannot use entire vector width using SLP".
>>
>> The only explanation I have is that if loop has mixing types operations then we narrow unroll factor for biggest type:
>>
>> if (cur_max_vector < max_vector) {
>> max_vector = cur_max_vector;
>>
>> And we start with smallest type:
>>
>> int max_vector = Matcher::max_vector_size(T_BYTE);
>>
>> Should we do opposite and start from long T_LONG (small unroll factor) and widen it to smallest type (big unroll factor)?:
>>
>> if (cur_max_vector > max_vector) {
>> max_vector = cur_max_vector;
>>
>> Note, max_vector_size() returns number of elements and not size of vector in bytes.
>>
>> Michael, you are author of this code. What do you think?
>>
>> Thanks,
>> Vladimir
>>
>> On 2/16/17 11:45 AM, Deshpande, Vivek R wrote:
>>> Hi
>>>
>>>
>>>
>>> Currently subword types cannot use entire vector width using SLP.
>>>
>>> This fix analyzes the subword in the loop for possibility of
>>> narrowing and sets the vector size accordingly.
>>>
>>>
>>>
>>> Webrev:
>>>
>>> http://cr.openjdk.java.net/~vdeshpande/8175096/webrev.00/
>>>
>>> I have also updated the JBS entry.
>>>
>>>c
>>>
>>> Would you please review and sponsor it.
>>>
>>>
>>>
>>> Regards,
>>>
>>> Vivek
>>>
>>>
>>>
More information about the hotspot-compiler-dev
mailing list