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).
The pass is an upgraded version of the prior MLIR Opt
pass that I created that did the same thing. In this case
better handling of recursive cases, updated to work with
the interface and the ability to work with TargetOp's.
The semantic pass equivalent of this can be found in:
https://reviews.llvm.org/D150323
So we can choose to go either direction, however, this
pass is simpler to maintain and understand and having
it as an transformation pass keeps it consistent with the
other transformation passes that deal with OpenMP
function and target op processing.
Prefix the name with OpenMP or OMP.
Would OMPMarkDeclareTargetPass be a better name?