[PATCH] [Polly] Data flow reduction detection
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
+ 7 Test cases to show the potential and limits of this detection.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 34117 bytes
Desc: not available
More information about the llvm-commits