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

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 10 15:44:46 PDT 2019


ABataev added a comment.

In D65835#1624471 <https://reviews.llvm.org/D65835#1624471>, @jdenny wrote:

> I made the following changes, as suggested:
>
> - Add back restriction for OpenMP < 5.0.
> - Remove `is_device_ptr` changes.
>
>   Alexey, you said:
>
> > Plus, these changes are not enough to support this new feature from OpenMP 5.0. There definitely must be some changes in the codegen. If the variable is mapped in the target construct, we should not generate a code for the private clause of this variable on the target construct, since, in this case, private clauses are applied for the inner subdirectives, which are the part of the combined directive, but not the target part of the directive.
>
> I haven't spent enough time exploring codegen here in the past, so I'm starting out by investigating the codegen output for various examples.  I'm looking for differences between a combined `target teams` and an equivalent separate `target` and `teams`.  So far, I see nothing but superficial differences.  Do you have an example where there's an undesirable difference?
>
> Thanks.


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.


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

https://reviews.llvm.org/D65835





More information about the cfe-commits mailing list