[PATCH] D83326: [flang][openmp] Check clauses allowed semantic with tablegen generated map

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 10 16:04:47 PDT 2020


clementval marked 7 inline comments as done.
clementval added inline comments.


================
Comment at: flang/test/Semantics/omp-clause-validity01.f90:457
 
-  !ERROR: REDUCTION clause is not allowed on the TASKLOOP SIMD directive
   !$omp taskloop simd reduction(+:a)
----------------
jdoerfert wrote:
> clementval wrote:
> > ichoyjx wrote:
> > > clementval wrote:
> > > > As a side note, This is supposed to be fine in Clang so I removed the check. I looked at the OpenMP 5.0 std and didn't see a restriction on `reduction` for `task loop simd`.
> > > What's the current plan? Are we trying to cover OpenMP 5.0 Spec for semantics (it appears so)?
> > Clang just moved to 5.0as default and my guesses that we are targeting 5.0 as well since it is the current standard. 
> If Flang has the equivalent to `-fopenmp-version=XX` or you just hardcode a version to be used, it should be possible to retain this error for the 4.5 case, right? 
Flang does not support passing a version at the moment. So we have to assume it's 5.0. I guess there will be work work on this later.  


================
Comment at: llvm/utils/TableGen/DirectiveEmitter.cpp:305
 
-  const auto &Directives = Records.getAllDerivedDefinitions("Directive");
-  const auto &Clauses = Records.getAllDerivedDefinitions("Clause");
+  IfDefScope Scope("GEN_FLANG_DIRECTIVE_CLAUSE_SETS", OS);
+
----------------
jdoerfert wrote:
> Any reason this is flang specific? I guess we want to use the information in Clang too (soonish).
No specific reason. I'm happy to remove the `FLANG_` here. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83326





More information about the llvm-commits mailing list