From: Tobias Grosser Date: Wed, 3 Feb 2016 16:18:24 +0000 (+0000) Subject: www: Simplify 'build & install' descriptions X-Git-Tag: llvmorg-3.9.0-rc1~15219 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=05514e4d7fc30242caf42e3a624574b57e365c6f;p=platform%2Fupstream%2Fllvm.git www: Simplify 'build & install' descriptions We remove information for older versions of Polly and also shorten the overall text. This should make it a lot easier for people to get to the important code wight away. llvm-svn: 259658 --- diff --git a/polly/www/get_started.html b/polly/www/get_started.html index 031ac66..2dac41c 100644 --- a/polly/www/get_started.html +++ b/polly/www/get_started.html @@ -14,7 +14,7 @@
-

Getting Started: Building and Installing Polly

+

Building and Installing Polly

Automatic

@@ -30,181 +30,31 @@ chmod +x polly.sh ./polly.sh -

Manual [after 3.6]

+

Manual

Get the code

-The Polly source code is available in the LLVM SVN repository as well as through -an official git mirror. It is added to the tools -directory of the llvm sources. -Polly and LLVM need to be checked out at the same time. Checkouts - from different dates may not work! -

Set the directory layout:

-
-export BASE=`pwd`
-export LLVM_SRC=${BASE}/llvm
-export POLLY_SRC=${LLVM_SRC}/tools/polly
-
-# Also build the matching clang-version (optional)
-export CLANG_SRC=${LLVM_SRC}/tools/clang
-
- -

SVN

-
-svn checkout http://llvm.org/svn/llvm-project/llvm/trunk ${LLVM_SRC}
-svn checkout http://llvm.org/svn/llvm-project/polly/trunk ${POLLY_SRC}
+

Warning: Polly/LLVM/clang need to be checked out at the same time.

-# Also build the matching clang-version (optional) -svn checkout http://llvm.org/svn/llvm-project/cfe/trunk ${CLANG_SRC} -
-

GIT

-git clone http://llvm.org/git/llvm.git ${LLVM_SRC}
-git clone http://llvm.org/git/polly.git ${POLLY_SRC}
+git clone http://llvm.org/git/llvm.git llvm_git
+git clone http://llvm.org/git/polly.git llvm_git/tools/polly
 
 # Also build the matching clang-version (optional)
-git clone http://llvm.org/git/clang.git ${CLANG_SRC}
+git clone http://llvm.org/git/clang.git llvm_git/tools/clang
 

Build Polly

-To build Polly use the cmake build system. - -

Set the directory layout:

-export LLVM_BUILD=${BASE}/llvm_build
-mkdir ${LLVM_BUILD}
-cd ${LLVM_BUILD}
-
- -

CMake

- -
-cmake ${LLVM_SRC} && make
+mkdir llvm_build && cd llvm_build
+cmake ../llvm_git && make
 

Test Polly

-

To check if Polly works correctly you can run make check-polly for the -cmake build or make check-polly -C tools/polly/test/ for the autoconf -build. - -

If you get an error in one of the python files, your system probably uses python3 -as default python interpreter. This is the case, for instance, under Arch Linux. -To solve this issue, run cmake again, but with the added argument: --DPYTHON_EXECUTABLE=/usr/bin/python2 (replace /usr/bin/python2 -with the location of the python2 interpreter under your system). - -

cmake -DCMAKE_PREFIX_PATH=${ISL_INSTALL} -DPYTHON_EXECUTABLE=/usr/bin/python2 ${LLVM_SRC}
- -

Manual [before and including 3.6]

-

Get the code

- -The Polly source code is available in the LLVM SVN repository as well as through -an official git mirror. It is added to the tools -directory of the llvm sources. -Polly and LLVM need to be checked out at the same time. Checkouts - from different dates may not work! -

Set the directory layout:

-
-export BASE=`pwd`
-export LLVM_SRC=${BASE}/llvm
-export POLLY_SRC=${LLVM_SRC}/tools/polly
-
-# Also build the matching clang-version (optional)
-export CLANG_SRC=${LLVM_SRC}/tools/clang
-
- -

SVN

-
-svn checkout http://llvm.org/svn/llvm-project/llvm/trunk ${LLVM_SRC}
-svn checkout http://llvm.org/svn/llvm-project/polly/trunk ${POLLY_SRC}
-
-# Also build the matching clang-version (optional)
-svn checkout http://llvm.org/svn/llvm-project/cfe/trunk ${CLANG_SRC}
-
-

GIT

-
-git clone http://llvm.org/git/llvm.git ${LLVM_SRC}
-git clone http://llvm.org/git/polly.git ${POLLY_SRC}
-
-# Also build the matching clang-version (optional)
-git clone http://llvm.org/git/clang.git ${CLANG_SRC}
-
-

Prerequisites

- +
make check-polly
-

libgmp

-Install libgmp (library + developer package) through the package management -system of your operating system. -

isl

- -Polly is tested with a fixed version of isl. To obtain the source code of isl -use checkout_isl.sh as available in ${POLLY_SRC}/utils/checkout_isl.sh. - -

Set the directory layout:

-
-export ISL_SRC=${BASE}/isl_src
-export ISL_INSTALL=${BASE}/isl_install
-
- -

First installation

-
-${POLLY_SRC}/utils/checkout_isl.sh ${ISL_SRC}
-cd ${ISL_SRC}
-./configure --prefix=${ISL_INSTALL}
-make
-make install
-cd ${BASE}
-
- -

Update the installation

- -Updating isl may become necessary, if Polly uses a feature -only available in a recent version of isl. -
-${POLLY_SRC}/utils/checkout_isl.sh ${ISL_SRC}
-cd ${ISL_SRC}
-make
-make install
-cd ${BASE}
-
- -

Build Polly

- -To build Polly use the cmake build system. - -

Set the directory layout:

-
-export LLVM_BUILD=${BASE}/llvm_build
-mkdir ${LLVM_BUILD}
-cd ${LLVM_BUILD}
-
- -

CMake

- -
-cmake -DCMAKE_PREFIX_PATH=${ISL_INSTALL} ${LLVM_SRC}
-make
-
- -

Test Polly

- -

To check if Polly works correctly you can run make check-polly for the -cmake build or make check-polly -C tools/polly/test/ for the autoconf -build. - -

If you get something like "... libisl.so.9: cannot open shared object file ..", -it is because you installed isl to a non-standard path, and libisl -could not be found. To solve this issue, you need to append the path of parent -directory of libisl, i.e. ${ISL_INSTALL}/lib, to LD_LIBRARY_PATH by: - -

export LD_LIBRARY_PATH=${ISL_INSTALL}/lib:$LD_LIBRARY_PATH
- -

Also try the above command if you get errors such as: -undefined symbol: isl_ctx_get_max_operations +

Troubleshooting

If you get an error in one of the python files, your system probably uses python3 as default python interpreter. This is the case, for instance, under Arch Linux. @@ -214,41 +64,6 @@ with the location of the python2 interpreter under your system).

cmake -DCMAKE_PREFIX_PATH=${ISL_INSTALL} -DPYTHON_EXECUTABLE=/usr/bin/python2 ${LLVM_SRC}
-

Optional Features

- -

Pocc [Supported until LLVM 3.4.2]

- -

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. Polly includes internally -already a similar optimizer, such that in general PoCC is not needed. It is -only recommended for people who want to compare against a different -optimizer. -
-To use it 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=$PATH:`pwd`/bin
-
- -You also need to install scoplib-0.2.0 and provide its location to -Polly's cmake call. - -
-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
-