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

Tyler Nowicki tnowicki at apple.com
Thu May 28 18:35:08 PDT 2015


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ReduxDescRefactor.patch
Type: application/octet-stream
Size: 23273 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150528/a31e96b7/attachment.obj>


More information about the llvm-commits mailing list