[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
Wed May 25 10:33:34 PDT 2016
sfantao added a comment.
Hi Alexey,
Thanks for the review!
================
Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:5630-5639
@@ -5599,6 +5629,12 @@
// type, the default is 'tofrom'.
CurMapTypes.push_back(ElementType->isAggregateType()
? (MappableExprsHandler::OMP_MAP_TO |
MappableExprsHandler::OMP_MAP_FROM)
: MappableExprsHandler::OMP_MAP_TO);
+
+ // If we have a capture by reference we may need to add the private
+ // pointer flag if the base declaration shows in some first-private
+ // clause.
+ CurMapTypes.back() = MCHandler.adjustMapModifiersForPrivateClauses(
+ CI, CurMapTypes.back());
}
----------------
ABataev wrote:
> Maybe it is better to join all this code into a single function?
I agree. Moved all the default map information generation to a new function in the mappable expressions handler.
http://reviews.llvm.org/D20112
More information about the cfe-commits
mailing list