[all-commits] [llvm/llvm-project] 6fb01a: [flang][OpenMP] Add semantic checks for ordered co...

PeixinQiao via All-commits all-commits at lists.llvm.org
Fri Sep 17 06:54:15 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6fb01a94708ffcd0aed63d0697d4ca08ed937dff
      https://github.com/llvm/llvm-project/commit/6fb01a94708ffcd0aed63d0697d4ca08ed937dff
  Author: PeixinQiao <qiaopeixin at huawei.com>
  Date:   2021-09-17 (Fri, 17 Sep 2021)

  Changed paths:
    M flang/lib/Semantics/check-omp-structure.cpp
    M flang/lib/Semantics/check-omp-structure.h
    M flang/lib/Semantics/resolve-directives.cpp
    M flang/test/Semantics/omp-clause-validity01.f90
    A flang/test/Semantics/omp-ordered01.f90
    M llvm/include/llvm/Frontend/OpenMP/OMP.td

  Log Message:
  -----------
  [flang][OpenMP] Add semantic checks for ordered construct

This patch implements the following semantic checks according to
OpenMP Version 5.1 Ordered construct restriction:

```
At most one threads clause can appear on an ordered construct; At most
one simd clause can appear on an ordered construct; At most one
depend(source) clause can appear on an ordered construct; Either
depend(sink:vec) clauses or depend(source) clauses may appear on an
ordered construct, but not both.
```

This patch also implements the following semantic checks according to
the syntax and descriptions in OpenMP Version 5.1 Ordered construct:

```
The dependence types of sink or source are only allowed on an ordered
construct. The depend(*) clauses are not allowed when ordered construct
is a block construct with an ordered region. The threads or simd clauses
are not allowed when the ordered construct is a standalone construct
with no ordered region.
```

Co-authored-by: Sameeran Joshi <sameeranjayant.joshi at amd.com>

Reviewed By: kiranchandramohan

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




More information about the All-commits mailing list