[ScopDetect / ScopInfo] Get statistics for scops without any loop correctly
[polly-mirror.git] / www / get_started.html
blob5d2caba02f659036dfe1946cd494470dc2fbaf0f
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
3 <html>
4 <head>
5 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
6 <title>Polly - Getting Started</title>
7 <link type="text/css" rel="stylesheet" href="menu.css" />
8 <link type="text/css" rel="stylesheet" href="content.css" />
9 </head>
10 <body>
12 <div id="box">
13 <!--#include virtual="menu.html.incl"-->
15 <div id="content">
17 <h1>Building and Installing Polly</h1>
19 <h2> Automatic </h2>
21 There is a <a href="polly.sh">script</a> available to automatically checkout,
22 update, build, and test Polly. This script contains all the commands that are
23 subsequently described on this webpage. The automatic installation consists
24 of four simple steps:
26 <pre>
27 mkdir polly &amp;&amp; cd polly
28 wget http://polly.llvm.org/polly.sh
29 chmod +x polly.sh
30 ./polly.sh
31 </pre>
33 <h2> Manual </h2>
34 <h3 id="source"> Get the code </h3>
36 <p><b>Warning:</b> Polly/LLVM/clang need to be checked out at the same time.</p>
38 <pre>
39 git clone http://llvm.org/git/llvm.git llvm_git
40 git clone http://llvm.org/git/polly.git llvm_git/tools/polly
42 # Also build the matching clang-version (optional)
43 git clone http://llvm.org/git/clang.git llvm_git/tools/clang
44 </pre>
45 <h3 id="build">Build Polly</h3>
47 <pre>
48 mkdir llvm_build && cd llvm_build
49 cmake ../llvm_git && make
50 </pre>
52 <h3> Test Polly</h3>
54 <pre>make check-polly</pre>
56 <h3>Building Polly Without LLVM</h3>
57 It is also possible to build Polly without
58 also building LLVM. All you need is an installed version of LLVM or a previous
59 build. To configure Polly to use a pre-built LLVM, set the
60 <code>-DCMAKE_PREFIX_PATH</code> option:
62 <pre>cmake -DCMAKE_PREFIX_PATH=${LLVM_PREFIX}/lib/cmake/llvm</pre>
64 To run unittests, however, you need to have the LLVM source directory around.
65 Polly will use the <code>llvm-config</code> of the LLVM you're building against
66 to guess the location of the source directory. You may override autodetected
67 location by setting the <code>-DLLVM_SOURCE_ROOT</code> option.
69 <h3> Troubleshooting</h3>
71 <p>If you get an error in one of the python files, your system probably uses python3
72 as default python interpreter. This is the case, for instance, under Arch Linux.
73 To solve this issue, run <code>cmake</code> again, but with the added argument:
74 <code>-DPYTHON_EXECUTABLE=/usr/bin/python2</code> (replace <code>/usr/bin/python2</code>
75 with the location of the python2 interpreter under your system).
77 <pre>cmake -DCMAKE_PREFIX_PATH=${ISL_INSTALL} -DPYTHON_EXECUTABLE=/usr/bin/python2 ${LLVM_SRC}</pre>
79 </div>
80 </div>
82 </body>
83 </html>