[openmp] Base of tablegen generated OpenMP common declaration
authorValentin Clement <clementval@gmail.com>
Mon, 22 Jun 2020 13:32:47 +0000 (09:32 -0400)
committerValentin Clement <clementval@gmail.com>
Mon, 22 Jun 2020 13:34:53 +0000 (09:34 -0400)
commit9e525309fb3cbea4ab341b54d127d97831962285
treebe60220d11ca8d96e39c969181fe99da1ad9af66
parent03480c80d3a00765c92e8b2a9eab69af642ed274
[openmp] Base of tablegen generated OpenMP common declaration

Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.

Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp

Reviewed By: jdoerfert, jdenny

Subscribers: cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits

Tags: #llvm, #openmp, #clang

Differential Revision: https://reviews.llvm.org/D81736
27 files changed:
clang/lib/Parse/ParseOpenMP.cpp
clang/lib/Sema/SemaOpenMP.cpp
clang/lib/Tooling/CMakeLists.txt
clang/test/AST/ast-dump-openmp-target-parallel-for-simd.c
clang/test/AST/ast-dump-openmp-target-parallel-for.c
clang/test/AST/ast-dump-openmp-target-simd.c
clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for-simd.c
clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for.c
clang/test/AST/ast-dump-openmp-target-teams-distribute-simd.c
clang/test/AST/ast-dump-openmp-target-teams-distribute.c
clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for-simd.c
clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for.c
clang/test/AST/ast-dump-openmp-teams-distribute-simd.c
clang/test/AST/ast-dump-openmp-teams-distribute.c
llvm/include/llvm/CMakeLists.txt
llvm/include/llvm/Frontend/Directive/DirectiveBase.td [new file with mode: 0644]
llvm/include/llvm/Frontend/OpenMP/CMakeLists.txt [new file with mode: 0644]
llvm/include/llvm/Frontend/OpenMP/OMP.td [new file with mode: 0644]
llvm/include/llvm/Frontend/OpenMP/OMPConstants.h
llvm/lib/Frontend/OpenMP/CMakeLists.txt
llvm/lib/Frontend/OpenMP/OMPConstants.cpp
llvm/test/TableGen/directive1.td [new file with mode: 0644]
llvm/test/TableGen/directive2.td [new file with mode: 0644]
llvm/utils/TableGen/CMakeLists.txt
llvm/utils/TableGen/DirectiveEmitter.cpp [new file with mode: 0644]
llvm/utils/TableGen/TableGen.cpp
llvm/utils/TableGen/TableGenBackends.h