[Flang][OpenMP] Add support for lastprivate clause for worksharing loop.
authorArnamoy Bhattacharyya <arnamoy.bhattacharyya@huawei.com>
Tue, 26 Jul 2022 00:31:23 +0000 (20:31 -0400)
committerArnamoy Bhattacharyya <arnamoy.bhattacharyya@huawei.com>
Tue, 26 Jul 2022 00:31:23 +0000 (20:31 -0400)
commit17d9bdf4601983491d2b6f28e2b6b5a36f2688c7
treedbdcd770f4882bed7ab15ea28b11cee964629c8e
parentb2c53a9217cf346824fb56b19b0742e2eb276a19
[Flang][OpenMP] Add support for lastprivate clause for worksharing loop.

This patch adds an initial support to the lastprivate clause for worksharing loop.  The patch creates necessary control flow to guarantee the store of the value from the logical last iteration of the workshare loop.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D130027
flang/include/flang/Lower/AbstractConverter.h
flang/lib/Lower/Bridge.cpp
flang/lib/Lower/OpenMP.cpp
flang/test/Lower/OpenMP/omp-parallel-lastprivate-clause-scalar.f90 [new file with mode: 0644]