[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

Joel E. Denny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 11 08:47:48 PDT 2019


jdenny updated this revision to Diff 214559.
jdenny marked 3 inline comments as done.
jdenny edited the summary of this revision.
jdenny set the repository for this revision to rG LLVM Github Monorepo.
jdenny added a comment.

In D65835#1624477 <https://reviews.llvm.org/D65835#1624477>, @ABataev wrote:

> Try something like `target parallel firstprivate (a) map(a)`. Currently it will create a firstprivate copy of the variable a in target context thought it is not required at all. It may lead to increased register pressure and performance degradation.


Thanks.  The only combination that appears to be affected is `firstprivate` and `map` for scalar types.  I had only tried arrays and structs earlier, but they're not affected. If I had looked a little more closely at the test case this patch already introduced, I would have noticed that `int` is affected.  The problematic analysis is in sema, where there was an apparent assumption that `firstprivate` wouldn't appear with `map` due to the previous restriction.  This update fixes that.

For my previous update, I meant to point out that I introduced a fixme into the test suite.  See the phabricator summary for details.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65835/new/

https://reviews.llvm.org/D65835

Files:
  clang/include/clang/Sema/ScopeInfo.h
  clang/include/clang/Sema/Sema.h
  clang/lib/Sema/Sema.cpp
  clang/lib/Sema/SemaExpr.cpp
  clang/lib/Sema/SemaOpenMP.cpp
  clang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp
  clang/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp
  clang/test/OpenMP/target_teams_distribute_simd_firstprivate_messages.cpp
  clang/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp
  clang/test/OpenMP/target_teams_distribute_simd_private_messages.cpp
  clang/test/OpenMP/target_teams_map_codegen.cpp
  clang/test/OpenMP/target_teams_map_messages.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65835.214559.patch
Type: text/x-patch
Size: 24918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190811/0b85b283/attachment-0001.bin>


More information about the cfe-commits mailing list