[AMDGPU][Libomptarget] Rework logic for locating kernarg pools
authorPushpinder Singh <Pushpinder.Singh@amd.com>
Thu, 3 Jun 2021 08:58:10 +0000 (08:58 +0000)
committerPushpinder Singh <Pushpinder.Singh@amd.com>
Mon, 7 Jun 2021 06:41:37 +0000 (06:41 +0000)
commitf5f329a37175c3a30e9d8b20b95fced96b9dde8c
tree40ad6be93741d50eb27d21916fa7de03048c484d
parentbcb20aa7701d3e2d6deef24ce26c25ed7d2dbc6b
[AMDGPU][Libomptarget] Rework logic for locating kernarg pools

Previous logic was to always use the first kernarg pool found to allocate
kernel args. This patch changes this to use only the kernarg pool which
has non-zero size. This logic is also reworked to not use any globals.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D103600
openmp/libomptarget/plugins/amdgpu/impl/internal.h
openmp/libomptarget/plugins/amdgpu/impl/system.cpp
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp