diff options
author | Sebastian Pop <spop@codeaurora.org> | 2012-01-04 20:11:18 +0000 |
---|---|---|
committer | Sebastian Pop <spop@codeaurora.org> | 2012-01-04 20:11:18 +0000 |
commit | 3f2f65f1f81b961c314173062f3858cb0bde7d9a (patch) | |
tree | 6f7de30f609d943ba59320be9b9724aa9c02e1e3 | |
parent | 0f357d6c2240393b53d30cf79c2cd583192e5ed9 (diff) | |
download | bcm5719-llvm-3f2f65f1f81b961c314173062f3858cb0bde7d9a.tar.gz bcm5719-llvm-3f2f65f1f81b961c314173062f3858cb0bde7d9a.zip |
add polly.sh script
llvm-svn: 147543
-rw-r--r-- | polly/www/get_started.html | 6 | ||||
-rw-r--r-- | polly/www/polly.sh | 64 |
2 files changed, 70 insertions, 0 deletions
diff --git a/polly/www/get_started.html b/polly/www/get_started.html index d5e1fd47b02..9df984f9214 100644 --- a/polly/www/get_started.html +++ b/polly/www/get_started.html @@ -150,6 +150,12 @@ make To check if Polly works correctly you can run <em>make polly-test</em> for the cmake build or <em>make polly-test -C tools/polly/test/</em> for the autoconf build. + +<h2> Automatize </h2> + +To automate the checkout, update, build, and test of Polly, one can +use this <a href="polly.sh">script</a> that contains all the commands +from this page in a single bash script. </div> </body> </html> diff --git a/polly/www/polly.sh b/polly/www/polly.sh new file mode 100644 index 00000000000..88d286de6fb --- /dev/null +++ b/polly/www/polly.sh @@ -0,0 +1,64 @@ +#!/bin/bash -xe + +export BASE=`pwd` +export LLVM_SRC=${BASE}/llvm +export POLLY_SRC=${LLVM_SRC}/tools/polly +export CLOOG_SRC=${BASE}/cloog_src +export CLOOG_INSTALL=${BASE}/cloog_install +export LLVM_BUILD=${BASE}/llvm_build +export SCOPLIB_DIR=${BASE}/scoplib-0.2.0 +export POCC_DIR=${BASE}/pocc-1.0-rc3.1 + +if [ -e /proc/cpuinfo ]; then + procs=`cat /proc/cpuinfo | grep processor | wc -l` +else + procs=1 +fi + +if ! test -d ${LLVM_SRC}; then + git clone http://llvm.org/git/llvm.git ${LLVM_SRC} +fi + +if ! test -d ${POLLY_SRC}; then + git clone http://llvm.org/git/polly.git ${POLLY_SRC} +fi + +${POLLY_SRC}/utils/checkout_cloog.sh ${CLOOG_SRC} +cd ${CLOOG_SRC} + +if ! test -e ${CLOOG_SRC}/config.log; then + ./configure --prefix=${CLOOG_INSTALL} +fi +make +make install +cd ${BASE} + +if ! test -d ${POCC_DIR}; then + 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_DIR} + ./install.sh + cd ${BASE} +fi +export PATH=${POCC_DIR}/bin:$PATH + +if ! test -d ${SCOPLIB_DIR}; then + 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_DIR} + ./configure --enable-mp-version --prefix=${SCOPLIB_DIR}/usr + make -j${procs} -l${procs} && make install +fi + +mkdir -p ${LLVM_BUILD} +cd ${LLVM_BUILD} + +if which cmake ; then + cmake -DCMAKE_PREFIX_PATH=${CLOOG_INSTALL} ${LLVM_SRC} + make -j$procs -l$procs + make polly-test +else + ${LLVM_SRC}/configure --with-cloog=${CLOOG_INSTALL} --with-isl=${CLOOG_INSTALL} + make -j$procs -l$procs + make polly-test -C tools/polly/test/ +fi |