[flang][OpenMP] Parser support for Target directive and Device clause
authorSesha Kalyur <SeshaP.Kalyur@amd.com>
Sun, 21 Aug 2022 16:53:51 +0000 (22:23 +0530)
committerNimish Mishra <neelam.nimish@gmail.com>
Sun, 21 Aug 2022 16:56:02 +0000 (22:26 +0530)
commitd9ff670330a80f2d597822bfd574842ad8fc55b3
treefd3cbbf785cf7d3d09d34d16714bac9c21dfb5e9
parent7ff2a9f250ed686181f86aa58175151deb34bb43
[flang][OpenMP] Parser support for Target directive and Device clause

This patch adds support for the device clause on `Target` directive.
Device clause was added in OpenMP specification version 4.5 to
create a device data environment for the extent of a region. On
target construct, the device expression be either be `ancestor`
(taking after the parent) or assign a new `device_num`.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D126441
flang/include/flang/Parser/dump-parse-tree.h
flang/include/flang/Parser/parse-tree.h
flang/lib/Parser/openmp-parsers.cpp
flang/lib/Parser/unparse.cpp
flang/lib/Semantics/check-omp-structure.cpp
flang/test/Parser/omp_target_device_parse.f90 [new file with mode: 0644]
flang/test/Parser/omp_target_device_unparse.f90 [new file with mode: 0644]
flang/test/Semantics/OpenMP/omp-device-constructs.f90
llvm/include/llvm/Frontend/OpenMP/OMP.td