www: Describe how to load Polly into clang

llvm-svn: 142747
This commit is contained in:
Tobias Grosser 2011-10-23 10:57:53 +00:00
parent 869b9a318d
commit e5b5797529
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,39 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Polly - Load Polly into clang</title>
<link type="text/css" rel="stylesheet" href="menu.css">
<link type="text/css" rel="stylesheet" href="content.css">
</head>
<body>
<!--#include virtual="menu.html.incl"-->
<div id="content">
<!--=====================================================================-->
<h1>Load Polly into clang and automatically run it at -O3</h1>
<!--=====================================================================-->
<p>Warning: This example makes it very easy to use Polly. Still, please be aware
that Polly is a young research project. It is expected to crash, produce
invalid code or to hang in complex calculations even for simple examples. In
case you see such a problem, please check the <a href="bugs.html">Bug
database</a> and consider reporting the bug.
<h4>Compiling code with Polly</h4>
To compile code with Polly you only need to add '-load
${POLLY_BUILD_DIR}/lib/LLVMPolly.so' to your command line or your CFLAGS and
Polly is automatically executed at -O3.
<pre class="code">clang -load ${POLLY_BUILD_DIR}/lib/LLVMPolly.so -O3 file.c</pre>
<h4>Automatic OpenMP code generation</h4>
To automatically detect parallel loops and generate OpenMP code for them you
also need to add '-mllvm -enable-polly-openmp -lgomp' to your CFLAGS.
<pre class="code">clang -load ${POLLY_BUILD_DIR}/lib/LLVMPolly.so -O3 -mllvm -enable-polly-openmp -lgomp file.c</pre>
</div>
</body>
</html>

View File

@ -14,6 +14,14 @@
<!--=====================================================================-->
<h1>Polly: Examples</h1>
<!--=====================================================================-->
<h2><a href="example_load_Polly_into_clang.html">Load Polly into clang and automatically
run it at -O3</a></h2>
This example is for users of Polly. It explains how you can load Polly into
clang such that the polyhedral optimzations are available during normal
compilation. Using Polly is not more complicated than just adding a new flag
to CFLAGS.
<h2><a href="example_manual_matmul.html">Execute the individual Polly passes
manually</a></h2>