Allow multiple reductions per statement
authorJohannes Doerfert <jdoerfert@codeaurora.org>
Fri, 27 Jun 2014 20:31:28 +0000 (20:31 +0000)
committerJohannes Doerfert <jdoerfert@codeaurora.org>
Fri, 27 Jun 2014 20:31:28 +0000 (20:31 +0000)
commite58a0120947d6198381eb3765e9b35050da45e02
treec8191f93a16aa2a0a92523ce085422db5da20bab
parente1c1138a387ee42cdf2dff93b22287339206af53
Allow multiple reductions per statement

  Iterate over all store memory accesses and check for valid binary reduction
  candidate loads by following the operands of the stored value.  For each
  candidate pair we check if they have the same base address and there are no
  other accesses which may overlap with them. This ensures that no intermediate
  value can escape into other memory locations or is overwritten at some point.

  + 17 test cases for reduction detection and reduction dependency modeling

llvm-svn: 211957
22 files changed:
polly/include/polly/ScopInfo.h
polly/lib/Analysis/Dependences.cpp
polly/lib/Analysis/ScopInfo.cpp
polly/test/Dependences/reduction_complex_location.ll [new file with mode: 0644]
polly/test/Dependences/reduction_mixed_reduction_and_non_reduction_dependences.ll [new file with mode: 0644]
polly/test/Dependences/reduction_multiple_loops_array_sum.ll [new file with mode: 0644]
polly/test/Dependences/reduction_multiple_loops_array_sum_2.ll [new file with mode: 0644]
polly/test/Dependences/reduction_multiple_loops_array_sum_3.ll [new file with mode: 0644]
polly/test/Dependences/reduction_partially_escaping_intermediate_in_other_stmt.ll [new file with mode: 0644]
polly/test/Dependences/reduction_two_reductions_different_rloops.ll [new file with mode: 0644]
polly/test/ScopInfo/reduction_alternating_base.ll [new file with mode: 0644]
polly/test/ScopInfo/reduction_disabled_multiplicative.ll [new file with mode: 0644]
polly/test/ScopInfo/reduction_escaping_intermediate.ll [new file with mode: 0644]
polly/test/ScopInfo/reduction_escaping_intermediate_2.ll [new file with mode: 0644]
polly/test/ScopInfo/reduction_invalid_different_operators.ll [new file with mode: 0644]
polly/test/ScopInfo/reduction_invalid_overlapping_accesses.ll [new file with mode: 0644]
polly/test/ScopInfo/reduction_multiple_loops_array_sum.ll [new file with mode: 0644]
polly/test/ScopInfo/reduction_multiple_loops_array_sum_1.ll [new file with mode: 0644]
polly/test/ScopInfo/reduction_multiple_simple_binary.ll [new file with mode: 0644]
polly/test/ScopInfo/reduction_non_overlapping_chains.ll [new file with mode: 0644]
polly/test/ScopInfo/reduction_only_reduction_like_access.ll
polly/test/ScopInfo/reduction_two_identical_reads.ll [new file with mode: 0644]