Global symbol handling is one of the common things the plugins do and we
should be uniform wrt. functionality, messaging, etc. The new
GlobalHandler will do most of the heavy lifting and the plugins simply
need to provide some information to it. Error checking and such is done
the same way for all plugins and more refactoring opportunities arise.
This removes two "functions" of the AMDGPU plugins for now:
- Write the device environment into the image. This is something we should investigate for CUDA and add to the GlobalHandler. For now, it is a single HtoD transfer we pay extra.
- If the device environment could not be transferred we used to check the architecture. The code needs to be ported to the llvm ELF handling and then we can do this again.
The memory optimisation that allocated omptarget_nvptx_device_State one per process instead of once per device image is obsolete with the new runtime