[llvm] [OpenMP] Move `__omp_rtl_data_environment' handling to OpenMP (PR #157182)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 8 05:35:08 PDT 2025


================
@@ -97,14 +99,94 @@ llvm::Error DeviceTy::init() {
   return llvm::Error::success();
 }
 
-// Load binary to device.
+// Extract the mapping of host function pointers to device function pointers
+// from the entry table. Functions marked as 'indirect' in OpenMP will have
+// offloading entries generated for them which map the host's function pointer
+// to a global containing the corresponding function pointer on the device.
+static llvm::Expected<std::pair<void *, uint64_t>>
+setupIndirectCallTable(DeviceTy &Device, __tgt_device_image *Image,
+                       __tgt_device_binary Binary) {
+  AsyncInfoTy AsyncInfo(Device);
----------------
jhuber6 wrote:

The internal plugin API doesn't need it but this one that OpenMP has does, it's just a nullptr so it's just there to tell it that it's synchronous.

https://github.com/llvm/llvm-project/pull/157182


More information about the llvm-commits mailing list