2 .. _omp_no_external_caller_in_target_region:
4 Potentially unknown OpenMP target region caller `[OMP100]`
5 ==========================================================
7 A function remark that indicates the function, when compiled for a GPU, is
8 potentially called from outside the translation unit. Note that a remark is
9 only issued if we tried to perform an optimization which would require us to
10 know all callers on the GPU.
12 To facilitate OpenMP semantics on GPUs we provide a runtime mechanism through
13 which the code that makes up the body of a parallel region is shared with the
14 threads in the team. Generally we use the address of the outlined parallel
15 region to identify the code that needs to be executed. If we know all target
16 regions that reach the parallel region we can avoid this function pointer
17 passing scheme and often improve the register usage on the GPU. However, If a
18 parallel region on the GPU is in a function with external linkage we may not
19 know all callers statically. If there are outside callers within target
20 regions, this remark is to be ignored. If there are no such callers, users can
21 modify the linkage and thereby help optimization with a `static` or
22 `__attribute__((internal))` function annotation. If changing the linkage is
23 impossible, e.g., because there are outside callers on the host, one can split
24 the function into an external visible interface which is not compiled for
25 the target and an internal implementation which is compiled for the target
26 and should be called from within the target region.