summaryrefslogtreecommitdiffstats
path: root/polly/docs
diff options
context:
space:
mode:
authorMichael Kruse <llvm@meinersbur.de>2019-03-19 03:18:21 +0000
committerMichael Kruse <llvm@meinersbur.de>2019-03-19 03:18:21 +0000
commit89251edefcb46f0b5e0caf2bb47f38d115e12fa4 (patch)
tree7e54729d60c01c687dc8e5764cb26cbf0e01a581 /polly/docs
parentb9b05100c567d67b237484be950ddf73fbeea797 (diff)
downloadbcm5719-llvm-89251edefcb46f0b5e0caf2bb47f38d115e12fa4.tar.gz
bcm5719-llvm-89251edefcb46f0b5e0caf2bb47f38d115e12fa4.zip
[CodeGen] LLVM OpenMP Backend.
The ParallelLoopGenerator class is changed such that GNU OpenMP specific code was removed, allowing to use it as super class in a template-pattern. Therefore, the code has been reorganized and one may not use the ParallelLoopGenerator directly anymore, instead specific implementations have to be provided. These implementations contain the library-specific code. As such, the "GOMP" (code completely taken from the existing backend) and "KMP" variant were created. For "check-polly" all tests that involved "GOMP": equivalents were added that test the new functionalities, like static scheduling and different chunk sizes. "docs/UsingPollyWithClang.rst" shows how the alternative backend may be used. Patch by Michael Halkenhäuser <michaelhalk@web.de> Differential Revision: https://reviews.llvm.org/D59100 llvm-svn: 356434
Diffstat (limited to 'polly/docs')
-rw-r--r--polly/docs/UsingPollyWithClang.rst32
1 files changed, 32 insertions, 0 deletions
diff --git a/polly/docs/UsingPollyWithClang.rst b/polly/docs/UsingPollyWithClang.rst
index 3198a417caa..b6f370502f6 100644
--- a/polly/docs/UsingPollyWithClang.rst
+++ b/polly/docs/UsingPollyWithClang.rst
@@ -37,6 +37,38 @@ also need to add -mllvm -polly-parallel -lgomp to your CFLAGS.
clang -O3 -mllvm -polly -mllvm -polly-parallel -lgomp file.c
+Switching the OpenMP backend
+----------------------------
+
+The following CL switch allows to choose Polly's OpenMP-backend:
+
+ -polly-omp-backend[=BACKEND]
+ choose the OpenMP backend; BACKEND can be 'GNU' (the default) or 'LLVM';
+
+The OpenMP backends can be further influenced using the following CL switches:
+
+
+ -polly-num-threads[=NUM]
+ set the number of threads to use; NUM may be any positive integer (default: 0, which equals automatic/OMP runtime);
+
+ -polly-scheduling[=SCHED]
+ set the OpenMP scheduling type; SCHED can be 'static', 'dynamic', 'guided' or 'runtime' (the default);
+
+ -polly-scheduling-chunksize[=CHUNK]
+ set the chunksize (for the selected scheduling type); CHUNK may be any strictly positive integer (otherwise it will default to 1);
+
+Note that at the time of writing, the GNU backend may only use the
+`polly-num-threads` and `polly-scheduling` switches, where the latter also has
+to be set to "runtime".
+
+Example: Use alternative backend with dynamic scheduling, four threads and
+chunksize of one (additional switches).
+
+.. code-block:: console
+
+ -mllvm -polly-omp-backend=LLVM -mllvm -polly-num-threads=4
+ -mllvm -polly-scheduling=dynamic -mllvm -polly-scheduling-chunksize=1
+
Automatic Vector code generation
================================
OpenPOWER on IntegriCloud