Break out OrcError and RPC
authorChris Bieneman <chris.bieneman@me.com>
Wed, 9 Oct 2019 21:27:52 +0000 (14:27 -0700)
committerChris Bieneman <chris.bieneman@me.com>
Wed, 30 Oct 2019 00:31:28 +0000 (17:31 -0700)
commita34680a33eb1caa5e224a9432e9f3e643824dc2d
tree11483618a9a67f1403e0fd8b22a1a9d12c9779b4
parentcbb3104b1c8ea93b6749043184a8d8952b8b2747
Break out OrcError and RPC

Summary:
When createing an ORC remote JIT target the current library split forces the target process to link large portions of LLVM (Core, Execution Engine, JITLink, Object, MC, Passes, RuntimeDyld, Support, Target, and TransformUtils). This occurs because the ORC RPC interfaces rely on the static globals the ORC Error types require, which starts a cycle of pulling in more and more.

This patch breaks the ORC RPC Error implementations out into an "OrcError" library which only depends on LLVM Support. It also pulls the ORC RPC headers into their own subdirectory.

With this patch code can include the Orc/RPC/*.h headers and will only incur link dependencies on LLVMOrcError and LLVMSupport.

Reviewers: lhames

Reviewed By: lhames

Subscribers: mgorny, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68732
16 files changed:
llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/RemoteJITUtils.h
llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h
llvm/include/llvm/ExecutionEngine/Orc/RPC/RPCSerialization.h [moved from llvm/include/llvm/ExecutionEngine/Orc/RPCSerialization.h with 99% similarity]
llvm/include/llvm/ExecutionEngine/Orc/RPC/RPCUtils.h [moved from llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h with 99% similarity]
llvm/include/llvm/ExecutionEngine/Orc/RPC/RawByteChannel.h [moved from llvm/include/llvm/ExecutionEngine/Orc/RawByteChannel.h with 97% similarity]
llvm/lib/ExecutionEngine/CMakeLists.txt
llvm/lib/ExecutionEngine/LLVMBuild.txt
llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
llvm/lib/ExecutionEngine/Orc/LLVMBuild.txt
llvm/lib/ExecutionEngine/OrcError/CMakeLists.txt [new file with mode: 0644]
llvm/lib/ExecutionEngine/OrcError/LLVMBuild.txt [new file with mode: 0644]
llvm/lib/ExecutionEngine/OrcError/OrcError.cpp [moved from llvm/lib/ExecutionEngine/Orc/OrcError.cpp with 100% similarity]
llvm/lib/ExecutionEngine/OrcError/RPCError.cpp [moved from llvm/lib/ExecutionEngine/Orc/RPCUtils.cpp with 90% similarity]
llvm/tools/lli/RemoteJITUtils.h
llvm/unittests/ExecutionEngine/Orc/QueueChannel.h
llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp