[PATCH] D85919: [ORC] Add JITLink-compatible remote memory-manager and LLJITWithChildProcess example

Stefan Gränitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 11:44:07 PDT 2020


sgraenitz created this revision.
sgraenitz added a reviewer: lhames.
Herald added subscribers: mstorsjo, mgorny.
Herald added a project: LLVM.
sgraenitz requested review of this revision.

This adds RemoteJITLinkMemoryManager is a new subclass of OrcRemoteTargetClient. It implements jitlink::JITLinkMemoryManager and targets the OrcRemoteTargetRPCAPI.

Behavior should be very similar to RemoteRTDyldMemoryManager. The essential differnce with JITLink is that allocations work in isolation from its memory manager. Thus, the RemoteJITLinkMemoryManager might be seen as "JITLink allocation factory".

RPCMMAlloc is another subclass of OrcRemoteTargetClient and implements the actual functionality. It allocates working memory on the host and target memory on the remote target. Upon finalization working memory is copied over to the tagrte address space. Finalization can be asynchronous for JITLink allocations, but I don't see that it makes a difference here.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85919

Files:
  llvm/examples/OrcV2Examples/CMakeLists.txt
  llvm/examples/OrcV2Examples/LLJITWithChildProcess/CMakeLists.txt
  llvm/examples/OrcV2Examples/LLJITWithChildProcess/LLJITWithChildProcess.cpp
  llvm/examples/OrcV2Examples/LLJITWithChildProcess/RemoteJITUtils.h
  llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
  llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h
  llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85919.285447.patch
Type: text/x-patch
Size: 22110 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200813/a7adec32/attachment.bin>


More information about the llvm-commits mailing list