This patch adds initial lowering for DeclareTargetAttr on
GlobalOp's utilising registerTargetGlobalVariable
and getAddrOfDeclareTargetVar from the
OMPIRBuilder.
DeclareTargetAttr encapsulates in MLIR a declare
target declaration applied to a piece of global data
or a function and indicates it should undergo
special handling.
The patch currently does not factor in filtering
based on device_type clauses (e.g. no emission of
globals for device if host specified), this will come in
a future iteration.
Maybe rename this to isAddressOfGlobalDeclareTarget or similar, pass in the mlir::Value and check for the defining op inside this function. It should reduce some code duplication among the two calls to this function and also make its purpose clearer.