[ORC] Share ownership of JITDylibs between ExecutionSession and
authorLang Hames <lhames@gmail.com>
Sun, 10 May 2020 18:34:04 +0000 (11:34 -0700)
committerLang Hames <lhames@gmail.com>
Sun, 10 May 2020 23:37:17 +0000 (16:37 -0700)
commit41379f1ec4657860f4840dba914aa643e7938a5c
treedf5dfb2620ed3b1b02b43e3813dfa380f58ae0af
parent25544ce2df0daa4304c07e64b9c8b0f7df60c11d
[ORC] Share ownership of JITDylibs between ExecutionSession and
MaterializationResponsibility.

MaterializationResponsibility objects provide a connection between a
materialization process (compiler, jit linker, etc.) and the JIT state held in
the ExecutionSession and JITDylib objects. Switching to shared ownership
extends the lifetime of JITDylibs to ensure they remain accessible until all
materializers targeting them have completed. This will allow (in a follow-up
patch) JITDylibs to be removed from the ExecutionSession and placed in a
pending-destruction state while they are kept alive to communicate errors
to/from any still-runnning materialization processes. The intent is to enable
JITDylibs to be safely removed even if they have running compiles targeting
them.
llvm/include/llvm/ExecutionEngine/Orc/Core.h
llvm/lib/ExecutionEngine/Orc/Core.cpp
llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp