CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
77 lines
2.1 KiB
HTML
77 lines
2.1 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
|
"http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<head>
|
|
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
<title>Polly - Getting Started</title>
|
|
<link type="text/css" rel="stylesheet" href="menu.css" />
|
|
<link type="text/css" rel="stylesheet" href="content.css" />
|
|
</head>
|
|
<body>
|
|
|
|
<div id="box">
|
|
<!--#include virtual="menu.html.incl"-->
|
|
|
|
<div id="content">
|
|
|
|
<h1>Building and Installing Polly</h1>
|
|
You can build Polly with <a href="https://cmake.org/">cmake</a> and your preferred generator (e.g. Ninja, make, Visual Studio, etc.).
|
|
|
|
<h3 id="source">Get the code</h3>
|
|
|
|
<pre>
|
|
git clone https://github.com/llvm/llvm-project.git
|
|
</pre>
|
|
|
|
You can also get a shallow clone by running:
|
|
|
|
<pre>
|
|
git clone --depth 1 https://github.com/llvm/llvm-project.git
|
|
</pre>
|
|
|
|
<h3 id="build">Build Polly</h3>
|
|
|
|
<pre>
|
|
mkdir build && cd build
|
|
cmake '-DLLVM_ENABLE_PROJECTS=clang;polly' ../llvm
|
|
cmake --build .
|
|
</pre>
|
|
|
|
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>).
|
|
|
|
If you just want to play around with Polly, it is recommended to do a Release+Assert build by passing
|
|
<code>-DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON</code>.
|
|
|
|
<h3>Test Polly</h3>
|
|
|
|
To test Polly, you can run
|
|
|
|
<pre>cmake --build . --target check-polly</pre>
|
|
|
|
<h3>Using Polly</h3>
|
|
|
|
Suppose that you want to compile a program hello.c using Polly.
|
|
|
|
To compile it with Polly (in the build folder), you can run:
|
|
|
|
<pre>
|
|
bin/clang -O3 -mllvm -polly hello.c
|
|
</pre>
|
|
|
|
<h3> Troubleshooting</h3>
|
|
|
|
<p>
|
|
If you run out of memory when building with Ninja, try lowering the concurrency of Ninja (e.g. <code> ninja -j 2 </code>).
|
|
More tips and tricks to building and using LLVM can be found <a href="https://llvm.org/docs/GettingStarted.html#common-problems">here</a>.
|
|
</p>
|
|
|
|
<p>
|
|
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>.
|
|
</p>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|