[PATCH] D84422: [OpenMP] Fix `present` for exit from `omp target data`
Ravi Narayanaswamy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 24 15:12:23 PDT 2020
RaviNarayanaswamy added a comment.
In D84422#2173372 <https://reviews.llvm.org/D84422#2173372>, @jdenny wrote:
> 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`.
I would rather not have a check if not required by the spec as it would an unnecessary overhead to performance.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84422/new/
https://reviews.llvm.org/D84422
More information about the llvm-commits
mailing list