[Flang][OpenMP][MLIR] An mlir transformation pass for marking FuncOp's implicitly...
authorAndrew Gozillon <Andrew.Gozillon@amd.com>
Mon, 17 Jul 2023 13:20:13 +0000 (08:20 -0500)
committerAndrew Gozillon <Andrew.Gozillon@amd.com>
Mon, 17 Jul 2023 13:32:26 +0000 (08:32 -0500)
commit062fce6f4dd142cf9275abb3358f88b61a2db4e8
treea30b91c3e575fc4fa241bc1d6e823301de327904
parent89ebea8c1e6ff3dfd37943fdc01df409e9bd1e11
[Flang][OpenMP][MLIR] An mlir transformation pass for marking FuncOp's implicitly called from TargetOp's and declare target marked FuncOp's as implicitly declare target

This pass will mark functions called from TargetOp's
and declare target functions as implicitly declare
target by adding the MLIR declare target attribute
directly to the function.

This pass executes after the initial lowering of Fortran's PFT
to MLIR (FIR/OMP+Arith etc.) and is one of a series of passes
that aim to clean up the MLIR for offloading (seperate passes
in different patches, one for early outlining, another for declare
target function filtering).

Reviewers: jsjodin, skatrak, kiaranchandramohan

Differential Revision: https://reviews.llvm.org/D154247
flang/include/flang/Optimizer/Transforms/Passes.h
flang/include/flang/Optimizer/Transforms/Passes.td
flang/lib/Frontend/FrontendActions.cpp
flang/lib/Optimizer/Transforms/CMakeLists.txt
flang/lib/Optimizer/Transforms/OMPMarkDeclareTarget.cpp [new file with mode: 0644]
flang/test/Lower/OpenMP/declare-target-data.f90 [moved from flang/test/Lower/OpenMP/omp-declare-target-data.f90 with 100% similarity]
flang/test/Lower/OpenMP/declare-target-func-and-subr.f90 [moved from flang/test/Lower/OpenMP/omp-declare-target-func-and-subr.f90 with 100% similarity]
flang/test/Lower/OpenMP/declare-target-implicit-func-and-subr-cap.f90 [new file with mode: 0644]
flang/test/Lower/OpenMP/declare-target-implicit-tarop-cap.f90 [new file with mode: 0644]
flang/test/Lower/OpenMP/host-ir-flag.f90 [moved from flang/test/Lower/OpenMP/omp-host-ir-flag.f90 with 100% similarity]
flang/test/Lower/OpenMP/is-device.f90 [moved from flang/test/Lower/OpenMP/omp-is-device.f90 with 100% similarity]