[Openmp-commits] [PATCH] D94698: [OpenMP][WIP][POC] Compile the device runtime as C++

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jan 14 09:24:55 PST 2021


jdoerfert added inline comments.


================
Comment at: openmp/libomptarget/deviceRTLs/common/debug.h:129
 
-#if OMPTARGET_NVPTX_DEBUG || OMPTARGET_NVPTX_TEST || OMPTARGET_NVPTX_WARNING
 #include "common/support.h"
----------------
All of this seems totally broken. As far as I can tell, `OMPTARGET_NVPTX_TEST` and some other macros are always set and later we check if they are set. It's odd.


================
Comment at: openmp/libomptarget/deviceRTLs/common/omptarget.h:41
   // All these methods must be called by the master thread only.
-  INLINE void Init() {
     args  = buffer;
----------------
If we really want, we can mark the entry points with the `flatten` attribute. Other than that, there is little point in adding "inline" and such everywhere through these macros. If the compiler doesn't figure it out we should change the target pipeline defaults instead and thereby help user code as well.


================
Comment at: openmp/libomptarget/deviceRTLs/common/src/cancel.cu:15
 
-EXTERN int32_t __kmpc_cancellationpoint(kmp_Ident *loc, int32_t global_tid,
+#include <stdint.h>
+
----------------
We should go through and minimize include dependences before we do anything else. The structure right now is also very confusing. There is no need for "internal headers" and the likes anymore.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94698



More information about the Openmp-commits mailing list