[JITLink][ORC] Enable creation / linking of raw jitlink::LinkGraphs.
authorLang Hames <lhames@gmail.com>
Wed, 16 Dec 2020 01:18:30 +0000 (12:18 +1100)
committerLang Hames <lhames@gmail.com>
Wed, 16 Dec 2020 03:01:50 +0000 (14:01 +1100)
commitec6b71df70a09681cc0ae87945db9f71649cf188
treeaeac10188632649d20b1e4727617641490a229ad
parent15ce0ab7ac46382ec38e7de59ec40c099b85cbf7
[JITLink][ORC] Enable creation / linking of raw jitlink::LinkGraphs.

Separates link graph creation from linking. This allows raw LinkGraphs to be
created and passed to a link. ObjectLinkingLayer is updated to support emission
of raw LinkGraphs in addition to object buffers.

Raw LinkGraphs can be created by in-memory compilers to bypass object encoding /
decoding (though this prevents caching, as LinkGraphs have do not have an
on-disk representation), and by utility code to add programatically generated
data structures to the JIT target process.
19 files changed:
llvm/include/llvm/ExecutionEngine/JITLink/ELF.h
llvm/include/llvm/ExecutionEngine/JITLink/ELF_x86_64.h
llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
llvm/include/llvm/ExecutionEngine/JITLink/MachO.h
llvm/include/llvm/ExecutionEngine/JITLink/MachO_arm64.h
llvm/include/llvm/ExecutionEngine/JITLink/MachO_x86_64.h
llvm/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h
llvm/lib/ExecutionEngine/JITLink/ELF.cpp
llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
llvm/lib/ExecutionEngine/JITLink/JITLink.cpp
llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.h
llvm/lib/ExecutionEngine/JITLink/MachO.cpp
llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp
llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.h
llvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp
llvm/lib/ExecutionEngine/JITLink/MachO_x86_64.cpp
llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp