[llvm] [OFFLOAD] Add memory data locking API for libomptarget migration (PR #173138)

Kevin Sala Penades via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 22 14:32:05 PST 2025


================
@@ -131,3 +131,27 @@ def olMemFill : Function {
     Return<"OL_ERRC_INVALID_SIZE", ["`FillSize % PatternSize != 0`"]>
   ];
 }
+
+def olMemDataLock : Function {
+  let desc = "Locks / pins host memory using the plugin runtime.";
+  let params = [
+    Param<"ol_device_handle_t", "Device", "handle of the device to allocate on", PARAM_IN>,
+    Param<"void *", "Ptr", "Host Pointer", PARAM_IN>,
+    Param<"size_t", "Size", "size of the allocation in bytes", PARAM_IN>,
+    Param<"void**", "LockedPtr", "output for the allocated pointer", PARAM_OUT>
+  ];
----------------
kevinsala wrote:

We may want an extra parameter where we can specify some flags for the future.

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


More information about the llvm-commits mailing list