diff options
| author | Lang Hames <lhames@gmail.com> | 2018-05-30 01:57:45 +0000 |
|---|---|---|
| committer | Lang Hames <lhames@gmail.com> | 2018-05-30 01:57:45 +0000 |
| commit | bd0cb787d05b555791a88640dcf9800bab54d4fa (patch) | |
| tree | 54462834993763589d348390b6886b1fef1da6fe /llvm/tools/lli/lli.cpp | |
| parent | b534510cd55dc979bf6eebd66140cda23ba1f163 (diff) | |
| download | bcm5719-llvm-bd0cb787d05b555791a88640dcf9800bab54d4fa.tar.gz bcm5719-llvm-bd0cb787d05b555791a88640dcf9800bab54d4fa.zip | |
[ORC] Update JITCompileCallbackManager to support multi-threaded code.
Previously JITCompileCallbackManager only supported single threaded code. This
patch embeds a VSO (see include/llvm/ExecutionEngine/Orc/Core.h) in the callback
manager. The VSO ensures that the compile callback is only executed once and that
the resulting address cached for use by subsequent re-entries.
llvm-svn: 333490
Diffstat (limited to 'llvm/tools/lli/lli.cpp')
| -rw-r--r-- | llvm/tools/lli/lli.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp index 17957c97e2c..07075c2496d 100644 --- a/llvm/tools/lli/lli.cpp +++ b/llvm/tools/lli/lli.cpp @@ -612,8 +612,10 @@ int main(int argc, char **argv, char * const *envp) { } // Create a remote target client running over the channel. + llvm::orc::ExecutionSession ES; + ES.setErrorReporter([&](Error Err) { ExitOnErr(std::move(Err)); }); typedef orc::remote::OrcRemoteTargetClient MyRemote; - auto R = ExitOnErr(MyRemote::Create(*C, ExitOnErr)); + auto R = ExitOnErr(MyRemote::Create(*C, ES)); // Create a remote memory manager. auto RemoteMM = ExitOnErr(R->createRemoteMemoryManager()); |

