[libomptarget] Remove duplicate RTLRequiresFlags per device
authorJonas Hahnfeld <hahnjo@hahnjo.de>
Fri, 9 Aug 2019 19:20:39 +0000 (19:20 +0000)
committerJonas Hahnfeld <hahnjo@hahnjo.de>
Fri, 9 Aug 2019 19:20:39 +0000 (19:20 +0000)
commit7a0f2dc5a4c0c5a5b801d8d1669fc1aa43121d70
treeec2b6479065b66bd8ce562679a10d2e75cef8d64
parent4fe911d9dd3740aeace63125489eb59eee0ad17e
[libomptarget] Remove duplicate RTLRequiresFlags per device

We have one global RTLs.RequiresFlags, I don't see a need to make a
copy per device that the runtime manages. This was problematic anyway
because the copy happened during the first __tgt_register_lib(). This
made it impossible to call __tgt_register_requires() from normal user
funtions for testing.
Hence, this change also fixes unified_shared_memory/shared_update.c for
older versions of Clang that don't call __tgt_register_requires() before
__tgt_register_lib().

Differential Revision: https://reviews.llvm.org/D66019

llvm-svn: 368465
openmp/libomptarget/src/api.cpp
openmp/libomptarget/src/device.cpp
openmp/libomptarget/src/device.h
openmp/libomptarget/src/omptarget.cpp
openmp/libomptarget/src/rtl.cpp