[Libomptarget] Add `cold` to KeepAlive attributes
authorJoseph Huber <jhuber6@vols.utk.edu>
Mon, 17 Jan 2022 22:03:33 +0000 (17:03 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Mon, 17 Jan 2022 22:29:26 +0000 (17:29 -0500)
commit4869a22d1d0bff59e3f2699739554d459905a76d
treed5cfcfbfb0a6efb1d5cee35d8fe71b61a9b2ff33
parent83c7f5d3fb5649af4e57d8b46163b4c0dcfaf263
[Libomptarget] Add `cold` to KeepAlive attributes

This patch adds the `cold` attribute to the keepAlive functions in the
RTL. This dummy function exists to keep certain RTL calls alive without
them being optimized out, but it is never called and can be declared
cold. This also helps some erroneous remarks being given on this
function because it has weak linkage and cannot be made internal.

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D117513
openmp/libomptarget/DeviceRTL/src/Utils.cpp
openmp/libomptarget/deviceRTLs/common/src/support.cu