[PATCH] [OPENMP] Do not emit references to original variables in 'private' clause.

Alexey Bataev a.bataev at hotmail.com
Thu May 7 03:36:17 PDT 2015


Hi rsmith, rjmccall, hfinkel,

Currently if the variable is captured in captured region, capture record for this region stores reference to this variable for future use. But we don't need to provide the reference to the original variable if it was explicitly marked as private in the 'private' clause of the OpenMP construct, this variable is replaced by private copy.
We cannot eliminate corresponding FieldDecl for this variable from the capture record, because this FieldDecl may be required for some constructs like 'omp task'.

http://reviews.llvm.org/D9550

Files:
  include/clang/Sema/Sema.h
  lib/CodeGen/CGStmt.cpp
  lib/Sema/SemaExpr.cpp
  lib/Sema/SemaOpenMP.cpp
  test/OpenMP/parallel_private_codegen.cpp
  test/OpenMP/task_private_codegen.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9550.25149.patch
Type: text/x-patch
Size: 8509 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150507/bdc7db64/attachment.bin>


More information about the cfe-commits mailing list