[PATCH] D20112: [OpenMP] Add support for the 'private pointer' flag to signal variables captured in target regions and used in first-private clauses.
Samuel Antao via cfe-commits
cfe-commits at lists.llvm.org
Mon May 16 16:38:40 PDT 2016
sfantao marked 2 inline comments as done.
sfantao added a comment.
Hi Alexey,
Thanks for the review!
================
Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:5452
@@ +5451,3 @@
+ // in there.
+ for (const auto *C : D.getClausesOfKind<OMPFirstprivateClause>()) {
+ for (const auto *D : C->varlists()) {
----------------
ABataev wrote:
> I think this is too greedy. You're rescanning list of firstprivates clauses/variables for each variable.
Ok, I'm now saving the extracted first private info in the mappable expression handler so it can be reused for different captures.
================
Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:5458
@@ +5457,3 @@
+ // 'private ptr' and 'map to' flag.
+ if (CurVD == VD)
+ return MappableExprsHandler::OMP_MAP_PRIVATE_PTR |
----------------
ABataev wrote:
> What if the variable is also referenced in lastprivate clause?
The directives with `target` only take `firstprivate` or `private`. So, we disregard `lastprivate` in this code.
http://reviews.llvm.org/D20112
More information about the cfe-commits
mailing list