From e5b57975293124dca99e83cc97791dbb7dc9ba11 Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Sun, 23 Oct 2011 10:57:53 +0000 Subject: [PATCH] www: Describe how to load Polly into clang llvm-svn: 142747 --- polly/www/example_load_Polly_into_clang.html | 39 ++++++++++++++++++++ polly/www/examples.html | 8 ++++ 2 files changed, 47 insertions(+) create mode 100644 polly/www/example_load_Polly_into_clang.html diff --git a/polly/www/example_load_Polly_into_clang.html b/polly/www/example_load_Polly_into_clang.html new file mode 100644 index 000000000000..2fc504b78db7 --- /dev/null +++ b/polly/www/example_load_Polly_into_clang.html @@ -0,0 +1,39 @@ + + + + + + Polly - Load Polly into clang + + + + + +
+ +

Load Polly into clang and automatically run it at -O3

+ + +

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 Bug +database and consider reporting the bug. +

Compiling code with Polly

+ +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. + +
clang -load ${POLLY_BUILD_DIR}/lib/LLVMPolly.so -O3 file.c
+ +

Automatic OpenMP code generation

+ +To automatically detect parallel loops and generate OpenMP code for them you +also need to add '-mllvm -enable-polly-openmp -lgomp' to your CFLAGS. + +
clang -load ${POLLY_BUILD_DIR}/lib/LLVMPolly.so -O3 -mllvm -enable-polly-openmp -lgomp file.c
+
+ + diff --git a/polly/www/examples.html b/polly/www/examples.html index f6be2f472002..02d0e06e3b30 100644 --- a/polly/www/examples.html +++ b/polly/www/examples.html @@ -14,6 +14,14 @@

Polly: Examples

+

Load Polly into clang and automatically +run it at -O3

+ +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. +

Execute the individual Polly passes manually