39 lines · plain
1.. _omp180:2 3Replacing OpenMP runtime call <call> with <value>.4====================================================================5 6This optimization remark indicates that analysis determined an OpenMP runtime7calls can be replaced with a constant value. This can occur when an OpenMP8runtime call that queried some internal state was found to always return a9single value after analysis.10 11Example12-------13 14This optimization will trigger for most target regions to simplify the runtime15once certain constants are known. This will trigger for internal runtime16functions so it requires enabling verbose remarks with17`-openmp-opt-verbose-remarks` (prefixed with `-mllvm` for use with clang).18 19.. code-block:: c++20 21 void foo() {22 #pragma omp target parallel23 { }24 }25 26.. code-block:: console27 28 $ clang test.c -fopenmp -fopenmp-targets=nvptx64 -O1 -Rpass=openmp-opt \29 -mllvm -openmp-opt-verbose-remarks30 remark: Replacing runtime call __kmpc_is_spmd_exec_mode with 1. [OMP180] [-Rpass=openmp-opt]31 remark: Replacing runtime call __kmpc_is_spmd_exec_mode with 1. [OMP180] [-Rpass=openmp-opt]32 remark: Replacing runtime call __kmpc_parallel_level with 1. [OMP180] [-Rpass=openmp-opt]33 remark: Replacing runtime call __kmpc_parallel_level with 1. [OMP180] [-Rpass=openmp-opt]34 35Diagnostic Scope36----------------37 38OpenMP optimization remark.39