[OpenMP][libomptarget] Improve NextGen plugin interface for initialization
authorKevin Sala <kevin.sala@bsc.es>
Wed, 23 Nov 2022 23:24:12 +0000 (00:24 +0100)
committerKevin Sala <kevin.sala@bsc.es>
Sat, 3 Dec 2022 21:25:15 +0000 (22:25 +0100)
commit2cb83cd288fd6543bb22713ff3eba50faadc20e0
treec8eef1c6e19228208a3ce7c9f6bd23ac977b2b6a
parentdf852f48c8235e34a80aa160b8b83ad7c56c69b0
[OpenMP][libomptarget] Improve NextGen plugin interface for initialization

This patch modifies the PluginInterface to define functions for initializing
and deinitializing GenericPluginTy instances instead of using the constructor
and destructor. This way, we can return errors from these functions. Also, it
defines some functions that each plugin should implement for creating
plugin-specific objects.

This patch prepares the PluginInterface for the new AMDGPU NextGen plugin.

Differential Revision: https://reviews.llvm.org/D138625
openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h
openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
openmp/libomptarget/plugins-nextgen/generic-elf-64bit/src/rtl.cpp