[all-commits] [llvm/llvm-project] 1d0676: [ORC] Break up OrcJIT library, add Orc-RPC based r...

lhames via All-commits all-commits at lists.llvm.org
Thu Nov 12 22:06:06 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1d0676b54c4e3a517719220def96dfdbc26d8048
      https://github.com/llvm/llvm-project/commit/1d0676b54c4e3a517719220def96dfdbc26d8048
  Author: Lang Hames <lhames at gmail.com>
  Date:   2020-11-13 (Fri, 13 Nov 2020)

  Changed paths:
    M llvm/examples/OrcV2Examples/LLJITWithTargetProcessControl/LLJITWithTargetProcessControl.cpp
    M llvm/include/llvm/ExecutionEngine/JITLink/EHFrameSupport.h
    M llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
    M llvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h
    A llvm/include/llvm/ExecutionEngine/Orc/OrcRPCTargetProcessControl.h
    M llvm/include/llvm/ExecutionEngine/Orc/RPC/FDRawByteChannel.h
    M llvm/include/llvm/ExecutionEngine/Orc/RPC/RPCSerialization.h
    A llvm/include/llvm/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h
    M llvm/include/llvm/ExecutionEngine/Orc/TPCDynamicLibrarySearchGenerator.h
    A llvm/include/llvm/ExecutionEngine/Orc/TPCEHFrameRegistrar.h
    A llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/OrcRPCTPCServer.h
    A llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.h
    A llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/TargetExecutionUtils.h
    M llvm/include/llvm/ExecutionEngine/Orc/TargetProcessControl.h
    M llvm/lib/ExecutionEngine/CMakeLists.txt
    M llvm/lib/ExecutionEngine/JITLink/CMakeLists.txt
    M llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
    M llvm/lib/ExecutionEngine/JITLink/LLVMBuild.txt
    M llvm/lib/ExecutionEngine/LLVMBuild.txt
    M llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
    M llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
    M llvm/lib/ExecutionEngine/Orc/LLVMBuild.txt
    A llvm/lib/ExecutionEngine/Orc/Shared/CMakeLists.txt
    A llvm/lib/ExecutionEngine/Orc/Shared/LLVMBuild.txt
    A llvm/lib/ExecutionEngine/Orc/Shared/LLVMBuild.txt.rej
    A llvm/lib/ExecutionEngine/Orc/Shared/OrcError.cpp
    A llvm/lib/ExecutionEngine/Orc/Shared/RPCError.cpp
    A llvm/lib/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.cpp
    M llvm/lib/ExecutionEngine/Orc/TPCDynamicLibrarySearchGenerator.cpp
    A llvm/lib/ExecutionEngine/Orc/TPCEHFrameRegistrar.cpp
    M llvm/lib/ExecutionEngine/Orc/TPCIndirectionUtils.cpp
    A llvm/lib/ExecutionEngine/Orc/TargetProcess/CMakeLists.txt
    A llvm/lib/ExecutionEngine/Orc/TargetProcess/LLVMBuild.txt
    A llvm/lib/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.cpp
    A llvm/lib/ExecutionEngine/Orc/TargetProcess/TargetExecutionUtils.cpp
    M llvm/lib/ExecutionEngine/Orc/TargetProcessControl.cpp
    R llvm/lib/ExecutionEngine/OrcError/CMakeLists.txt
    R llvm/lib/ExecutionEngine/OrcError/LLVMBuild.txt
    R llvm/lib/ExecutionEngine/OrcError/OrcError.cpp
    R llvm/lib/ExecutionEngine/OrcError/RPCError.cpp
    M llvm/tools/lli/CMakeLists.txt
    M llvm/tools/lli/ChildTarget/CMakeLists.txt
    M llvm/tools/lli/LLVMBuild.txt
    M llvm/tools/lli/lli.cpp
    M llvm/tools/llvm-jitlink/CMakeLists.txt
    M llvm/tools/llvm-jitlink/LLVMBuild.txt
    A llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt
    A llvm/tools/llvm-jitlink/llvm-jitlink-executor/LLVMBuild.txt
    A llvm/tools/llvm-jitlink/llvm-jitlink-executor/llvm-jitlink-executor.cpp
    M llvm/tools/llvm-jitlink/llvm-jitlink.cpp
    M llvm/tools/llvm-jitlink/llvm-jitlink.h
    M llvm/unittests/ExecutionEngine/JITLink/CMakeLists.txt
    M llvm/unittests/ExecutionEngine/Orc/CMakeLists.txt

  Log Message:
  -----------
  [ORC] Break up OrcJIT library, add Orc-RPC based remote TargetProcessControl
implementation.

This patch aims to improve support for out-of-process JITing using OrcV2. It
introduces two new class templates, OrcRPCTargetProcessControlBase and
OrcRPCTPCServer, which together implement the TargetProcessControl API by
forwarding operations to an execution process via an Orc-RPC Endpoint. These
utilities are used to implement out-of-process JITing from llvm-jitlink to
a new llvm-jitlink-executor tool.

This patch also breaks the OrcJIT library into three parts:
  -- OrcTargetProcess: Contains code needed by the JIT execution process.
  -- OrcShared: Contains code needed by the JIT execution and compiler
     processes
  -- OrcJIT: Everything else.

This break-up allows JIT executor processes to link against OrcTargetProcess
and OrcShared only, without having to link in all of OrcJIT. Clients executing
JIT'd code in-process should start linking against OrcTargetProcess as well as
OrcJIT.

In the near future these changes will enable:
  -- Removal of the OrcRemoteTargetClient/OrcRemoteTargetServer class templates
     which provided similar functionality in OrcV1.
  -- Restoration of Chapter 5 of the Building-A-JIT tutorial series, which will
     serve as a simple usage example for these APIs.
  -- Implementation of lazy, cross-target compilation in lli's -jit-kind=orc-lazy
     mode.




More information about the All-commits mailing list