OSDN Git Service

[openmp] Base of tablegen generated OpenMP common declaration
authorValentin Clement <clementval@gmail.com>
Tue, 23 Jun 2020 13:29:50 +0000 (09:29 -0400)
committerValentin Clement <clementval@gmail.com>
Tue, 23 Jun 2020 14:32:32 +0000 (10:32 -0400)
commitd90443b1d93d50340f8af1f50c771e34ca2d0f90
tree6466f3b3b218460d60f1d0831948da40035bad2d
parent3f353a2e5a98d19be2a4d7414b8eb258c32965fd
[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: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits

Tags: #llvm, #openmp, #clang

Differential Revision: https://reviews.llvm.org/D81736
45 files changed:
clang/lib/ARCMigrate/CMakeLists.txt
clang/lib/AST/CMakeLists.txt
clang/lib/ASTMatchers/CMakeLists.txt
clang/lib/ASTMatchers/Dynamic/CMakeLists.txt
clang/lib/Analysis/CMakeLists.txt
clang/lib/Basic/CMakeLists.txt
clang/lib/Frontend/Rewrite/CMakeLists.txt
clang/lib/Index/CMakeLists.txt
clang/lib/Parse/CMakeLists.txt
clang/lib/Parse/ParseOpenMP.cpp
clang/lib/Sema/CMakeLists.txt
clang/lib/Sema/SemaOpenMP.cpp
clang/lib/Serialization/CMakeLists.txt
clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt
clang/lib/StaticAnalyzer/Core/CMakeLists.txt
clang/lib/StaticAnalyzer/Frontend/CMakeLists.txt
clang/lib/Tooling/ASTDiff/CMakeLists.txt
clang/lib/Tooling/CMakeLists.txt
clang/lib/Tooling/Refactoring/CMakeLists.txt
clang/lib/Tooling/Syntax/CMakeLists.txt
clang/lib/Tooling/Transformer/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