1 OpenMP Optimization Remarks
2 ===========================
4 The :doc:`OpenMP-Aware optimization pass </optimizations/OpenMPOpt>` is able to
5 generate compiler remarks for performed and missed optimisations. To emit them,
6 pass these options to the Clang invocation: ``-Rpass=openmp-opt
7 -Rpass-analysis=openmp-opt -Rpass-missed=openmp-opt``. For more information and
8 features of the remark system, consult the clang documentation:
10 + `Clang options to emit optimization reports <https://clang.llvm.org/docs/UsersManual.html#options-to-emit-optimization-reports>`_
11 + `Clang diagnostic and remark flags <https://clang.llvm.org/docs/ClangCommandLineReference.html#diagnostic-flags>`_
12 + The `-foptimization-record-file flag
13 <https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-foptimization-record-file>`_
14 and the `-fsave-optimization-record flag
15 <https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang1-fsave-optimization-record>`_
49 * - Diagnostics Number
51 - Diagnostics Description
52 * - :ref:`OMP100 <omp100>`
54 - Potentially unknown OpenMP target region caller.
55 * - :ref:`OMP101 <omp101>`
57 - Parallel region is used in unknown / unexpected ways. Will not attempt to
58 rewrite the state machine.
59 * - :ref:`OMP102 <omp102>`
61 - Parallel region is not called from a unique kernel. Will not attempt to
62 rewrite the state machine.
63 * - :ref:`OMP110 <omp110>`
65 - Moving globalized variable to the stack.
66 * - :ref:`OMP111 <omp111>`
68 - Replaced globalized variable with X bytes of shared memory.
69 * - :ref:`OMP112 <omp112>`
71 - Found thread data sharing on the GPU. Expect degraded performance due to
73 * - :ref:`OMP113 <omp113>`
75 - Could not move globalized variable to the stack. Variable is potentially
76 captured in call. Mark parameter as `__attribute__((noescape))` to
78 * - :ref:`OMP120 <omp120>`
80 - Transformed generic-mode kernel to SPMD-mode.
81 * - :ref:`OMP121 <omp121>`
83 - Value has potential side effects preventing SPMD-mode execution. Add
84 `[[omp::assume(\"ompx_spmd_amenable\")]]` to the called function
86 * - :ref:`OMP130 <omp130>`
88 - Removing unused state machine from generic-mode kernel.
89 * - :ref:`OMP131 <omp131>`
91 - Rewriting generic-mode kernel with a customized state machine.
92 * - :ref:`OMP132 <omp132>`
94 - Generic-mode kernel is executed with a customized state machine that
96 * - :ref:`OMP133 <omp133>`
98 - Call may contain unknown parallel regions. Use
99 `[[omp::assume("omp_no_parallelism")]]` to override.
100 * - :ref:`OMP140 <omp140>`
102 - Could not internalize function. Some optimizations may not be possible.
103 * - :ref:`OMP150 <omp150>`
105 - Parallel region merged with parallel region at <location>.
106 * - :ref:`OMP160 <omp160>`
108 - Removing parallel region with no side-effects.
109 * - :ref:`OMP170 <omp170>`
111 - OpenMP runtime call <call> deduplicated.
112 * - :ref:`OMP180 <omp180>`
114 - Replacing OpenMP runtime call <call> with <value>.
115 * - :ref:`OMP190 <omp190>`
117 - Redundant barrier eliminated. (device only)