[PATCH] D21150: [OpenMP] Cast captures by copy when passed to fork call so that they are compatible to what the runtime library expects.

Samuel Antao via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 8 12:59:04 PDT 2016


sfantao created this revision.
sfantao added reviewers: ABataev, hfinkel, arpith-jacob, carlo.bertolli, kkwli0.
sfantao added subscribers: caomhin, cfe-commits.

This patch fixes an issue detected when firstprivate variables are passed to an OpenMP outlined function vararg list. Currently they are not compatible with what the runtime library expects causing malfunction in some targets.

This patch fixes the issue by moving the casting logic already in place for offloading to the common code that creates the outline function and arguments and updates the regression tests accordingly.

http://reviews.llvm.org/D21150

Files:
  lib/CodeGen/CGOpenMPRuntime.cpp
  lib/CodeGen/CGStmtOpenMP.cpp
  lib/CodeGen/CodeGenFunction.h
  test/OpenMP/for_firstprivate_codegen.cpp
  test/OpenMP/parallel_firstprivate_codegen.cpp
  test/OpenMP/sections_firstprivate_codegen.cpp
  test/OpenMP/single_codegen.cpp
  test/OpenMP/single_firstprivate_codegen.cpp
  test/OpenMP/teams_firstprivate_codegen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21150.60084.patch
Type: text/x-patch
Size: 43314 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160608/cf630cb4/attachment-0001.bin>


More information about the cfe-commits mailing list