1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02: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 Silence gcc 4.9.1 warning 'xyz' is used uninitialized in this function. 2014-12-12 11:07:51 +00:00
Unix [C++] Use 'nullptr'. 2014-04-28 04:05:08 +00:00
Windows Report lli remote IO errors consistently 2014-01-24 17:18:52 +00:00
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 Fix lli after the DebugInfo move. 2015-01-30 18:42:03 +00:00
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 Purge unused includes throughout libSupport. 2015-03-23 18:07:13 +00:00
RemoteMemoryManager.h Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
RemoteTarget.cpp [C++] Use 'nullptr'. Tools edition. 2014-04-25 04:24:47 +00:00
RemoteTarget.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
RemoteTargetExternal.cpp [Modules] Make Support/Debug.h modular. This requires it to not change 2014-04-21 22:55:11 +00:00
RemoteTargetExternal.h Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
RemoteTargetMessage.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
RPCChannel.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00