From 49a3a7ba20f288bc98f61377eed28ac51bd9ca62 Mon Sep 17 00:00:00 2001 From: Raghesh Aloor Date: Sat, 18 Jun 2011 17:17:16 +0000 Subject: [PATCH] www: Adding webpage to track memory access transformation llvm-svn: 133354 --- polly/www/documentation/memaccess.html | 143 +++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 polly/www/documentation/memaccess.html diff --git a/polly/www/documentation/memaccess.html b/polly/www/documentation/memaccess.html new file mode 100644 index 000000000000..047bf52293ef --- /dev/null +++ b/polly/www/documentation/memaccess.html @@ -0,0 +1,143 @@ + + + + + memaccess.html + + +
Support +for +memory access +transformations in Polly
+
+
This project adds +memory access transformations to Polly. In many cases
+changing the memory access pattern yields to better data +locality or removes
+dependences that would otherwise block +transformations. They may also
+allow LLVM to use registers to store +certain values.
+
+
+An examples which uses this feature is given below
+
+

+Consider the following loop + +
for +(i = 0; i < 8; i++)
+sum += A[i];
+
+
+With support for memory access transformation this loop can be executed
+in parallel. It can be +transformed to
+
+
+
<create +and +initialize an array 'tmp' +with size 4>
+for (i = 0; i < 8; i++) {
+tmp[i % 4] += A[i];
+}
+sum = tmp[0] + tmp[1] + tmp[2] ++ tmp[3];
+
+
+With the help of some optimizer (like +PluTo) the following code can be
+generated, where the outer loop is +parallel. +

parfor (ii = +0; ii < 4; ii++) {
+    tmp[ii] = 0;
+    for (i = ii * 2; i < (ii+1) * 2; i++)
+        tmp[ii] += A[i];

+

}
+sum = tmp[0] + tmp[1] + tmp[2] + +tmp[3];
+

+

TODO
+

+

Step 1
+

+Polly exports its polyhedral description in a JSCoP file. Define how +memory
+
layout transformations are going to be expressed in Polly and +in +the JSCOP file.
+A simple example is given below.
+
+Consider the following loop.
+
+
for +(i += 0; i < 12; i++)
+     A[i] = 0;
+
+
+In the JSCOP file the memory is represented as follows.
+
+
   +"accesses": +[{
+           +"kind": +"write",
+           +"relation": +"{ +Stmt[i] -> A[i] +}"
+    }]
+
+
+Suppose +we want to perform a transformation such that the following
+code is generated
+
+
for +(i += 0; i < 12; i++)
+ +     A[0] = i;
+
+
+The corresponding JSCOP file represenation would be
+
+
    +"accesses": +[{
+           +"kind": +"read",
+           +"relation": +"{ +Stmt[i] -> A[0] +}"
+    }]
+
+
+We need to detect this access function change.
+
+ + +