[PATCH][VECTORIZER] Refactor ReductionDescriptor to also support floating-point recurrences

Tyler Nowicki tnowicki at apple.com
Sat Jun 13 18:58:53 PDT 2015


Hi,

Could get a review of these patches?

Thanks,

Tyler

> On Jun 7, 2015, at 12:54 PM, Tyler Nowicki <tnowicki at apple.com> wrote:
> 
> Hi,
> 
> I would appreciate a review of this refactoring.
> 
> Thanks,
> 
> Tyler
> 
>> On Jun 3, 2015, at 1:56 PM, Tyler Nowicki <tnowicki at apple.com <mailto:tnowicki at apple.com>> wrote:
>> 
>> Hi Hal,
>> 
>> Thanks for the review.
>> 
>> I’ve made the changes you asked for. Here are the patches. Soon I’ll start another thread for a patch builds on these to identify basic recurrences that are not reductions.
>> 
>> Thanks,
>> 
>> Tyler
>> 
>> <0001-Renamed-reduction-structures-to-recurrence-structure.patch>
>> <0002-Moved-RecurrenceInstDesc-into-RecurrenceDescriptor.patch>
>> 
>>> On Jun 1, 2015, at 5:55 AM, Hal Finkel <hfinkel at anl.gov <mailto:hfinkel at anl.gov>> wrote:
>>> 
>>> Hi Tyler,
>>> 
>>> Most of this patch seems to be renaming reduction -> recurrence, but there are some extra changes. I don't object to changing the name, a reduction (in our sense) is a special case of a recurrence relation, and I'd certainly like to see the more-general case handled, however:
>>> 
>>> 1. Please provide one patch which just changes the name, and a second patch with the other changes
>>> 
>>> 2. Please add in a comment somewhere (maybe near the definition of RecurrenceInstDesc) that reductions are a special case of the recurrences with the name change. That way someone looking for the word 'reduction' will find it and can easily figure out what is going on.
>>> 
>>> -Hal
>>> 
>>> ----- Original Message -----
>>>> From: "Tyler Nowicki" <tnowicki at apple.com <mailto:tnowicki at apple.com>>
>>>> To: llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
>>>> Sent: Thursday, May 28, 2015 8:35:08 PM
>>>> Subject: [PATCH][VECTORIZER] Refactor ReductionDescriptor to also support	floating-point recurrences
>>>> 
>>>> 
>>>> 
>>>> Hello,
>>>> 
>>>> Here is a patch refactoring ReductionDescriptor used by the loop
>>>> vectorizer. Currently we cannot vectorize loops with floating-point
>>>> recurrences that are not reductions. For example:
>>>> 
>>>> double s = 0.0, v = 0.0;
>>>> for(int i = 0; i < n; i++) {
>>>> v = v + 1.5;
>>>> s = s + v;
>>>> }
>>>> return s;
>>>> 
>>>> ’s' is a reduction, but the vectorizer cannot identify ‘v' as a
>>>> reduction so it fails.
>>>> 
>>>> My plan is to vectorize these loops by including methods for
>>>> identifying floating-point recurrences and creating a
>>>> RecurrenceDescriptor for each that will be used to generate
>>>> vectorized code in the loop vectorizer.
>>>> 
>>>> Any comments or suggestions on this plan would be appreciated.
>>>> 
>>>> Tyler
>>>> 
>>>> _______________________________________________
>>>> llvm-commits mailing list
>>>> llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits <http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
>>>> 
>>> 
>>> -- 
>>> Hal Finkel
>>> Assistant Computational Scientist
>>> Leadership Computing Facility
>>> Argonne National Laboratory
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150613/7715a1c3/attachment.html>


More information about the llvm-commits mailing list