This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Fix always,from and delete for data absent at exit
ClosedPublic

Authored by jdenny on Feb 18 2021, 2:33 PM.

Details

Summary

Without this patch, there's a runtime error for those map types at
exit from an "omp target data" or at "omp target exit data", but the
spec says the list item should be ignored.

This patch tests that fix in data_absent_at_exit.c, and it also
improves other testing for data that is not fully present at exit.

Diff Detail

Event Timeline

jdenny created this revision.Feb 18 2021, 2:33 PM
jdenny requested review of this revision.Feb 18 2021, 2:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 18 2021, 2:33 PM
Herald added a subscriber: sstefan1. · View Herald Transcript
jdenny added inline comments.Feb 18 2021, 2:41 PM
openmp/libomptarget/test/mapping/target_data_array_extension_at_exit.c
23

This was an accident in my D85342.

grokos accepted this revision.Feb 18 2021, 3:27 PM

Is this the missing behavior from D83061? Looks good, thanks!

This revision is now accepted and ready to land.Feb 18 2021, 3:27 PM

Is this the missing behavior from D83061? Looks good, thanks!

Can you print a message under debug stating pointer does not exist

openmp/libomptarget/src/omptarget.cpp
579–580

Can you print a message under debug pointer does not exist.

jdenny added a subscriber: ABataev.Feb 18 2021, 4:30 PM

Is this the missing behavior from D83061?

You mean the map clause reordering stuff? No, as far as I know, it has no effect on that. I believe @ABataev was working on something along those lines, but unfortunately I lost track.

Looks good, thanks!

Thanks!

openmp/libomptarget/src/omptarget.cpp
579–580

I'm happy to add an additional message, but what do you want beyond the DP invocations in the preceding if and else?

openmp/libomptarget/src/omptarget.cpp
579–580

The previous DP should be fine. Thanks

jdenny marked an inline comment as done.Feb 18 2021, 4:42 PM
jdenny added inline comments.
openmp/libomptarget/src/omptarget.cpp
579–580

OK, either way works for me. If you have a specific string, I'd be happy to add it before I push tomorrow.

This revision was automatically updated to reflect the committed changes.
jdenny marked an inline comment as done.