[PATCH] D18542: [OPENMP] Parsing and Sema support for 'omp declare target' directive

Dmitry Polukhin via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 29 01:51:15 PDT 2016


DmitryPolukhin created this revision.
DmitryPolukhin added reviewers: ABataev, aaron.ballman.
DmitryPolukhin added subscribers: cfe-commits, fraggamuffin.

Add parsing, sema analysis for 'declare target' construct for OpenMP 4.0
(4.5 support will be added in separate patch).

The declare target directive specifies that variables, functions (C, C++
and Fortran), and subroutines (Fortran) are mapped to a device. The declare
target directive is a declarative directive. In Clang declare target is
implemented as implicit attribute for the declaration.

The syntax of the declare target directive is as follows:

 #pragma omp declare target
 declarations-definition-seq
 #pragma omp end declare target

Based on patch from Michael Wong http://reviews.llvm.org/D15321

http://reviews.llvm.org/D18542

Files:
  include/clang/AST/ASTMutationListener.h
  include/clang/AST/Attr.h
  include/clang/Basic/Attr.td
  include/clang/Basic/DiagnosticGroups.td
  include/clang/Basic/DiagnosticParseKinds.td
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Basic/OpenMPKinds.def
  include/clang/Sema/Sema.h
  include/clang/Serialization/ASTWriter.h
  lib/AST/ASTContext.cpp
  lib/AST/DeclPrinter.cpp
  lib/Basic/OpenMPKinds.cpp
  lib/Frontend/MultiplexConsumer.cpp
  lib/Parse/ParseOpenMP.cpp
  lib/Sema/SemaDecl.cpp
  lib/Sema/SemaExpr.cpp
  lib/Sema/SemaOpenMP.cpp
  lib/Serialization/ASTCommon.h
  lib/Serialization/ASTReaderDecl.cpp
  lib/Serialization/ASTWriter.cpp
  lib/Serialization/ASTWriterDecl.cpp
  test/OpenMP/declare_target_ast_print.cpp
  test/OpenMP/declare_target_messages.cpp
  utils/TableGen/ClangAttrEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18542.51878.patch
Type: text/x-patch
Size: 34710 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160329/1fffcc2c/attachment-0001.bin>


More information about the cfe-commits mailing list