[flang-commits] [flang] [flang][openacc] Use original input for base address with optional (PR #80931)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Wed Feb 7 11:42:31 PST 2024


clementval wrote:

> Thank you, Valentin!
> 
> It looks good to me, though, I think we will need to handle optional arguments differently in more complex cases. If I am reading OpenACC 3.3 2.17.1 right, the following data clause does not have any effect:
> 
> ```
> type(t), optional :: x(:)
> !$acc enter data copyin(x(10)%member(10)%member)
> ```
> 
> So it looks like we need to conditionalize the designator lowering with the isPresent check earlier. It is not for this PR.

Yes it does not have any effect if x is absent. We will need to revisit this to handle all these cases correctly. Lowering became complex because we have an assumption that the bounds are reachable from the data op. Mayeb we will need to change that somehow. 

https://github.com/llvm/llvm-project/pull/80931


More information about the flang-commits mailing list