[llvm-dev] ORC JIT Weekly #40 -- Out with Orc RPC, In with SimpleRemoteEPC.

Lang Hames via llvm-dev llvm-dev at lists.llvm.org
Sun Oct 3 22:45:28 PDT 2021


Hi All,

Since the last update all in-tree tools and examples that support
remote-JITing have been moved from OrcRPCExecutorProcessControl (and the
older OrcRemoteTarget* APIs) to SimpleRemoteEPC. SimpleRemoteEPC, compared
to earlier APIs, should be both easier to use and adapt, and better at
error handling and recovery.

You can check out an example use of SimpleRemoteEPC in the llvm-jitlink
tool, in the Session::Create method [1]. In that method the "if" sequence
constructs the ExecutorProcessControl object to be used, using a
SimpleRemoteEPC instance for remote executors (in the -oop-executor or
-oop-executor-connect case). By writing the llvm-jitlink tool against the
ExecutorProcessControl API these few lines are all that it takes to
dynamically select in-process or out-of-process JITing.

The corresponding server-side code can be found in the
llvm-jitlink-executor tool's main method [2].

The switch to SimpleRemoteEPC has allowed us to remove all in-tree users of
the ORC RPC system, two of the more complicated JITLinkMemoryManager
implementations, and the ORC RPC system itself. All up ~6.5k SLOC were
removed in this process. Removing this legacy code should unblock progress
on the JITLinkMemoryManager refactor -- I hope to have an update on that
effort for you next week.

-- Lang.

[1]
https://github.com/llvm/llvm-project/blob/5f7a5353301b776ffb0e5fb048992898507bf7ee/llvm/tools/llvm-jitlink/llvm-jitlink.cpp#L814
[2]
https://github.com/llvm/llvm-project/blob/bdb5aa65b1b557865a64860121c9376937e30984/llvm/tools/llvm-jitlink/llvm-jitlink-executor/llvm-jitlink-executor.cpp#L158
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211003/8d1dc268/attachment.html>


More information about the llvm-dev mailing list