Open
Description
Clacc includes prototypes for OpenMP features that are needed to support OpenACC but that are not yet implemented in upstream LLVM. Some of these features are specified in the OpenMP standard, and some are original extensions. Many of these features can be upstreamed independently of the rest of Clacc.
This github issue is a general catchall for upstreaming OpenMP features from Clacc. We are also creating github issues for specific features and pointing here for general discussion:
The general tasks for upstreaming OpenMP features from Clacc are as follows:
- Coordinate with the LLVM community
- For complicated cases, especially OpenMP extensions, an initial RFC might be worthwhile.
- For a standard OpenMP feature, at least claim the feature in upstream main's
clang/docs/OpenMPSupport.rst
. If it's already claimed or completed by someone else, you might work with that person, or you might replace Clacc's implementation with theirs. - For an OpenMP extension, you need to be prepared to justify the feature and potentially redesign it if requested. To justify it, you might discuss the following:
- Any OpenMP runtime component is intended to support OpenACC in both Flang and Clang.
- Any Clang component is intended to support OpenACC in Clang because Clacc translates OpenACC to OpenMP at the AST level.
- All components are intended to be useful to OpenMP users in the same way as the original OpenACC feature is useful to OpenACC users.
- Extract from Clacc
- Extract the implementation from Clacc and rebase it onto upstream's
main
branch. - Specific github issues usually point out the commit where the feature was initially prototyped in Clacc. However, there may be many later commits that improve the implementation.
- Extract the implementation from Clacc and rebase it onto upstream's
- Complete the implementation
- OpenMP prototypes in Clacc focus on achieving OpenACC support. Thus, some may require more work before upstreaming, especially in OpenMP-level documentation and testing.
- Some OpenMP extensions may require renaming based on the LLVM community's current guidelines for OpenMP extensions.
- Upstream
- Iterate with reviewers in phabricator until it's committed.
- Once the feature seems stable enough, propose any OpenMP clarifications or extensions to the OpenMP specification.
- Along the way, port any improvements back into Clacc, and update any related Clacc documentation.