[PATCH] [Polly] Data flow reduction detection
Johannes Doerfert
doerfert at cs.uni-saarland.de
Thu Sep 4 05:45:32 PDT 2014
Hi grosser, simbuerg, sebpop,
This implements a data flow reduction detection on basic block level.
We propagate the used loads and the number of uses, as well as the kind of
binary operation performed until we reach a store. Using this we lift the
"one binary operator" restriction, thus we can detect the following reductions
withouth normalizing the source code:
sum += A[i]; // Worked already before
sum = sum + A[i]; // Worked already before
sum = A[i] + sum; // Worked already before
sum += A[i] + B[i]; // Works now
sum = A[i] + sum + B[i]; // Works now
sum = (A[i] + (sum + B[i])); // Works now
The analysis information is also interesting to recognize additional idioms
later.
+ 7 Test cases to show the potential and limits of this detection.
http://reviews.llvm.org/D5190
Files:
include/polly/ScopInfo.h
lib/Analysis/ScopInfo.cpp
test/Dependences/reduction_indirect_access.ll
test/ScopInfo/reduction_escaping_intermediate_3.ll
test/ScopInfo/reduction_indirect_access.ll
test/ScopInfo/reduction_indirect_access_2.ll
test/ScopInfo/reduction_long_reduction_chain.ll
test/ScopInfo/reduction_long_reduction_chain_double_use.ll
test/ScopInfo/reduction_multiple_different_operators.ll
test/ScopInfo/reduction_only_reduction_like_access.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5190.13253.patch
Type: text/x-patch
Size: 34117 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140904/aedd6740/attachment.bin>
More information about the llvm-commits
mailing list