2011-05-02 15:48:29 +08:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
|
|
|
"http://www.w3.org/TR/html4/strict.dtd">
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
|
|
<title>Polly - Getting Started</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">
|
|
|
|
|
|
|
|
<h1>Getting Started: Building and Installing Polly</h1>
|
|
|
|
|
|
|
|
|
|
|
|
<h2 id="prerequisites"> Prerequisites </h2>
|
|
|
|
|
|
|
|
The following prerequisites can be installed through the package management
|
|
|
|
system of your operating system.
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>libgmp (library + developer package)</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<h3> Install ISL / CLooG libraries </h3>
|
|
|
|
|
|
|
|
Polly requires the latest versions of <a href="http://www.cloog.org">CLooG</a>
|
2011-06-30 22:07:23 +08:00
|
|
|
and the version of <a href="http://repo.or.cz/w/isl.git">isl</a> included with
|
|
|
|
CLooG. To install both use the following commands.
|
2011-05-02 15:48:29 +08:00
|
|
|
|
|
|
|
<pre>
|
|
|
|
git clone git://repo.or.cz/cloog.git
|
|
|
|
cd cloog
|
|
|
|
./get_submodules.sh
|
|
|
|
./autogen.sh
|
|
|
|
./configure --with-gmp-prefix=/path/to/gmp/installation --prefix=/path/to/cloog/installation
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
</pre>
|
|
|
|
|
2011-06-30 22:07:23 +08:00
|
|
|
<h4 id="islTrunk">Use isl trunk</h4>
|
|
|
|
|
|
|
|
In rare case it is necessary to use an isl version that is even newer than
|
|
|
|
the one included in CLooG. This may happen, because we work in close interaction
|
|
|
|
with the developers of isl such that Polly sometimes uses features that are not
|
|
|
|
yet available in the version of isl which is included with CLooG. To get the
|
|
|
|
most recent version of isl perform these additional steps.<br />
|
|
|
|
<em>Only perform these steps if a recent mailing list message asks you to do
|
|
|
|
so.</em>
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
cd isl
|
|
|
|
git remote update
|
|
|
|
git checkout origin/master
|
|
|
|
cd ..
|
|
|
|
./autogen.sh
|
|
|
|
./configure --with-gmp-prefix=/path/to/gmp/installation --prefix=/path/to/cloog/installation
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
</pre>
|
|
|
|
|
2011-05-02 15:48:29 +08:00
|
|
|
<h3> Install Pocc (Optional) </h3>
|
|
|
|
|
2011-06-30 22:07:35 +08:00
|
|
|
<p>Polly can use <a href="http://www.cse.ohio-state.edu/~pouchet/software/pocc">
|
|
|
|
PoCC</a> as an external optimizer. PoCC is a research project that provides
|
|
|
|
an integrated version of <a href="http://pluto.sf.net">Pluto</a>, an
|
|
|
|
advanced data-locality and tileability optimizer. Similar functionality was
|
|
|
|
recently integrated in Polly (through isl), however the optimizations are not as
|
|
|
|
mature as the ones in Pluto/PoCC. Hence, if you want to use Pluto to optimize
|
|
|
|
your code or you want to compare the optimizer integrated in Polly to Pluto you
|
|
|
|
may want to use PoCC.</p>
|
|
|
|
|
|
|
|
Install PoCC 1.0-rc3.1 (the one with Polly support) and add it to your PATH.
|
2011-05-02 15:48:29 +08:00
|
|
|
|
|
|
|
<pre>
|
|
|
|
wget <a
|
|
|
|
href="http://www.cse.ohio-state.edu/~pouchet/software/pocc/download/pocc-1.0-rc3.1-full.tar.gz">http://www.cse.ohio-state.edu/~pouchet/software/pocc/download/pocc-1.0-rc3.1-full.tar.gz</a>
|
|
|
|
tar xzf pocc-1.0-rc3.1-full.tar.gz
|
|
|
|
cd pocc-1.0-rc3.1
|
|
|
|
./install.sh
|
|
|
|
export PATH=`pwd`/bin
|
|
|
|
</pre>
|
|
|
|
|
2011-06-30 22:07:35 +08:00
|
|
|
Install scoplib-0.2.0
|
2011-05-02 15:48:29 +08:00
|
|
|
|
|
|
|
<pre>
|
|
|
|
wget <a
|
|
|
|
href="http://www.cse.ohio-state.edu/~pouchet/software/pocc/download/modules/scoplib-0.2.0.tar.gz"
|
|
|
|
>http://www.cse.ohio-state.edu/~pouchet/software/pocc/download/modules/scoplib-0.2.0.tar.gz</a>
|
|
|
|
tar xzf scoplib-0.2.0.tar.gz
|
|
|
|
cd scoplib-0.2.0
|
|
|
|
./configure --enable-mp-version --prefix=/path/to/scoplib/installation
|
|
|
|
make && make install
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
<h2 id="source"> Get the code </h2>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
The Polly source code is available in the LLVM SVN repository. For convenience
|
|
|
|
we also provide a git mirror. To build Polly we extract its source code into the
|
|
|
|
<em>tools</em> directory of the llvm sources.</p>
|
|
|
|
<b>A recent LLVM checkout is needed. Older versions may not work!</b>
|
|
|
|
|
|
|
|
<h3>SVN</h3>
|
|
|
|
<pre>
|
|
|
|
export LLVM_SRC=`pwd`/llvm
|
|
|
|
svn checkout http://llvm.org/svn/llvm-project/llvm/trunk ${LLVM_SRC}
|
|
|
|
cd ${LLVM_SRC}/tools
|
|
|
|
svn checkout http://llvm.org/svn/llvm-project/polly/trunk polly
|
|
|
|
</pre>
|
|
|
|
<h3>GIT</h3>
|
|
|
|
<pre>
|
|
|
|
export LLVM_SRC=`pwd`/llvm
|
|
|
|
git clone http://llvm.org/git/llvm.git ${LLVM_SRC}
|
|
|
|
cd ${LLVM_SRC}/tools
|
2011-06-09 06:46:40 +08:00
|
|
|
git clone http://llvm.org/git/polly.git
|
2011-05-02 15:48:29 +08:00
|
|
|
</pre>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2 id="build">Build Polly</h2>
|
|
|
|
|
|
|
|
To build Polly you can either use the autoconf or the cmake build system. At the
|
|
|
|
moment only the autoconf build system allows to run the llvm test-suite and only
|
|
|
|
the cmake build system allows to run 'make polly-test'.
|
|
|
|
|
|
|
|
<h3>CMake</h3>
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ${LLVM_SRC}
|
|
|
|
|
|
|
|
# If CMAKE cannot find CLooG and ISL
|
|
|
|
cmake -DCMAKE_PREFIX_PATH=/cloog/installation .
|
|
|
|
|
|
|
|
# To point CMAKE to the scoplib source
|
|
|
|
cmake -DCMAKE_PREFIX_PATH=/scoplib/installation .
|
|
|
|
|
|
|
|
make
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
<h3> Autoconf </h2>
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
${LLVM_SRC}/configure --with-cloog=/cloog/installation --with-isl=/cloog/installation --with-scoplib=/scoplib/installation
|
|
|
|
make
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
<h2> Test Polly</h2>
|
|
|
|
|
|
|
|
To check if Polly works correctly you can run <em>make polly-test</em>. This
|
|
|
|
currently works only with a cmake build.
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|