[Openmp-commits] [PATCH] D146000: [OpenMP]Skip generating this[:1] map info for non-member variable.

Jennifer Yu via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Mar 13 16:28:17 PDT 2023


jyu2 created this revision.
jyu2 added reviewers: ABataev, mikerice, jdoerfert.
Herald added subscribers: sunshaoce, guansong, yaxunl.
Herald added a project: All.
jyu2 requested review of this revision.
Herald added subscribers: openmp-commits, cfe-commits, sstefan1.
Herald added projects: clang, OpenMP.

My change of D14093 <https://reviews.llvm.org/D14093> is only fixed problem for "pragma target data".

The problem still here for "pragma target"
what I am missing is:
When processing "pragma target data", the VD is passed when call to
emitCombinedEntry, so check VD is null as map for this pointer.

But when processing "pragma target" the VD is passed as nullptr, so
check VD is null is not working.

To fix this I add a new parameter IsMapThis. During the call to
emitCombinedEntry passes true if it is capturing this pointer and use
that instead check of "!VD".


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146000

Files:
  clang/lib/CodeGen/CGOpenMPRuntime.cpp
  clang/test/OpenMP/target_map_member_expr_codegen.cpp
  openmp/libomptarget/test/mapping/target_map_for_member_data.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146000.504883.patch
Type: text/x-patch
Size: 15242 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230313/6999e3d7/attachment.bin>


More information about the Openmp-commits mailing list