[PATCH] D106896: [flang][OpenMP] Add parsing support for nontemporal clause.

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 27 17:03:51 PDT 2021


clementval added inline comments.


================
Comment at: flang/lib/Parser/openmp-parsers.cpp:210
+    "NONTEMPORAL" >> construct<OmpClause>(construct<OmpClause::Nontemporal>(
+                         parenthesized(Parser<OmpNontemporalClause>{}))) ||
     "NOTINBRANCH" >>
----------------
arnamoy10 wrote:
> clementval wrote:
> > 
> Thank you.  With your suggested change, I do not get error while building the compiler, but I get the following error while running `-fopenmp -fsyntax-only` on the examples I provide.  Here is the error:
> 
> ```
>  error: Internal: no symbol found for 'a'
>  !$omp target teams distribute simd nontemporal(a)
>                                                    ^
> ```
> 
> What am I missing here?
This error is coming from the name resolution. So basically your semantic is fine but after the semantic the name resolution fails since `nontemporal` is not in it. You can look at `flang/lib/Semantics/resolve-directives.cpp` and look what is done in the two example below: 

https://github.com/llvm/llvm-project/blob/ec1a49170129ddb62f268ff0b3f12b3d09987a7e/flang/lib/Semantics/resolve-directives.cpp#L363
https://github.com/llvm/llvm-project/blob/ec1a49170129ddb62f268ff0b3f12b3d09987a7e/flang/lib/Semantics/resolve-directives.cpp#L405


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106896



More information about the llvm-commits mailing list