Summary:
Functions were called the wrong way around, this didn't keep the symbol
alive.
namespace _OMP {
namespace utils {
-void keepAlive();
-
/// Return the value \p Var from thread Id \p SrcLane in the warp if the thread
/// is identified by \p Mask.
int32_t shuffle(uint64_t Mask, int32_t Var, int32_t SrcLane);
extern "C" {
__attribute__((noinline)) uint32_t __kmpc_get_hardware_thread_id_in_block() {
- _OMP::utils::keepAlive();
return mapping::getThreadIdInBlock();
}
}
namespace _OMP {
/// Helper to keep code alive without introducing a performance penalty.
__attribute__((used, weak, optnone)) void keepAlive() {
+ __kmpc_get_hardware_thread_id_in_block();
__kmpc_barrier_simple_spmd(nullptr, 0);
}
} // namespace _OMP