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

Hal Finkel hfinkel at anl.gov
Mon Jun 1 05:55:33 PDT 2015


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>
> To: 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
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory




More information about the llvm-commits mailing list