Debian Codegraph @

llvm-project/polly/www/get_started.html

raw
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>
11
12 <div id="box">
13 <!--#include virtual="menu.html.incl"-->
14
15 <div id="content">
16
17 <h1>Building and Installing Polly</h1>
18 You can build Polly with <a href="https://cmake.org/">cmake</a> and your preferred geneator (e.g. Ninja, make, Visual Studio, etc.).
19
20 <h3 id="source">Get the code</h3>
21
22 <pre>
23 git clone https://github.com/llvm/llvm-project.git
24 </pre>
25
26 You can also get a shallow clone by running:
27
28 <pre>
29 git clone --depth 1 https://github.com/llvm/llvm-project.git
30 </pre>
31
32 <h3 id="build">Build Polly</h3>
33
34 <pre>
35 mkdir build && cd build
36 cmake '-DLLVM_ENABLE_PROJECTS=clang;polly' ../llvm
37 cmake --build .
38 </pre>
39
40 You can also pass arguments to cmake to specify a particular generator (e.g. <code>-G Ninja</code>) or the build type (<code>-DCMAKE_BUILD_TYPE=Release</code>).
41
42 If you just want to play around with Polly, it is recommended to do a Release+Assert build by passing
43 <code>-DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON</code>.
44
45 <h3>Test Polly</h3>
46
47 To test Polly, you can run
48
49 <pre>cmake --build . --target check-polly</pre>
50
51 <h3>Using Polly</h3>
52
53 Suppose that you want to compile a program hello.c using Polly.
54
55 To compile it with Polly (in the build folder), you can run:
56
57 <pre>
58 bin/clang -O3 -mllvm -polly hello.c
59 </pre>
60
61 <h3> Troubleshooting</h3>
62
63 <p>
64 If you run out of memory when building with Ninja, try lowering the concurrency of Ninja (e.g. <code> ninja -j 2 </code>).
65 More tips and tricks to building and using LLVM can be found <a href="https://llvm.org/docs/GettingStarted.html#common-problems">here</a>.
66 </p>
67
68 <p>
69 For more information on getting started with Polly and LLVM in general, see LLVM's <a href = "https://llvm.org/docs/GettingStarted.html">getting started docs</a>.
70 </p>
71
72 </div>
73 </div>
74
75 </body>
76 </html>