[Polly] Allow multiple reductions in one statement

Johannes Doerfert jdoerfert at codeaurora.org
Thu Jun 26 12:55:39 PDT 2014


Hey,

 

I attached the patch to allow multiple reductions in one statement. The
dependency analysis changes over the last days allow us to handle them now
without further changes.

 

We discussed already the basic idea but to summarize it:

  Look at each load-store pair in the statement and check if they are
connected by a binary operator which is commutative & associative.

  If the load-store chain looks good we also verify that no other access in
this statement might "interfere", thus it might access the same

 memory locations at some point. This check overestimates the actual problem
but it is an easy way to guarantee no intermediate value

  will escape or be overwritten during the execution. The overestimation
prevents us at the moment to consider statements like

A[i] += A[j] which is a reduction for certain values of I and j but not all.

 

I also attached a couple of test cases as we now are able to detect a lot of
different reductions.

 

I'd like some feedback on this one.

 

Best regards,

  Johannes

 

--

 

Johannes Doerfert

Employee of Qualcomm Innovation Center, Inc.

Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
The Linux Foundation

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140626/a246f4c3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Allow-multiple-reductions-per-statement.patch
Type: application/octet-stream
Size: 56379 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140626/a246f4c3/attachment.obj>


More information about the llvm-commits mailing list