fa7c45b1ca
The old JIT infrastructure assumed shared ownership of the llvm::Module implemented via shared_ptr. This guaranteed each client can have a uniform view of the llvm::Module. The new infrastructure claims ownership of the object and even more transfer ownership when the llvm::Module travels through different layers of the JIT. The claimed advantage is better thread safety. The new logic defines away an important property which cling has been built around, that is the shared symbol object ownership. This patch makes the cling::Transaction the owner of the llvm::Module. The ownership is transfered when we want the JIT to 'emit' the module. Fortunately, there is a JIT callback which can transfer back the ownership to the transaction. This preserves some consistency, however, makes some operations unsafe. For example, we cannot rely on Transaction::getModule when the module is being handed to the JIT. This patch tries to adapt to the new infrastructure by reducing the dependency on the transaction's llvm::Module in favor of relying more on the information available in the execution engine (eg. at_exit handling). |
||
---|---|---|
.. | ||
Autoloading | ||
CodeGeneration | ||
CodeUnloading | ||
CUDADeviceCode | ||
Driver | ||
ErrorRecovery | ||
Extensions | ||
Interfaces | ||
LibraryCall | ||
Lookup | ||
MultipleInterpreters | ||
NullDeref | ||
Plugins | ||
Pragmas | ||
Prompt | ||
Recursion | ||
SourceCall | ||
Utils | ||
CMakeLists.txt | ||
lit.cfg | ||
lit.site.cfg.in |