Description
Diagnostics emitted by LLVM's OpenMP runtime are expressed in terms of OpenMP concepts. However, within the Clacc and Flacc projects, the OpenACC runtime is being built on top of the OpenMP runtime, and those diagnostics are not always meaningful to OpenACC users.
First, we need a mechanism that selects OpenACC versions of diagnostics that are emitted as a result of any OpenACC-related call into the runtime. OpenMP-related calls into the runtime should continue to produce the original diagnostics even if they are made from the same application. For example, the diagnostic mode might be per host thread. This mechanism should be general enough that it could be used for programming languages besides OpenMP and OpenACC. This mechanism might be built on top of the internationalization facility already used in parts of LLVM's OpenMP runtime, but that would need to be extended to libomptarget, which is critical for OpenACC use cases.
Second, OpenACC translations need to be provided for existing diagnostics. This step requires an understanding of the relationship between OpenACC and OpenMP as implemented in Clacc and Flacc.