[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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263837 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Basic/DiagnosticSemaKinds.td 2 additions, 0 deletionsinclude/clang/Basic/DiagnosticSemaKinds.td
- lib/CodeGen/CGOpenMPRuntime.cpp 1 addition, 0 deletionslib/CodeGen/CGOpenMPRuntime.cpp
- lib/Sema/SemaOpenMP.cpp 41 additions, 0 deletionslib/Sema/SemaOpenMP.cpp
- test/OpenMP/nvptx_target_firstprivate_codegen.cpp 235 additions, 0 deletionstest/OpenMP/nvptx_target_firstprivate_codegen.cpp
- test/OpenMP/target_firstprivate_codegen.cpp 595 additions, 0 deletionstest/OpenMP/target_firstprivate_codegen.cpp
- test/OpenMP/target_firstprivate_messages.cpp 2 additions, 0 deletionstest/OpenMP/target_firstprivate_messages.cpp
- test/OpenMP/target_map_messages.cpp 4 additions, 0 deletionstest/OpenMP/target_map_messages.cpp
- test/OpenMP/target_private_messages.cpp 2 additions, 0 deletionstest/OpenMP/target_private_messages.cpp
Loading
Please register or sign in to comment