Getting Started: Building and Installing Polly

Prerequisites

The following prerequisites can be installed through the package management system of your operating system.

Install ISL / CLooG libraries

Polly requires the latest versions of CLooG and isl checked out at commit cd1939ed06617d00159e8e51b72a804b467e98b4.

First installation

git clone git://repo.or.cz/cloog.git
cd cloog
git checkout cloog-0.16.3
./get_submodules.sh
cd isl
git remote update
git checkout cd1939ed06617d00159e8e51b72a804b467e98b4
cd ..
./autogen.sh
./configure --with-gmp-prefix=/path/to/gmp/installation --prefix=/path/to/cloog/installation
make
make install

Update an earlier installation

cd cloog
git remote update
git checkout cloog-0.16.3
cd isl
git remote update
git checkout cd1939ed06617d00159e8e51b72a804b467e98b4
cd ..
make
make install

Install Pocc (Optional)

Polly can use PoCC as an external optimizer. PoCC is a research project that provides an integrated version of Pluto, 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.

Install PoCC 1.0-rc3.1 (the one with Polly support) and add it to your PATH.
wget http://www.cse.ohio-state.edu/~pouchet/software/pocc/download/pocc-1.0-rc3.1-full.tar.gz
tar xzf pocc-1.0-rc3.1-full.tar.gz
cd pocc-1.0-rc3.1
./install.sh
export PATH=`pwd`/bin
Install scoplib-0.2.0
wget http://www.cse.ohio-state.edu/~pouchet/software/pocc/download/modules/scoplib-0.2.0.tar.gz
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

Get the code

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 tools directory of the llvm sources.

A recent LLVM checkout is needed. Older versions may not work!

SVN

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

GIT

export LLVM_SRC=`pwd`/llvm
git clone http://llvm.org/git/llvm.git ${LLVM_SRC}
cd ${LLVM_SRC}/tools
git clone http://llvm.org/git/polly.git

Build Polly

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'.

CMake

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

Autoconf

mkdir build
cd build
${LLVM_SRC}/configure --with-cloog=/cloog/installation --with-isl=/cloog/installation --with-scoplib=/scoplib/installation
make

Test Polly

To check if Polly works correctly you can run make polly-test. This currently works only with a cmake build.