[OPENMP] Implementation of codegen for firstprivate clause of target directive
authorCarlo Bertolli <cbertol@us.ibm.com>
Fri, 18 Mar 2016 21:43:32 +0000 (21:43 +0000)
committerCarlo Bertolli <cbertol@us.ibm.com>
Fri, 18 Mar 2016 21:43:32 +0000 (21:43 +0000)
commitb74bfc80a434b645bddeb5865c28a3bdaa5440b8
treec333045a0c346a158f42cda8032f1b3cf6d2e3f7
parent9359b8fe5d944c8355ea49ba949d481fe080cec9
[OPENMP] Implementation of codegen for firstprivate clause of target directive

This patch implements the following aspects:

It extends sema to check that a variable is not reference in both a map clause and firstprivate or private. This is needed to ensure correct functioning at codegen level, apart from being useful for the user.
It implements firstprivate for target in codegen. The implementation applies to both host and nvptx devices.
It adds regression tests for codegen of firstprivate, host and device side when using the host as device, and nvptx side.
Please note that the regression test for nvptx codegen is missing VLAs. This is because VLAs currently require saving and restoring the stack which appears not to be a supported operation by nvptx backend.

It adds a check in sema regression tests for target map, firstprivate, and private clauses.

http://reviews.llvm.org/D18203

llvm-svn: 263837
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/CodeGen/CGOpenMPRuntime.cpp
clang/lib/Sema/SemaOpenMP.cpp
clang/test/OpenMP/nvptx_target_firstprivate_codegen.cpp [new file with mode: 0644]
clang/test/OpenMP/target_firstprivate_codegen.cpp [new file with mode: 0644]
clang/test/OpenMP/target_firstprivate_messages.cpp
clang/test/OpenMP/target_map_messages.cpp
clang/test/OpenMP/target_private_messages.cpp