llvm-doe-org / llvm-project

The LLVM DOE Fork is a fork of upstream LLVM (https://github.com/llvm/llvm-project/) that hosts multiple DOE-funded projects. Contact information and other details for each project are described in the wiki.
https://github.com/llvm-doe-org/llvm-project/wiki/
Other
22 stars 13 forks source link

OpenACC diagnostics from LLVM's OpenMP runtime #4

Open jdenny-ornl opened 3 years ago

jdenny-ornl commented 3 years ago

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.