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

Jan Patrick Lehr via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 8 05:33:29 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);
----------------
jplehr wrote:

This line is new compared to the code before.
Why is that needed now?

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


More information about the llvm-commits mailing list