[ORC] Refactor trampoline pool management out of JITCompileCallbackManager.
authorLang Hames <lhames@gmail.com>
Wed, 26 Sep 2018 03:32:12 +0000 (03:32 +0000)
committerLang Hames <lhames@gmail.com>
Wed, 26 Sep 2018 03:32:12 +0000 (03:32 +0000)
commit50b33441487f9ccd447e17b1ecbd8799793993d4
tree081d7699c50e46662b000327fea43425eed02669
parent225a32af72b6f9dac6adb35263201ec7a2a08901
[ORC] Refactor trampoline pool management out of JITCompileCallbackManager.

This will allow trampoline pools to be re-used for a new lazy-reexport utility
that generates looks up function bodies using the standard symbol lookup process
(rather than using a user provided compile function). This new utility provides
the same capabilities (since MaterializationUnits already allow user supplied
compile functions to be run) as JITCompileCallbackManager, but can use the new
asynchronous lookup functions to avoid blocking a compile thread.

This patch also updates createLocalCompileCallbackManager to return an error if
a callback manager can not be created, and updates clients of that API to
account for the change. Finally, the OrcCBindingsStack is updates so that if
a callback manager is not available for the target platform a valid stack
(without support for lazy compilation) can still be constructed.

llvm-svn: 343059
llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
llvm/lib/ExecutionEngine/Orc/OrcCBindingsStack.h
llvm/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp