llvm-project/polly
Tobias Grosser e42ddb9ad3 ScopInfo: Split start value from SCEVAddRecExpr to enable parameter sharing.
SCoP invariant parameters with the different start value would deter parameter
sharing. For example, when compiling the following C code:

  void foo(float *input) {
    for (long j = 0; j < 8; j++) {
      // SCoP begin
      for (long i = 0; i < 8; i++) {
        float x = input[j * 64 + i + 1];
        input[j * 64 + i] = x * x;
      }
    }
  }

Polly would creat two parameters for these memory accesses:

    p_0: {0,+,256}
    p_2: {4,+,256}
    [j * 64 + i + 1] => MemRef_input[o0] : 4o0 = p_1 + 4i0
    [j * 64 + i]     => MemRef_input[o0] : 4o0 = p_0 + 4i0

These parameters only differ from start value. To enable parameter sharing,
we split the start value from SCEVAddRecExpr, so they would share a single
parameter that always has zero start value:

    p0: {0,+,256}<%for.cond1.preheader>
    [j * 64 + i + 1] => MemRef_input[o0] : 4o0 = 4 + p_1 + 4i0
    [j * 64 + i]     => MemRef_input[o0] : 4o0 = p_0 + 4i0

Such translation can make the polly-dependence much faster.

Contributed-by: Star Tan <tanmx_star@yeah.net>
llvm-svn: 187728
2013-08-05 15:14:15 +00:00
..
autoconf [autoconf/cmake] Make sure we detect the latest version of isl. 2013-07-02 14:11:32 +00:00
cmake [autoconf/cmake] Make sure we detect the latest version of isl. 2013-07-02 14:11:32 +00:00
docs
include BlockGenerator: Split getNewValue. 2013-07-25 09:12:07 +00:00
lib ScopInfo: Split start value from SCEVAddRecExpr to enable parameter sharing. 2013-08-05 15:14:15 +00:00
test ScopInfo: Split start value from SCEVAddRecExpr to enable parameter sharing. 2013-08-05 15:14:15 +00:00
tools Reformat with clang-format 2013-05-07 07:30:56 +00:00
utils Convert line endings to unix style 2013-07-25 03:02:26 +00:00
www Remove .htaccess file 2013-05-21 11:58:47 +00:00
.gitattributes gitattributes: .png and .txt are no text files 2013-07-28 09:05:20 +00:00
CMakeLists.txt cmake: Add target to reformat with clang-format 2013-05-07 07:30:31 +00:00
CREDITS.txt (Test commit for polly) 2011-07-16 13:30:03 +00:00
LICENSE.txt Update the copyright coredits -- Happy new year 2013! 2013-01-01 10:00:19 +00:00
Makefile Revert "Fix a bug introduced by r153739: We are not able to provide the correct" 2012-04-11 07:43:13 +00:00
Makefile.common.in 'chmod -x' on files that do not need the executable bits 2012-12-29 15:09:03 +00:00
Makefile.config.in 'chmod -x' on files that do not need the executable bits 2012-12-29 15:09:03 +00:00
README Trivial change to the README, mainly to test commit access. 2012-10-09 04:59:42 +00:00
configure [autoconf/cmake] Make sure we detect the latest version of isl. 2013-07-02 14:11:32 +00:00

README

Polly - Polyhedral optimizations for LLVM
-----------------------------------------
http://polly.llvm.org/

Polly uses a mathematical representation, the polyhedral model, to represent and
transform loops and other control flow structures. Using an abstract
representation it is possible to reason about transformations in a more general
way and to use highly optimized linear programming libraries to figure out the
optimal loop structure. These transformations can be used to do constant
propagation through arrays, remove dead loop iterations, optimize loops for
cache locality, optimize arrays, apply advanced automatic parallelization, drive
vectorization, or they can be used to do software pipelining.