[PATCH] [OPENMP] Codegen for 'private' clause in 'parallel' directive

Alexey Bataev a.bataev at hotmail.com
Fri Aug 1 04:36:41 PDT 2014


Hi doug.gregor, hfinkel, rjmccall, rsmith, fraggamuffin, ejstotzer,

This patch generates some helper variables which used as a private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by default (with the default constructor, if any). In outlined function references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables and implicit barier is set by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables.

http://reviews.llvm.org/D4752

Files:
  include/clang/AST/DataRecursiveASTVisitor.h
  include/clang/AST/OpenMPClause.h
  include/clang/AST/RecursiveASTVisitor.h
  lib/AST/Stmt.cpp
  lib/AST/StmtProfile.cpp
  lib/CodeGen/CGOpenMPRuntime.cpp
  lib/CodeGen/CGOpenMPRuntime.h
  lib/CodeGen/CGStmtOpenMP.cpp
  lib/CodeGen/CodeGenFunction.h
  lib/Sema/SemaOpenMP.cpp
  lib/Serialization/ASTReaderStmt.cpp
  lib/Serialization/ASTWriterStmt.cpp
  test/OpenMP/for_private_messages.cpp
  test/OpenMP/parallel_codegen.cpp
  test/OpenMP/parallel_for_private_messages.cpp
  test/OpenMP/parallel_private_codegen.cpp
  test/OpenMP/parallel_private_messages.cpp
  test/OpenMP/parallel_sections_private_messages.cpp
  test/OpenMP/sections_private_messages.cpp
  test/OpenMP/simd_private_messages.cpp
  test/OpenMP/single_private_messages.cpp
  test/OpenMP/task_private_messages.cpp
  tools/libclang/CIndex.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4752.12099.patch
Type: text/x-patch
Size: 46135 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140801/16042aac/attachment.bin>


More information about the cfe-commits mailing list