[all-commits] [llvm/llvm-project] d95d3d: [Flang][OpenMP] Rework parser changes for OpenMP a...

sameeranjoshi via All-commits all-commits at lists.llvm.org
Wed Oct 14 01:50:56 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d95d3d2a42cb43fca956efe60ab5965d84b0efd5
      https://github.com/llvm/llvm-project/commit/d95d3d2a42cb43fca956efe60ab5965d84b0efd5
  Author: sameeran joshi <sameeranjayant.joshi at amd.com>
  Date:   2020-10-14 (Wed, 14 Oct 2020)

  Changed paths:
    M flang/include/flang/Parser/dump-parse-tree.h
    M flang/include/flang/Parser/parse-tree.h
    M flang/lib/Parser/openmp-parsers.cpp
    M flang/lib/Parser/unparse.cpp
    M flang/lib/Semantics/check-omp-structure.cpp
    M flang/lib/Semantics/check-omp-structure.h
    A flang/test/Parser/omp-atomic-unparse.f90
    M flang/test/Semantics/omp-atomic.f90
    M llvm/include/llvm/Frontend/OpenMP/OMP.td

  Log Message:
  -----------
  [Flang][OpenMP] Rework parser changes for OpenMP atomic construct.

`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`.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D88965




More information about the All-commits mailing list