This is an archive of the discontinued LLVM Phabricator instance.

[libomptarget] Make omp_target_is_present checks storage instead of zero length array.
ClosedPublic

Authored by ye-luo on Apr 15 2022, 8:22 PM.

Details

Summary

Consider checking whether a pointer has been mapped can be achieved via omp_get_mapped_ptr.
omp_target_is_present is more needed to check whether the storage being pointed is mapped.
This restore the old behavior of omp_target_is_present before D123093
Fixes https://github.com/llvm/llvm-project/issues/54899

Diff Detail

Event Timeline

ye-luo created this revision.Apr 15 2022, 8:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2022, 8:22 PM
ye-luo requested review of this revision.Apr 15 2022, 8:22 PM
Herald added a project: Restricted Project. · View Herald Transcript
ye-luo edited the summary of this revision. (Show Details)Apr 15 2022, 8:24 PM
ye-luo added reviewers: RaviNarayanaswamy, jdenny.
jdenny accepted this revision.Apr 16 2022, 6:53 AM

LGTM based on your discussion so far with the language committee, but please give Ravi some time to comment.

openmp/libomptarget/test/mapping/target_implicit_partial_map.c
19

I suggest checking another boundary case too: &arr[49].

This revision is now accepted and ready to land.Apr 16 2022, 6:53 AM
ye-luo updated this revision to Diff 423238.Apr 16 2022, 7:56 AM

Expand the test.

This revision was landed with ongoing or failed builds.Apr 22 2022, 3:37 PM
This revision was automatically updated to reflect the committed changes.