[llvm-dev] ORC JIT Weekly #25 -- Orc library break-up, remote TargetProcessControl review.
Lang Hames via llvm-dev
llvm-dev at lists.llvm.org
Sun Oct 25 23:16:00 PDT 2020
Now that OrcV1 has been removed we can look at landing the new Remote
TargetProcessControl utilities that have been under development for the
last couple of months. I have posted an initial patch for review in
The aim of these utilities is to make it easy to execute JIT'd code in a
separate process from the JIT itself. This can be useful for both stability
(if you don't want a crash in your JIT'd code taking down your JIT process
or vice versa) and security (you can sandbox your JIT'd code separately
from the JIT itself).
The patch contains:
(1) A break-up of the OrcJIT library into three parts: OrcJIT,
OrcTargetProcess, and OrcShared. I'll follow up with details on this
tomorrow, but in short: This break-up will allow target processes to link
against OrcTargetProcess and Support only, rather than OrcJIT (and,
consequently, Object, Core, IRReader, etc.), which should allow for much
smaller target process executables.
(2) An OrcRPC based TargetProcessControl implementation that can be used to
JIT code into a target process connected via an OrcRPC endpoint. The
llvm-jitlink utility has been updated to include a demonstration of this
(see the -oop-executor example in , Orc JIT Weekly #21 for usage notes).
(3) An OrcRPC based server that can be linked into a target process to
allow remote code to be received and executed. You can see an example of
this in the patch in the newly added llvm-jitlink-executor program.
Parts (2) and (3) can be thought of as the OrcV2 equivalent of the OrcV1
I expect there will be a few bugs to shake out, but once this lands we will
be able to reinstate Chapter 5 of the BuildingAJIT tutorial series, which
should provide another nice example of how to use these APIs.
As for other tasks on the todo list: I haven't forgotten the requests for
documentation and road-maps. They're next on my list once this work lands.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev