[Openmp-commits] [PATCH] D157918: [Libomptarget] Support mapping indirect host calls to device functions
    Joseph Huber via Phabricator via Openmp-commits 
    openmp-commits at lists.llvm.org
       
    Mon Aug 14 14:59:59 PDT 2023
    
    
  
jhuber6 added inline comments.
================
Comment at: openmp/libomptarget/DeviceRTL/src/Misc.cpp:84
+
+  if (!Table || TableSize == 0)
+    return nullptr;
----------------
RaviNarayanaswamy wrote:
> Do you want to check  if HstPtr is null  then return nullptr
Yeah that's a good idea.
================
Comment at: openmp/libomptarget/include/omptarget.h:95
+  /// Mark the entry global as being an indirectly callable function.
+  OMP_DECLARE_TARGET_INDIRECT = 0x04
 };
----------------
RaviNarayanaswamy wrote:
> Should this be 0x08
I didn't design it this way, but the frontend uses different flags for globals and kernels. All the other flags overlap so why should this one be the exception without breaking ABI and redesigning it?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157918/new/
https://reviews.llvm.org/D157918
    
    
More information about the Openmp-commits
mailing list