We already created a versioned __tgt_kernel_arguments struct but it
was only briefly used and its content was passed in isolation anyway.
This makes it hard to add more information in the future. With this
patch we fully embrace the struct as means to pass information from the
compiler to the plugin as part of a kernel launch.
The patch also extends and renames the struct, bumping the version
number to 2. Version 1 entries are auto-upgraded. This is in preparation
for "bare" kernel launches, per kernel dynamic shared memory, CUDA/HIP
support, etc.
The __tgt_target_kernel_nowait interface was deprecated. Once we
actually implement something like that, we can add an appropriate API.
Note: Only plugins with the launch_kernel interface are now supported.
That means that an old clang won't be able to use an old runtime. An old clang can still use the new runtime since the libomptarget interface did not change.
Note: Context has been reduced to match the 8MB upload limit of phab.
While I'm here, I will also add an uint64_t field for the "stream" (or similar) passed to cuda/hip kernels.