Lines Matching +full:docs +full:- +full:openmp +full:- +full:html

23 Optimizing with Polly is as easy as adding -O3 -mllvm -polly to your compiler
25 -O1,-O2,-O3; Optimizing for size with -Os or -Oz is not recommended).
27 .. code-block:: console
29 clang -O3 -mllvm -polly file.c
31 Automatic OpenMP code generation
34 To automatically detect parallel loops and generate OpenMP code for them you
35 also need to add -mllvm -polly-parallel -lgomp to your CFLAGS.
37 .. code-block:: console
39 clang -O3 -mllvm -polly -mllvm -polly-parallel -lgomp file.c
41 Switching the OpenMP backend
42 ----------------------------
44 The following CL switch allows to choose Polly's OpenMP-backend:
46 -polly-omp-backend[=BACKEND]
47 choose the OpenMP backend; BACKEND can be 'GNU' (the default) or 'LLVM';
49 The OpenMP backends can be further influenced using the following CL switches:
52 -polly-num-threads[=NUM]
55 -polly-scheduling[=SCHED]
56 set the OpenMP scheduling type; SCHED can be 'static', 'dynamic', 'guided' or 'runtime' (the default);
58 -polly-scheduling-chunksize[=CHUNK]
62 `polly-num-threads` and `polly-scheduling` switches, where the latter also has
68 .. code-block:: console
70 -mllvm -polly-omp-backend=LLVM -mllvm -polly-num-threads=4
71 -mllvm -polly-scheduling=dynamic -mllvm -polly-scheduling-chunksize=1
76 Automatic vector code generation can be enabled by adding -mllvm
77 -polly-vectorizer=stripmine to your CFLAGS.
79 .. code-block:: console
81 clang -O3 -mllvm -polly -mllvm -polly-vectorizer=stripmine file.c
90 clang's -O0 output.
92 To get the LLVM-IR that Polly sees in the optimization pipeline, use the
95 .. code-block:: console
97 clang file.c -c -O3 -mllvm -polly -mllvm -polly-dump-before-file=before-polly.ll
99 This writes a file 'before-polly.ll' containing the LLVM-IR as passed to
103 Thereafter, any Polly pass can be run over 'before-polly.ll' using the
107 .. code-block:: console
109 clang file.c -c -O3 -mllvm -polly -mllvm -debug-pass=Arguments
111 The Polly's passes are those between '-polly-detect' and
112 '-polly-codegen'. Analysis passes can be omitted. At the time of this
115 .. code-block:: console
117 opt before-polly.ll -polly-simplify -polly-optree -polly-delicm -polly-simplify -polly-prune-unprofitable -polly-opt-isl -polly-codegen
125 The following generates unoptimized LLVM-IR ('-O0', which is the
127 ('-polly-canonicalize'). This does /not/ include all the passes that run
128 before Polly in the default pass pipeline. The '-disable-O0-optnone'
134 .. code-block:: console
136 clang file.c -c -O0 -Xclang -disable-O0-optnone -emit-llvm -S -o - | opt -polly-canonicalize -S
138 The option '-disable-llvm-passes' disables all LLVM passes, even those
139 that run at -O0. Passing -O1 (or any optimization level other than -O0)
142 .. code-block:: console
144 clang file.c -c -O1 -Xclang -disable-llvm-passes -emit-llvm -S -o - | opt -polly-canonicalize -S
148 '-polly-canonicalize' passes.
150 .. code-block:: console
152 clang file.c -c -O3 -mllvm -polly -mllvm -polly-position=early -mllvm -polly-dump-before-file=before-polly.ll
158 -mllvm -option-name to the CFLAGS or the clang command line.
161 --------------------------------
164 -polly-only-func=functionname.
166 Disable LLVM-IR generation
167 --------------------------
169 Polly normally regenerates LLVM-IR from the Polyhedral representation. To only
171 generation add the option polly-no-codegen.
174 ---------------------------
176 options are -polly-show, -polly-show-only, -polly-dot and -polly-dot-only. The
183 ----------------------------
186 for data-locality and parallelism using the Pluto algorithm.
187 To disable the optimizer entirely use the option -polly-optimizer=none.
190 -------------------------------
193 wanted the option -polly-tiling=false can be used to disable it. (This option
197 ---------------
199 The flags -polly-import and -polly-export allow the export and reimport of the
205 Viewing Polly Diagnostics with opt-viewer
206 -----------------------------------------
208 The flag -fsave-optimization-record will generate .opt.yaml files when compiling
211 To run opt-viewer:
213 .. code-block:: console
215 llvm/tools/opt-viewer/opt-viewer.py -source-dir /path/to/program/src/ \
218 -o ./output
221 to view all diagnostics from your program in opt-viewer. Compile with `PGO
222 <https://clang.llvm.org/docs/UsersManual.html#profiling-with-instrumentation>`_ to view
223 Hotness information in opt-viewer. Resulting html files can be viewed in an internet browser.