[PATCH] [OPENMP] Bugfix for processing of global variables in OpenMP regions.

Alexey Bataev a.bataev at hotmail.com
Thu Nov 13 21:29:54 PST 2014


Hi rsmith, rjmccall, fraggamuffin, ejstotzer,

Currently, if global variable is marked as a private OpenMP variable, the compiler crashes in debug version or generates incorrect code in release version. It happens because in the OpenMP region the original global variable is used instead of the generated private copy. It happens because currently globals variables are not captured in the OpenMP region.
This patch adds capturing of global variables iff private copy of the global variable must be used in the OpenMP region.

http://reviews.llvm.org/D6259

Files:
  include/clang/Sema/Sema.h
  lib/CodeGen/CGExpr.cpp
  lib/CodeGen/CodeGenFunction.h
  lib/Sema/SemaExpr.cpp
  lib/Sema/SemaOpenMP.cpp
  test/OpenMP/parallel_firstprivate_codegen.cpp
  test/OpenMP/parallel_private_codegen.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6259.16194.patch
Type: text/x-patch
Size: 15869 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141114/706ebbed/attachment.bin>


More information about the cfe-commits mailing list