[Openmp-commits] [PATCH] D117513: [Libomptarget] Add `cold` to KeepAlive attributes

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jan 17 14:29:51 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4869a22d1d0b: [Libomptarget] Add `cold` to KeepAlive attributes (authored by jhuber6).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117513/new/

https://reviews.llvm.org/D117513

Files:
  openmp/libomptarget/DeviceRTL/src/Utils.cpp
  openmp/libomptarget/deviceRTLs/common/src/support.cu


Index: openmp/libomptarget/deviceRTLs/common/src/support.cu
===================================================================
--- openmp/libomptarget/deviceRTLs/common/src/support.cu
+++ openmp/libomptarget/deviceRTLs/common/src/support.cu
@@ -228,7 +228,7 @@
 
 namespace _OMP {
 /// Helper to keep code alive without introducing a performance penalty.
-__attribute__((used, retain, weak, optnone)) void keepAlive() {
+__attribute__((used, retain, weak, optnone, cold)) void keepAlive() {
   __kmpc_get_hardware_thread_id_in_block();
   __kmpc_get_hardware_num_threads_in_block();
   __kmpc_get_warp_size();
Index: openmp/libomptarget/DeviceRTL/src/Utils.cpp
===================================================================
--- openmp/libomptarget/DeviceRTL/src/Utils.cpp
+++ openmp/libomptarget/DeviceRTL/src/Utils.cpp
@@ -21,7 +21,7 @@
 
 namespace _OMP {
 /// Helper to keep code alive without introducing a performance penalty.
-__attribute__((used, retain, weak, optnone)) void keepAlive() {
+__attribute__((used, retain, weak, optnone, cold)) void keepAlive() {
   __kmpc_get_hardware_thread_id_in_block();
   __kmpc_get_hardware_num_threads_in_block();
   __kmpc_get_warp_size();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117513.400646.patch
Type: text/x-patch
Size: 1193 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220117/aabd351d/attachment.bin>


More information about the Openmp-commits mailing list