[all-commits] [llvm/llvm-project] 6a305c: [flang][OpenMP] Lowering support for default clause

NimishMishra via All-commits all-commits at lists.llvm.org
Fri Aug 12 04:09:22 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6a305c9b49dd28eaeae694fce5755e279fbc884c
  Author: Nimish Mishra <neelam.nimish at gmail.com>
  Date:   2022-08-12 (Fri, 12 Aug 2022)

  Changed paths:
    M flang/include/flang/Lower/AbstractConverter.h
    M flang/lib/Lower/Bridge.cpp
    M flang/lib/Lower/OpenMP.cpp
    M flang/lib/Semantics/resolve-directives.cpp
    A flang/test/Lower/OpenMP/Todo/omp-default-clause-inner-loop.f90
    A flang/test/Lower/OpenMP/default-clause.f90
    M flang/test/Lower/OpenMP/omp-parallel-lastprivate-clause-scalar.f90

  Log Message:
  [flang][OpenMP] Lowering support for default clause

This patch adds lowering support for default clause.

1. During symbol resolution in semantics, should the enclosing context have
a default data sharing clause defined and a `parser::Name` is not attached
to an explicit data sharing clause, the
`semantics::Symbol::Flag::OmpPrivate` flag (in case of default(private))
and `semantics::Symbol::Flag::OmpFirstprivate` flag (in case of
default(firstprivate)) is added to the symbol.

2. During lowering, all symbols having either
`semantics::Symbol::Flag::OmpPrivate` or
`semantics::Symbol::Flag::OmpFirstprivate` flag are collected and
privatised appropriately.

Co-authored-by: Peixin Qiao <qiaopeixin at huawei.com>

Reviewed by: peixin

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

More information about the All-commits mailing list