We are missing the deletion part of the copyin clause after a region or
in a destructor. This PR completes its implementation for data regions,
compute regions, and global declarations.
Example:
```f90
subroutine sub()
real :: x(1:10)
!$acc data copyin(x)
!$acc end data
end subroutine sub
```
We are getting the following:
```mlir
%5 = acc.copyin varPtr(%2#0 : !fir.ref<!fir.array<10xf32>>) bounds(%4) -> !fir.ref<!fir.array<10xf32>> {name = "x"}
acc.data dataOperands(%5 : !fir.ref<!fir.array<10xf32>>) {
acc.terminator
}
return
```
With this PR, we'll get:
```mlir
%5 = acc.copyin varPtr(%2#0 : !fir.ref<!fir.array<10xf32>>) bounds(%4) -> !fir.ref<!fir.array<10xf32>> {name = "x"}
acc.data dataOperands(%5 : !fir.ref<!fir.array<10xf32>>) {
acc.terminator
}
acc.delete accPtr(%5 : !fir.ref<!fir.array<10xf32>>) bounds(%4) {dataClause = #acc<data_clause acc_copyin>, name = "x"}
return
```
206 KiB
206 KiB