[Openmp-commits] [PATCH] D98649: [libomptarget] Drop assert.h, use freestanding for amdgcn devicertl

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Mar 15 11:50:25 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf675b3df4848: [libomptarget] Drop assert.h, use freestanding for amdgcn devicertl (authored by JonChesterfield).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98649

Files:
  openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
  openmp/libomptarget/deviceRTLs/common/include/target/shuffle.h


Index: openmp/libomptarget/deviceRTLs/common/include/target/shuffle.h
===================================================================
--- openmp/libomptarget/deviceRTLs/common/include/target/shuffle.h
+++ openmp/libomptarget/deviceRTLs/common/include/target/shuffle.h
@@ -15,7 +15,6 @@
 #ifndef LIBOMPTARGET_DEVICERTL_SHUFFLE_H
 #define LIBOMPTARGET_DEVICERTL_SHUFFLE_H
 
-#include <assert.h>
 #include <stdint.h>
 
 #pragma omp declare target
@@ -41,20 +40,14 @@
 ///}
 
 /// Fallback implementations of the shuffle sync idiom.
+/// Unavailable at present (would error at link time if used).
 ///
 ///{
 
-inline int32_t __kmpc_impl_shfl_sync(uint64_t Mask, int32_t Var,
-                                     int32_t SrcLane) {
-  assert(false &&
-         "Fallback version of __kmpc_impl_shfl_sync is not available!");
-}
+int32_t __kmpc_impl_shfl_sync(uint64_t Mask, int32_t Var, int32_t SrcLane);
 
-inline int32_t __kmpc_impl_shfl_down_sync(uint64_t Mask, int32_t Var,
-                                          uint32_t Delta, int32_t Width) {
-  assert(false &&
-         "Fallback version of __kmpc_impl_shfl_down_sync is not available!");
-}
+int32_t __kmpc_impl_shfl_down_sync(uint64_t Mask, int32_t Var, uint32_t Delta,
+                                   int32_t Width);
 
 ///}
 
Index: openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
===================================================================
--- openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
+++ openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
@@ -101,6 +101,7 @@
     -xc++
     -c
     -std=c++14
+    -ffreestanding
     -target amdgcn
     -emit-llvm
     -Xclang -aux-triple -Xclang x86_64-unknown-linux-gnu # see nvptx


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98649.330749.patch
Type: text/x-patch
Size: 1721 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210315/ac381e91/attachment.bin>


More information about the Openmp-commits mailing list