[PATCH] D92120: [flang][openacc] Update reference to OpenACC 3.1 specification

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 8 11:16:48 PST 2020


clementval added inline comments.


================
Comment at: flang/lib/Semantics/check-acc-structure.cpp:81
   case llvm::acc::Directive::ACCD_serial:
-    // Restriction - 919
+    // Restriction - line 1004-1005
     CheckOnlyAllowedAfter(llvm::acc::Clause::ACCC_device_type,
----------------
SouraVX wrote:
> No strong opinion here(on line number part), however in `openmp` semantics they mention section number and some description https://github.com/llvm/llvm-project/blob/main/flang/lib/Semantics/check-omp-structure.cpp#L74 having said that, that is also confusing since it doesn't mention that sections belongs to openmp4.5 or openmp5.0 or openmp5.1?
> Here atleast that part is clear all line number reference here refer to openacc3.1
I agree that I would prefer that standards add a unique numbering to the restriction like the Fortran standard does. In the mean time, since there is no way in Flang (at the moment) to differentiate two standards or to force to use one standard over another I guess this is the best I can do. 


================
Comment at: flang/lib/Semantics/check-acc-structure.cpp:149
-    // Restriction - 1962 -> (843-844) (PARALLEL LOOP)
-    CheckOnlyAllowedAfter(llvm::acc::Clause::ACCC_device_type,
-        {llvm::acc::Clause::ACCC_async, llvm::acc::Clause::ACCC_wait,
----------------
SouraVX wrote:
> Please help me understand this:
> This is a code change right ? Just curious, are there any test case modifications supporting this ? 
> Or is it just code refactoring ?
>From 3.1 the `serial` construct takes the same restriction as the `parallel` and `kernels` for the supported clauses after `device_type`. There was already couple of tests in this sense but I can surely add some more. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92120



More information about the llvm-commits mailing list