RFR(L): 8074981 (Integer/FP scalar reduction optimization )
Filipp Zhinkin
filipp.zhinkin at gmail.com
Thu Mar 19 07:54:53 UTC 2015
Michael,
I've got it, thank you for explanation.
Regards,
Filipp.
On Wed, Mar 18, 2015 at 5:53 PM, Berg, Michael C
<michael.c.berg at intel.com> wrote:
> Filipp, for large iteration loops, if I am taking your meaning correctly, you could not do that without splitting the loop and re-architecting it into a loop nest pair to manage the reduction components. Seems like the overhead from that scenario could create cost issues where reductions could actually hamper performance in small vector expressions. Right now we never degrade and generally benefit with the implementation as it stands with the reductions stitched into the vector unit computations directly.
>
> Regarding sub/div/etc:
> For now we have waived off on non-commuting operations like sub and div, they would have to be very strictly managed via pack-set placement. But the answer is yes we could support them.
>
> Thanks,
> -Michael
>
> -----Original Message-----
> From: Filipp Zhinkin [mailto:filipp.zhinkin at gmail.com]
> Sent: Wednesday, March 18, 2015 2:20 AM
> To: Berg, Michael C
> Cc: hotspot-compiler-dev at openjdk.java.net
> Subject: Re: RFR(L): 8074981 (Integer/FP scalar reduction optimization )
>
> Hi Michael,
>
> thank you for contributing such a great improvement!
>
> Sorry if my question is silly, but I'm curious wouldn't it be better to replace integer scalar reduction variable with a vector "Rv" in loop's prologue, compile loop's body as a regular vectorized addition/multiplication, and reduce "Rv" to a scalar in loop's epilogue?
>
> Why you didn't add SubReduction* nodes?
>
> Best regards,
> Filipp.
>
>
> On Tue, Mar 17, 2015 at 12:40 AM, Berg, Michael C <michael.c.berg at intel.com> wrote:
>> Hi All,
>>
>>
>>
>> We would like to contribute the Integer/FP scalar reduction
>> optimization from Intel.
>>
>> The contribution is referenced as Bug ID 8074981 as a performance
>> enhancement.
>>
>>
>>
>> Please review this patch:
>>
>> Bug-id: https://bugs.openjdk.java.net/browse/JDK-8074981
>>
>> webrev:
>> https://bugs.openjdk.java.net/secure/attachment/26101/webrev.zip
>>
>>
>>
>> The optimization achieves as much as 2.3x on integer reductions and
>> supports float and double precision optimizations
>>
>> which also have significant optimization uplift an obey strict fp
>> constraints.
>>
>>
>>
>> Nils Eliasson has offered to sponsor this patch.
>>
>>
>>
>> Thanks,
>>
>>
>>
>> -Michael
>>
>>
More information about the hotspot-compiler-dev
mailing list