[ORC] Add TargetProcessControl and TPCIndirectionUtils APIs.
authorLang Hames <lhames@gmail.com>
Thu, 16 Jul 2020 19:51:14 +0000 (12:51 -0700)
committerLang Hames <lhames@gmail.com>
Thu, 16 Jul 2020 22:09:13 +0000 (15:09 -0700)
commit0e940d55f8a9388c42cc5998ea05212a983f05a7
tree5f6cdf713cf8a2eabad621eb1bffbd7ad9e9bffc
parent72958c9ab1cdf18c447778b836f13694a7e4e9e1
[ORC] Add TargetProcessControl and TPCIndirectionUtils APIs.

TargetProcessControl is a new API for communicating with JIT target processes.
It supports memory allocation and access, and inspection of some process
properties, e.g. the target proces triple and page size.

Centralizing these APIs allows utilities written against TargetProcessControl
to remain independent of the communication procotol with the target process
(which may be direct memory access/allocation for in-process JITing, or may
involve some form of IPC or RPC).

An initial set of TargetProcessControl-based utilities for lazy compilation is
provided by the TPCIndirectionUtils class.

An initial implementation of TargetProcessControl for in-process JITing
is provided by the SelfTargetProcessControl class.

An example program showing how the APIs can be used is provided in
llvm/examples/OrcV2Examples/LLJITWithTargetProcessControl.
llvm/examples/OrcV2Examples/CMakeLists.txt
llvm/examples/OrcV2Examples/LLJITWithTargetProcessControl/CMakeLists.txt [new file with mode: 0644]
llvm/examples/OrcV2Examples/LLJITWithTargetProcessControl/LLJITWithTargetProcessControl.cpp [new file with mode: 0644]
llvm/include/llvm/ExecutionEngine/Orc/LazyReexports.h
llvm/include/llvm/ExecutionEngine/Orc/TPCIndirectionUtils.h [new file with mode: 0644]
llvm/include/llvm/ExecutionEngine/Orc/TargetProcessControl.h [new file with mode: 0644]
llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
llvm/lib/ExecutionEngine/Orc/TPCIndirectionUtils.cpp [new file with mode: 0644]
llvm/lib/ExecutionEngine/Orc/TargetProcessControl.cpp [new file with mode: 0644]