hanchenye-llvm-project/polly/www/todo.html

384 lines
9.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
<html>
<head> <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Polly - Todo</title>
<link type="text/css" rel="stylesheet" href="menu.css">
<link type="text/css" rel="stylesheet" href="content.css">
</head>
<body>
<!--#include virtual="menu.html.incl"-->
<div id="content">
<h3> Setup infrastructure at LLVM </h3>
<p>We are currently moving to the LLVM infrastructure
</p>
<table class="wikitable" cellpadding="2">
<tbody><tr>
<th>Task
</th><th> Status
</th><th>Owner
</th></tr>
<tr>
<th align="left"> Move to LLVM SVN
</th><td class="done" align="center"> done</br>
<a
href="http://llvm.org/svn/llvm-project/polly"
>http://llvm.org/svn/llvm-project/polly</a>
</td><td> Tobias
</td></tr>
<tr>
<th align="left"> Git mirror
</th><td class="done" align="center"> done<br />
git://llvm.org/git/polly.git
</td><td> Tobias
</td></tr>
<tr>
<th align="left"> Commit mails
</th><td class="done" align="center"> done <br />
llvm-commits@cs.uiuc.edu
</td><td> Tobias
</td></tr>
<tr>
<th align="left"> LLVM Bugzilla category
</th><td class="done" align="center"> done <br />
<a href="http://llvm.org/bugs/enter_bug.cgi?product=Projects">LLVM Bugzilla</a>
<br />
(Product is 'Projects', Component is 'Polly')
</td><td> Tobias
<tr>
<th align="left"> Website
</th><td class="inprogress" align="center"> in progress
<br />
<a href="http://polly.grosser.es">http://polly.grosser.es</a>,
later maybe polly.llvm.org
</td><td> Tobias
</td></tr>
<tr>
<th align="left">Buildbot that runs 'make polly-test'
</th><td class="done" align="center">
done<br />
<a
href="http://google1.osuosl.org:8011/console">http://google1.osuosl.org:8011/console</a>
<td> Tobias,<br />Raghesh,<br /> Andreas
</td></tr>
<tr>
<th align="left"> Nightly performance/coverage tests<br /> (with the llvm
test-suite)
</th><td align="center">
</th><td> Andreas
</td></tr>
</th><td>
</td></tr>
</tbody></table>
<h3> Phase 2 </h3>
<p>The second phase of Polly can build on a robust, but very limited framework.
In this phase work on removing limitations and extending the framework is
planned. Also we plan the first very simple transformations. Furthermore the
build system will be improved to simplify deployment.
</p>
<table class="wikitable" cellpadding="2">
<tbody><tr>
<th colspan="3" style="background: none repeat scroll 0% 0% rgb(239, 239,
239);"> Frontend
</th></tr>
<tr>
<th width="400px"> Task
</th><th width="150px"> Status
</th><th>Owner
</th></tr>
<tr>
<th align="left"> Support for casts in expressions
</th><td>
</td><td>
</td><td>
</td></tr>
<tr>
<th align="left"> Support multi dimensional arrays.
</th><td align="center"> planning
</td><td> Tobias
</td></tr>
<tr>
<th align="left"> Alias sets
</th></tr>
<tr>
<th colspan="4" style="background: none repeat scroll 0% 0% rgb(239, 239,
239);"> Middle end
</th></tr>
<tr>
<th width="400px"> Task
</th><th width="80px"> Status
</th><th>Owner
</th></tr>
<tr>
<th align="left"> Implement ISL dependency analysis pass
</th><td class="done" align="center"> working
</td><td> Tobias
</td></tr>
<tr>
<th align="left"> Connect pocc/pluto
</th><td class="done" align="center"> working
</td><td> Tobias
</td></tr>
<tr>
<th align="left"> Finish OpenSCoP support
</th><td class="open">Blocked (waiting for OpenSCoP)
</td><td>
</td><td>
</td></tr>
<tr>
<th align="left"> Add SCoPLib 0.2 support to connect pocc
</th><td class="done" align="center">done
</td><td> Tobias
</td></tr>
<tr>
<th align="left"> Write simple loop blocking
</th><td>
</td><td>
</td><td>
</td></tr>
<tr>
<th colspan="4" style="background: none repeat scroll 0% 0% rgb(239, 239,
239);"> Backend
</th></tr>
<tr>
<th width="400px"> Task
</th><th width="80px"> Status
</th><th>Owner
</th></tr>
<tr>
<th align="left"> Code generation for non 64bit targets
</th><td>
</td><td>
</td><td>
</td></tr>
<tr>
<th align="left"> Add write support for data access functions
</th><td class="open">Still open
</td><td>
</td><td>
</td></tr>
<tr>
<th align="left"> Create vector loops
</th><td class="inprogress">70% done
</td><td>Tobias
</td></tr>
<tr>
<th align="left">Create OpenMP
loops
</th><td class="inprogress">90% done
</td><td> Raghesh &amp; Tobias
</td></tr>
<tr>
<th colspan="4" style="background: none repeat scroll 0% 0% rgb(239, 239,
239);"> General tasks
</th></tr>
<tr>
<th width="300px"> Task
</th><th width="80px"> Status
</th><th>Owner
</th></tr>
<tr>
<th align="left"> Commit RegionPass patch upstream
</th><td class="done" align="center"> done
</td><td> Tobias
</td></tr>
<tr>
<th align="left"> Build against an installed LLVM
</th><td class="inprogress"> Partial (cmake build without tests)
</td><td> ether
</td></tr>
<tr>
<th align="left"> Setup buildbot regression testers using LNT
</th><td class="open">Still open
</td><td>
</td><td>
</td></tr>
</tbody></table>
<h3>Phase 1 - Get something
working (Finished October 2010)</span></h3>
<p>The first iteration of this project aims to create a minimal working version
of this framework, that is capable to transform an LLVM-IR program to the
polyhedral model
and back to LLVM-IR without applying any transformations.
</p>
<table class="wikitable" cellpadding="2">
<tbody><tr>
<th colspan="4" style="background: none repeat scroll 0% 0% rgb(239, 239,
239);"> Frontend
</th></tr>
<tr>
<th width="300px"> Task
</th><th width="150px"> Status
</th><th>Owner
</th></tr>
<tr>
<th align="left"> Region detection
</td><td class="done"> Working + Committed upstream
</td><td>Ether
</td></tr>
<tr>
<th align="left"> Access Functions
</td><td class="done"> Working
</td><td>John + Ether
</td></tr>
<tr>
<th align="left"> Alias sets
</td><td class="open"> Still open
</td></tr>
<tr>
<th align="left"> Scalar evolution to affine expression
</td><td class="done"> Done
</td><td>
Ether
</td></tr>
<tr>
<th align="left"> SCoP extraction
</td><td class="done"> Working
</td><td>Tobias + Ether
</td></tr>
<tr>
<th align="left"> SCoPs to polyhedral model
</td><td class="done"> Working
</td><td>Tobias + Ether
</td></tr>
<tr>
<th colspan="4" style="background: none repeat scroll 0% 0% rgb(239, 239,
239);"> Middle end
</th></tr>
<tr>
<th width="300px"> Task
</th><th width="80px"> Status
</th><th>Owner
</th></tr>
<tr>
<th align="left"> Define polyhedral description
</td><td class="done"> Working
</td><td>Tobias
</td></tr>
<tr>
<th align="left"> Import/Export using current openscop version
</td><td class="done"> Working
</td><td>Tobias
</td></tr>
<tr>
<th colspan="4" style="background: none repeat scroll 0% 0% rgb(239, 239,
239);"> Backend
</th></tr>
<tr>
<th width="300px"> Task
</th><th width="80px"> Status
</th><th>Owner
</th></tr>
<tr>
<th align="left"> Create LLVM-IR using CLooG
</td><td class="done"> Working
</td><td> Tobias
</td></tr>
<tr>
<th colspan="4" style="background: none repeat scroll 0% 0% rgb(239, 239,
239);"> General tasks
</th></tr>
<tr>
<th width="300px"> Task
</th><th width="80px"> Status
</th><th>Owner
</th></tr>
<tr>
<th align="left"> Setup git repositories
</td><td class="done"> Done
</td><td> Tobias
</td></tr>
<tr>
<th align="left"> Add CLooG/isl to build system
</td><td class="done"> Works on Unix
</td><td> Tobias
</td></tr></tbody></table>
<h3>Further projects </h3>
<p>There are several great projects related to polly that can already be started
or are possible in the near future. </p>
<h4>Extend the post dominance analysis for infinite loops (small)</h4>
<p>At the moment the post dominance analysis cannot handle infinite loops. All
basic blocks in the CFG that do not return are - at the moment - not part of the
post dominance tree.
However by adding some virtual edges, they could be added to the post dominator
tree. Where to add the edges needs some research.
</p><p>This is a small project, that is is well defined. As it is directly in
LLVM it can be easily committed upstream. It is useful for polly, as the
RegionInfo pass will be able to detect regions in parts of the CFG that never
return.
</p><p><i>A good starter to get into LLVM</i>
</p>
<h4>Vectorization </h4>
<p>It is planned to use Polly to support vectorization in LLVM.
</p><p>The basic idea is to use Polly and the polyhedral tools to transform code
such that the innermost loops can be executed in parallel. Afterwards during
code generation in LLVM the loops will be created using vector instructions.
</p><p>To start we plan to use <a href="http://pluto-compiler.sf.net"
class="external text" title="http://pluto-compiler.sf.net"
rel="nofollow">Pluto</a> to transform the loop nests. Pluto can generate vector
parallel code and annotate the vector parallel loops. Some impressive results
were shown on code that was afterwards vectorized by the icc enforcing
vectorization. We believe LLVM can do even better, as it can interact directly
with the polyhedral information.
</p><p>As an example simple matrix multiplication:
</p>
<pre>
for(i=0; i&lt;M; i++)
for(j=0; j&lt;N; j++)
for(k=0; k&lt;K; k++)
C[i][j] = beta*C[i][j] + alpha*A[i][k] * B[k][j];
</pre>
<p>After plutos transformations with added tiling and
vectorization hints:
</p>
<pre>
if ((K &gt;= 1) &amp;&amp; (M &gt;= 1) &amp;&amp; (N &gt;= 1))
for (t1=0;t1&lt;=floord(M-1,32);t1++)
for (t2=0;t2&lt;=floord(N-1,32);t2++)
for (t3=0;t3&lt;=floord(K-1,32);t3++)
for (t4=32*t1;t4&lt;=min(M-1,32*t1+31);t4++)
for (t5=32*t3;t5&lt;=min(K-1,32*t3+31);t5++) {
lbv=32*t2;
ubv=min(N-1,32*t2+31);
#pragma ivdep
#pragma vector always
for (t6=lbv; t6&lt;=ubv; t6++)
C[t4][t6]=beta*C[t4][t6]+alpha*A[t4][t5]*B[t5][t6];;
}
</pre>
<p>In this example the innermost loop is parallel without any dependencies. </p>
</div>
</body>
</html>