[PATCH] D151972: [flang][openacc] Add parsing support for dim in gang clause

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 4 17:23:14 PDT 2023


clementval added inline comments.


================
Comment at: flang/test/Parser/acc-unparse.f90:57
+
+  !$acc loop gang(num: gangNum, dim: gangDim)
+  do i = 1, 10
----------------
Anastasia wrote:
> Btw `dim` and `num` should not appear together, s2.9.2  paragraph 1 says:
> 
> ```
> The dim argument must be a constant positive integer with value 1, 2, or 3. <...> The number of gangs in dimension d is controlled by the parallel construct; the num argument is not allowed.
> ```
> 
> There are a number of other restrictions, for example the value of `dim` can only be  an integer literal in the range 1-3 and  it has to appear only once. But maybe you plan to add the diagnostics later?
Thanks for catching this! I overlooked these restrictions when I checked the spec.
I’ll at least update this patch with the `num argument is not allowed` here. I might do another patch for the remaining restrictions.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151972/new/

https://reviews.llvm.org/D151972



More information about the llvm-commits mailing list