[Openmp-commits] [openmp] 48e3dce - [Libomptarget][NFC] Remove constexpr to hide warnings
Joseph Huber via Openmp-commits
openmp-commits at lists.llvm.org
Mon Feb 14 12:34:25 PST 2022
Author: Joseph Huber
Date: 2022-02-14T15:34:18-05:00
New Revision: 48e3dcecc4259fc50451e9d12a352c7d513e85eb
URL: https://github.com/llvm/llvm-project/commit/48e3dcecc4259fc50451e9d12a352c7d513e85eb
DIFF: https://github.com/llvm/llvm-project/commit/48e3dcecc4259fc50451e9d12a352c7d513e85eb.diff
LOG: [Libomptarget][NFC] Remove constexpr to hide warnings
Currently whenever we compile the device runtime we get the following
'Mapping.cpp:32:32: warning: inline function '_OMP::impl::getGridValue'
is not defined [-Wundefined-inline]' warning. This can be silenced by
removing the constexpr attribute for this function. Doing this doesn't
change the generated bitcode at all but prevents the screen from getting
filled with warnings whenver we build the runtime.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D119747
Added:
Modified:
openmp/libomptarget/DeviceRTL/src/Mapping.cpp
Removed:
################################################################################
diff --git a/openmp/libomptarget/DeviceRTL/src/Mapping.cpp b/openmp/libomptarget/DeviceRTL/src/Mapping.cpp
index 75a500f39d20a..29e9b127290d6 100644
--- a/openmp/libomptarget/DeviceRTL/src/Mapping.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/Mapping.cpp
@@ -29,7 +29,7 @@ namespace impl {
///{
#pragma omp begin declare variant match(device = {arch(amdgcn)})
-constexpr const llvm::omp::GV &getGridValue() {
+static const llvm::omp::GV &getGridValue() {
return llvm::omp::getAMDGPUGridValues<__AMDGCN_WAVEFRONT_SIZE>();
}
@@ -104,7 +104,7 @@ uint32_t getNumHardwareThreadsInBlock() {
return __nvvm_read_ptx_sreg_ntid_x();
}
-constexpr const llvm::omp::GV &getGridValue() {
+static const llvm::omp::GV &getGridValue() {
return llvm::omp::NVPTXGridValues;
}
More information about the Openmp-commits
mailing list