[PATCH] D88965: [Flang][OpenMP] Rework parser changes for OpenMP atomic construct.

sameeran joshi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 06:36:56 PDT 2020


sameeranjoshi created this revision.
sameeranjoshi added reviewers: kiranchandramohan, clementval, kiranktp, SouraVX, klausler, tskeith.
Herald added subscribers: jfb, guansong, yaxunl.
Herald added a reviewer: sscalpone.
Herald added a project: LLVM.
sameeranjoshi requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.

`OmpStructureChecker` is supposed to work only with `parser::OmpClause`
after tablegen changes for OpenMP and OpenACC were introduced.
Hence `OmpMemoryOrderClause`, `OmpAtomicMemoryOrderClause` and similar ones were failing
to catch semantic errors, inspite of having code for semantic checks.
This patch tries to change parser for `OmpMemoryOrderClause` and similar dependent ones
and use `OmpClauseList` which resides/comes from common tablegen for OpenMP/OpenACC eventually using `parser::OmpClause`.

This patch also tries to :

1. Change `OmpCriticalDirective` in `openmp-parsers.cpp` to support `OmpClauseList`.
2. Check-flang regresses when changes were introduced due to missing semantic checks in OmpCritical, patch implements them at the minimal level to pass the regression.
3. Change tablegen to support Hint clause.
4. Adds missing source locations `CharBlock Source` in each atomic construct.
5. Remove dead code realted to `memory-order-clauses` after moving to `OmpClauseList`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88965

Files:
  flang/include/flang/Parser/dump-parse-tree.h
  flang/include/flang/Parser/parse-tree.h
  flang/lib/Parser/openmp-parsers.cpp
  flang/lib/Parser/unparse.cpp
  flang/lib/Semantics/check-omp-structure.cpp
  flang/lib/Semantics/check-omp-structure.h
  llvm/include/llvm/Frontend/OpenMP/OMP.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88965.296661.patch
Type: text/x-patch
Size: 16370 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201007/3abdad4d/attachment.bin>


More information about the llvm-commits mailing list