[Openmp-commits] [PATCH] D84422: [OpenMP] Fix `present` for exit from `omp target data`

Joel E. Denny via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Jul 24 14:42:06 PDT 2020


jdenny added a comment.

In D84422#2172898 <https://reviews.llvm.org/D84422#2172898>, @jdenny wrote:

> Has anyone clarified the motivation for this behavior?


I meant, is there any insight into why the spec specifies this behavior?

In D84422#2172926 <https://reviews.llvm.org/D84422#2172926>, @grokos wrote:

> Instead of introducing new API functions and making all these changes in all these files, wouldn't it be easier if we just unset the `PRESENT` flag from arg_types in clang when we generate the call to `__tgt_target_data_end_*` if we are exiting from a scoped environment?


Ah, that does sound simpler.  Thanks.  I'll look into it.

Suppressing the presence check on exit from `omp target` would require a runtime change in addition to the Clang change you suggest for `omp target data`.  However, I've so far failed to formulate a reasonable test case.  Specifically, I don't yet see a way to guarantee that the data will definitely be present at the start of `omp target` but might not be present by the end.  Is it possible?  If not, then maybe we should leave the check in place for `omp target`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84422





More information about the Openmp-commits mailing list