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
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits