[PATCH] D111685: [Polly][NFC] Clean up Polly's getting started docs

Max Fan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 12 18:29:03 PDT 2021


InnovativeInventor updated this revision to Diff 379243.
InnovativeInventor marked 4 inline comments as done.
InnovativeInventor added a comment.

Add Polly invocation instructions and resolve cmake/ninja confusion


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111685/new/

https://reviews.llvm.org/D111685

Files:
  polly/www/get_started.html


Index: polly/www/get_started.html
===================================================================
--- polly/www/get_started.html
+++ polly/www/get_started.html
@@ -10,15 +10,13 @@
 <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://ninja-build.org/">Ninja</a> or <a href="https://cmake.org/">cmake</a>.
-Other generators build systems can also be used, but are not supported.
+You can build Polly with <a href="https://cmake.org/">cmake</a> and your preferred geneator (e.g. Ninja, make, Visual Studio, etc.).
 
-<h3 id="source"> Get the code </h3>
+<h3 id="source">Get the code</h3>
 
 <pre>
 git clone https://github.com/llvm/llvm-project.git
@@ -30,15 +28,7 @@
 git clone --depth 1 https://github.com/llvm/llvm-project.git
 </pre>
 
-<h3 id="build">Build Polly (with Ninja)</h3>
-
-<pre>
-mkdir build && cd build
-cmake -G Ninja '-DLLVM_ENABLE_PROJECTS=clang;polly' ../llvm
-ninja
-</pre>
-
-<h3 id="build">Build Polly (with cmake)</h3>
+<h3 id="build">Build Polly</h3>
 
 <pre>
 mkdir build && cd build
@@ -46,19 +36,35 @@
 cmake --build .
 </pre>
 
-<h3> Test Polly (with Ninja)</h3>
+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>
 
-<pre>ninja check Polly</pre>
+<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, lower the concurrency of Ninja (e.g. <code> ninja -j 2 </code>).
+  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>.
+You can also read the release notes <a href="https://releases.llvm.org/12.0.1/tools/polly/docs/index.html">here</a>.
 </p>
 
 </div>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111685.379243.patch
Type: text/x-patch
Size: 2592 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211013/e61b55fd/attachment.bin>


More information about the llvm-commits mailing list