3 OpenMP runtime call <call> deduplicated. [OMP170]
4 ====================================================================
6 This optimization remark indicates that a call to an OpenMP runtime call was
7 replaced with the result of an existing one. This occurs when the compiler knows
8 that the result of a runtime call is immutable. Removing duplicate calls is done
9 by replacing all calls to that function with the result of the first call. This
10 cannot be done automatically by the compiler because the implementations of the
11 OpenMP runtime calls live in a separate library the compiler cannot see.
16 This optimization will trigger for known OpenMP runtime calls whose return value
22 double *A = malloc(N * omp_get_thread_limit());
23 double *B = malloc(N * omp_get_thread_limit());
26 work(&A[omp_get_thread_num() * N]);
28 work(&B[omp_get_thread_num() * N]);
31 .. code-block:: console
33 $ clang -fopenmp -O2 -Rpass=openmp-opt omp170.c
34 ompi170.c:2:26: remark: OpenMP runtime call omp_get_thread_limit deduplicated. [OMP170]
35 double *A = malloc(N * omp_get_thread_limit());
41 OpenMP optimization remark.