1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/tools/lli
Lang Hames 4bba9adcc4 [Orc] Add support for emitting indirect stubs directly into the JIT target's
memory, rather than representing the stubs in IR. Update the CompileOnDemand
layer to use this functionality.

Directly emitting stubs is much cheaper than building them in IR and codegen'ing
them (see below). It also plays well with remote JITing - stubs can be emitted
directly in the target process, rather than having to send them over the wire.

The downsides are:

(1) Care must be taken when resolving symbols, as stub symbols are held in a
    separate symbol table. This is only a problem for layer writers and other
    people using this API directly. The CompileOnDemand layer hides this detail.

(2) Aliases of function stubs can't be symbolic any more (since there's no
    symbol definition in IR), but must be converted into a constant pointer
    expression. This means that modules containing aliases of stubs cannot be
    cached. In practice this is unlikely to be a problem: There's no benefit to
    caching such a module anyway.

On balance I think the extra performance is more than worth the trade-offs: In a
simple stress test with 10000 dummy functions requiring stubs and a single
executed "hello world" main function, directly emitting stubs reduced user time
for JITing / executing by over 90% (1.5s for IR stubs vs 0.1s for direct
emission).

llvm-svn: 250712
2015-10-19 17:43:51 +00:00
..
ChildTarget
Unix
Windows
CMakeLists.txt add missing dependency on Target lib for tools 2015-06-03 19:07:51 +00:00
lli.cpp Simplify a few uses of remove_filename by using parent_path instead. 2015-07-15 21:24:07 +00:00
LLVMBuild.txt Wrap some long lines in LLVMBuild files. NFC 2015-06-12 18:44:57 +00:00
Makefile
OrcLazyJIT.cpp [Orc] Add support for emitting indirect stubs directly into the JIT target's 2015-10-19 17:43:51 +00:00
OrcLazyJIT.h [Orc] Add support for emitting indirect stubs directly into the JIT target's 2015-10-19 17:43:51 +00:00
RemoteMemoryManager.cpp
RemoteMemoryManager.h
RemoteTarget.cpp
RemoteTarget.h
RemoteTargetExternal.cpp
RemoteTargetExternal.h
RemoteTargetMessage.h
RPCChannel.h