This is an archive of the discontinued LLVM Phabricator instance.

[flang][openacc] Lower copyout, detach and delete to data exit operations
ClosedPublic

Authored by clementval on May 1 2023, 11:15 AM.

Details

Summary

Add support to lower data exit operations and use it for the
copyout, detach and delete clause on the !$acc exit data construct.

This patch refactor the data entry op creation so most part of the code
can be shared with the data exit op.

Diff Detail

Event Timeline

clementval created this revision.May 1 2023, 11:15 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 1 2023, 11:15 AM
clementval requested review of this revision.May 1 2023, 11:15 AM
clementval edited the summary of this revision. (Show Details)May 1 2023, 11:22 AM
clementval updated this revision to Diff 518601.May 1 2023, 4:38 PM
clementval edited the summary of this revision. (Show Details)

Rebase

Just a small change requested on test. Otherwise this looks great. Thank you.

flang/test/Lower/OpenACC/acc-exit-data.f90
17–20

Would you mind swapping order of acc.exit_data and acc.delete? For structured operations, the "exit" operations follow the construct's region. Thus this should be consistent.

clementval added inline comments.May 2 2023, 8:51 AM
flang/test/Lower/OpenACC/acc-exit-data.f90
17–20

I can do that. Let me update the patch.

Move acc.delete/acc.detach/acc.copyout after the acc.exit_data

clang-format

jeanPerier accepted this revision.May 3 2023, 5:02 AM
This revision is now accepted and ready to land.May 3 2023, 5:02 AM