[flang][openacc] Lower data construct operand to data operand operations
authorValentin Clement <clementval@gmail.com>
Thu, 4 May 2023 17:36:41 +0000 (10:36 -0700)
committerValentin Clement <clementval@gmail.com>
Thu, 4 May 2023 17:37:06 +0000 (10:37 -0700)
commit3bcc28becd403f80099d1774e1f02705f785ceaf
tree868ce545712659a5a9135f3c218770a642fcf3ab
parenta4ba7da367efe2a76207594a139d14e2764d96cc
[flang][openacc] Lower data construct operand to data operand operations

This patch lowers the data clause on the OpenACC data construct
to their corresponding acc data operand operation.
The copy clause is decomposed into acc.copyin before and acc.copyout after
the acc.data operation.
The copyout close is decomposed into acc.create before and acc.copyout after
the acc.data operation.
The attach clause is decomposed into acc.attach before and acc.detach after
the acc.data operation.

Depends on D149601

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D149673
flang/lib/Lower/OpenACC.cpp
flang/test/Lower/OpenACC/acc-data-operands.f90
flang/test/Lower/OpenACC/acc-data.f90