[all-commits] [llvm/llvm-project] 8eb746: [flang][OpenMP] Add some semantic checks for threa...

PeixinQiao via All-commits all-commits at lists.llvm.org
Thu Jan 6 04:01:13 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8eb74626fa454d33edc1eb86f0c9ce3a006c7dfd
      https://github.com/llvm/llvm-project/commit/8eb74626fa454d33edc1eb86f0c9ce3a006c7dfd
  Author: Peixin-Qiao <qiaopeixin at huawei.com>
  Date:   2022-01-06 (Thu, 06 Jan 2022)

  Changed paths:
    M flang/lib/Semantics/check-omp-structure.cpp
    M flang/test/Semantics/omp-declarative-directive.f90
    M flang/test/Semantics/omp-declare-target02.f90
    A flang/test/Semantics/omp-declare-target03.f90
    A flang/test/Semantics/omp-declare-target04.f90
    M flang/test/Semantics/omp-threadprivate02.f90
    A flang/test/Semantics/omp-threadprivate03.f90
    A flang/test/Semantics/omp-threadprivate04.f90

  Log Message:
  -----------
  [flang][OpenMP] Add some semantic checks for threadprivate and declare target directives

This supports the following checks for THREADPRIVATE Directive:
```
[5.1] 2.21.2 THREADPRIVATE Directive
A threadprivate variable must not appear in any clause except the
copyin, copyprivate, schedule, num_threads, thread_limit, and if clauses.
```

This supports the following checks for DECLARE TARGET Directive:
```
[5.1] 2.14.7 Declare Target Directive
A threadprivate variable cannot appear in the directive.
```

Besides, procedure name and the entity with PARAMETER attribute cannot
be in the threadprivate directive. The main program name and module name
cannot be in the threadprivate directive and declare target directive.
There is no clear description or restriction about the entity with
PARAMETER attribute in OpenMP 5.1 Specification, and a warning is given.

Reviewed By: kiranchandramohan, shraiysh, NimishMishra

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




More information about the All-commits mailing list